cancel
Showing results for 
Search instead for 
Did you mean: 

I can't connect to Salesforce Adapter (Cannot start session. java.lang.NullPointerException)

12-04-2015 4:01 PM
1520 views 5 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi all!

I am a bit crazy.gif with this as it doesn't seem to work no matter what I try..

I have setup the The Adapter. It seems to start fine, no error at the error log.

Then I create the datastore with web service end point: https://www.salesforce.com/services/Soap/u/21.0 (not sure if this makes any difference).

The username is my Salesforce username and the password is my pwd+my security token.

Looking at the adapter trace, when I try to apply the changes in he datastore, I get the following error trace:

04/12/15 14:17:51 Thread[Thread-21,5,main] Cannot start session. java.lang.NullPointerException

at com.acta.adapter.salesforce.SForceSession.loginHelper(SForceSession.java:125)

at com.acta.adapter.salesforce.SForceSession.login(SForceSession.java:95)

at com.acta.adapter.salesforce.SForceSession.start(SForceSession.java:184)

at com.acta.adapter.sdk.AdapterRunnerImpl.processStartSession(AdapterRunnerImpl.java:1627)

at com.acta.adapter.sdk.AdapterServiceDataListener.handleBrokerMessage(AdapterServiceDataListener.java:84)

at com.acta.brokerclient.BrokerClient.handleMessage(BrokerClient.java:439)

at com.acta.brokerclient.BrokerClient.access$100(BrokerClient.java:53)

at com.acta.brokerclient.BrokerClient$MessageHandler.run(BrokerClient.java:1621)

at com.acta.brokerclient.ThreadPool$PoolThread.run(ThreadPool.java:100)

The pwd+token seems to be correct because if I try some other password I get a different error (Connection timed out: connect).

I am working with BODS 4.1 14.0.3 (SP0, FP3).

Has anyone encountered this problem before?

Thanks in advance!

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Sergio,

It looks like that you are trying to create a Salesforce adapter datastore in Production instance. Did you try using the test SFDC URL. Also can you please check what is the version of JRE on your job server which has the Saleforce adapter instance configured. If your Java version is low then try to upgrade it

I found a SAP Note 2019162 in which it says that the issue is resolved after Installing 4.2 SP5. Not sure if you are ready to upgrade to this Service Pack Level.

Regards

Arun Sasi

Former Member
0 Likes

Hi Arun,

Thanks for your answer. What do you mean by SFDC URL? I tried the the SOAP url to see that it existed, if that's what you mean (the one like https://www.salesforce.com/services/Soap/u/21.0).

My current PROD version of BODS is 4.0 SP3P2.

As per java, the current version is 1.6.0.260.3

I have another instance in a development environment of a 14.2.5 but in there I get an error when starting the adapter (that's why I was trying with the old version first).

[SAX Parser Error] :1:23 : cvc-elt.1: Cannot find the declaration of element 'AdapterConfiguration'.

Java version in the new server is 6.0.510.11

If I ignore the error and try to setup the datastore, I get this other error

07/12/15 12:21:57 Thread[Thread-13,5,main]There was a communication error when talking to Salesforce.com: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
07/12/15 12:21:57 Thread[Thread-13,5,main]Fault-tolerance-login-failed : There was a communication error when talking to Salesforce.com: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Along with the same null pointer error. If anything, it looks worse than my tests on the old BODS.

Any ideas?

Thanks,

Sergio

Former Member
0 Likes

Sergio,

The Salesforce URL is different for Test Salesforce Instance and production Instance. The issue is nothing related with URL.

It seems that you have not installed Salesforce Adapter certificates on the DEV job server 4.2 SP5

BODS SalesForce Adapter

https://help.salesforce.com/apex/HTViewSolution?urlname=HTTPS-Security-Certificate-Switch-from-SHA-1...

Regards

Arun Sasi

Answers (1)

Answers (1)

Former Member
0 Likes

Hi Arun,

I have added the certificate into the BODS keystore and it now seems to work.

Just for anyone checking this post, I got the certificate from Setup-> Develop ->API in Salesforce

Thanks!

Sergio

Former Member
0 Likes