You need to sign in to do that
Don't have an account?
![salam salam](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
Unable to login through Java (Axis)
Hi,
I'm relatively new to SalesForce so bear with me if this seems very stupid.:mansad:
I am trying to run the Sample java code with SalesForce web service. I get a NullPointerException when i try to log in. I have a developers account whose login/password combination i am using.
The following statement executes fine.
Code:
However when i try to login using this binding i get the exception at this line
Code:
The stack trace hints that the initial error is occuring at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:1781)
Any idea what should I do to resolve this?
I'm relatively new to SalesForce so bear with me if this seems very stupid.:mansad:
I am trying to run the Sample java code with SalesForce web service. I get a NullPointerException when i try to log in. I have a developers account whose login/password combination i am using.
The following statement executes fine.
Code:
binding = (SoapBindingStub)new SforceServiceLocator().getSoap();
However when i try to login using this binding i get the exception at this line
Code:
binding.login(userName, password);Here userName and password are my developer account's user name and password in String.
The stack trace hints that the initial error is occuring at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:1781)
Any idea what should I do to resolve this?
JDK version?
Can you post the entire stacktrace?
The quickstart demo works fine, so I used the same approach developing a web application in Java 1.5, using Studio Creator as an IDE. I use the enterprise WSDL and generate the Java classes with the Axis 1.3 wsdl2java tool. I customized some fields and objects before downloading the WSDL. SF moved our organization's account (developer version) from some NAx domain to some NAy. Before that I tried nothing more than logging in to SF through the API and succeeded (initially I had some problems because of the application Server permissions, but I solved them). Now I can't even do that!
I read that if I followed the best practices to login, nothing would change. I don't know what these practices are, but I followed the guidelines of the sample application:
binding=(SoapBindingStub) new SforceServiceLocator().getSoap();
When calling getSoap I get the following exception:
(java.lang.NoSuchMethodError)java.lang.NoSuchMethodError: org.apache.axis.description.ParameterDesc.setOmittable(Z)V
I tried to change the axis libraries, I used versions 1.2.1, 1.3 and even 1.4! I tried to use the classes bundled with the quickstart! Nothing changed!
Could any of you please help me? Thanks!
Message Edited by gc77 on 06-22-2006 04:34 AM
You were right, SimonF!!! Someone of my team must have changed the libraries without letting the others know!! ARGH!!! :smileymad:
Thank you very very much!!! :smileyvery-happy:
Hi I reached this post in search of very similar issue.
Though the i am using same version of Axis2 while building java stubs and in sever.
Just see in case you can help to solve this.
I am creating a web service on axis2 to listen to outbound message.
Issue is on Red Hat linux server.
Using:
Axis2 version 1.6.1
Tomcat- 6.0.29
JDK 1.6
Delivery failure reason: java.lang.NoSuchMethodError: com.sforce.soap.enterprise.sobject.Call2_vod__c.setId(Lcom/sforce/soap/enterprise/ID;)V
Server Logs:
[ERROR] com.sforce.soap.enterprise.sobject.Call2_vod__c.setId(Lcom/sforce/soap/enterprise/ID;)V
java.lang.NoSuchMethodError: com.sforce.soap.enterprise.sobject.Call2_vod__c.setId(Lcom/sforce/soap/enterprise/ID;)V
at com.sforce.soap.enterprise.sobject.Call2_vod__c$Factory.parse(Call2_vod__c.java:1280)
at com.sforce.soap._2005._09.outbound.Call2_vod__cNotification$Factory.parse(Call2_vod__cNotification.java:457)
at com.sforce.soap._2005._09.outbound.Notifications$Factory.parse(Notifications.java:825)
at com.sforce.soap._2005._09.outbound.NotificationServiceMessageReceiverInOut.fromOM(NotificationServiceMessageReceiverInOut.java:138)
at com.sforce.soap._2005._09.outbound.NotificationServiceMessageReceiverInOut.invokeBusinessLogic(NotificationServiceMessageReceiverInOut.java:44)
at org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:110)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
Thanks for your time!