function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ParamParam 

Getting java.lang.NullPointerException error in Java Sample Code

 Hi

  • Downloaded the Java Sample Code from the sforce (i.e. quickstart). And included the quickstart.jar in the classpath.
  • When first time I try to run this code I got javax.net.ssl.SSLHandshakeException error.
  • In the mean time I try to integrate the sforce Explorer to weblogic workshop. And it asked me userID and password. Then I entered my sforce userID and password. And I got the same error (javax.net.ssl.SSLHandshakeException).
  • Then I set the system property of proxy server in startWebLogic:        

        -Dweblogic.webservice.transport.https.proxy.host= \

        -Dweblogic.webservice.transport.https.proxy.port= \

         I define both the proxy host and proxy port.

  • This time I didnâ¬?t get javax.net.ssl.SSLHandshakeException error, neither in sforceExplorer nor in sample code. SForceExplorer accepted my sforce UserID and password and I can see all the objects of sforce through sforce Explorer.
  • however I got java.lang.NullPointerException error in the sample code.

The system environment:

Weblogic 8.1 with service pack 4

            jdk 1.4.2_05
 
 these errors i am getting when i am trying to run the sample code from office. and when i am doing the same thing at home i am not getting these errors. i can run the sample code and able to login and see the information coming from Account object.
 
Could anybody help me on this.
 
thank u
DevAngelDevAngel

Hi Param,

The handshake error is due to outdated ssl certificates being used by your jvm.  Installing a new version of the jvm should fix this.  If you don't want to install a new version of the jvm, then you can install a new certificate.

See the post here for more info:

http://forums.sforce.com/sforce/board/message?board.id=announcements&message.id=23&highlight=sun#M23