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
dadadada 

java.lang.NullPointerException

When I run the sample code from the sforce website, I succesfully login, but then after that I get an error. The error says:

faultDetail:

{http://xml.apache.org/axis/}stackTrace: java.lang.NullPointerException

at java.util.Hashtable.put(Hashtable.java:396)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:385)

at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)

at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)

at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)

at org.apache.axis.client.Call.invokeEngine(Call.java:2583)

at org.apache.axis.client.Call.invoke(Call.java:2553)

at org.apache.axis.client.Call.invoke(Call.java:2248)

at org.apache.axis.client.Call.invoke(Call.java:2171)

at org.apache.axis.client.Call.invoke(Call.java:1691)

at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:1142)

at Samples.login(Samples.java:134)

at Samples.run(Samples.java:1226)

at Samples.main(Samples.java:75)

 

java.lang.NullPointerException

at org.apache.axis.AxisFault.makeFault(AxisFault.java:129)

at org.apache.axis.client.Call.invoke(Call.java:2251)

at org.apache.axis.client.Call.invoke(Call.java:2171)

at org.apache.axis.client.Call.invoke(Call.java:1691)

at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:1142)

at Samples.login(Samples.java:134)

at Samples.run(Samples.java:1226)

at Samples.main(Samples.java:75)

Caused by: java.lang.NullPointerException

at java.util.Hashtable.put(Hashtable.java:396)

at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:385)

at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:246)

at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)

at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)

at org.apache.axis.client.Call.invokeEngine(Call.java:2583)

at org.apache.axis.client.Call.invoke(Call.java:2553)

at org.apache.axis.client.Call.invoke(Call.java:2248)

Can somebody give me some info on rectifying this problem,

momchillmomchill

I got the same message using JDK 1.5.0 (tested with update 4 and 5). However running the same code with JDK 1.4.2 (update 9) works fine.

Does anyone succeded to run sforce login on Java 5 ?

SuperfellSuperfell
See all the other posts re Axis 1.1 vs 1.2, the short version is that to run on JDK 1.5, you need Axis 1.2, and you need to re-work the samples because of changes in axis between 1.1 and 1.2