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
ndoshindoshi 

issues when logging into the API

I am getting the following exception when I try logging into the API :

java.lang.LinkageError: loader constraints violated when linking javax/xml/soap/SOAPMessage class
        at org.apache.axis.AxisFault.setFaultCodeAsString(AxisFault.java:422)
        at org.apache.axis.AxisFault.<init>(AxisFault.java:228)
        at com.sforce.soap.enterprise.SoapBindingStub.createCall(SoapBindingStub.java:2992)
        at com.sforce.soap.enterprise.SoapBindingStub.login(SoapBindingStub.java:3000)
        at com.odc.salesforceservice.salesforceapi.SalesforceSessionManager.login(SalesforceSessionManager.java:104)
        at com.odc.salesforceservice.salesforceapi.SalesforceSessionManager.checkLogin(SalesforceSessionManager.java:138
)
        at com.odc.salesforceservice.salesforceapi.SalesforceSessionManager.executeQuery(SalesforceSessionManager.java:2
27)
        at com.odc.salesforceservice.salesforceapi.SalesforceSessionManager.executeSOQL(SalesforceSessionManager.java:26
4)


This only happens when I re-deploy the axis2, which the web service runs in.
Restarting JBoss resolves the problem.


Does anyone have any ideas?
SuperfellSuperfell
I don't see anything particularly salesforce specific in your problem, you'd probably have better luck asking in a JBoss and/or Axis2 forum.
ndoshindoshi
Thanks for the quick response Simon.
I agree it has the problem probably has to do with JBoss and Axis2 as well, but the rest of the application runs fine until it tries to log into the Salesforce API.

Do I need to be invoking logout() before undeploying the web-app?
SuperfellSuperfell
the error seems to indicate a local class loader problem WRT to some axis classes, I'm sure you'd see this with any usage of axis, not just salesforce
ndoshindoshi
Thanks Simon, but I am using Axis2 for my webservice, not Axis.

I only included the axis jars in the classpath because the salesforce api stub that I generated required classes from it.
So the fact there are axis classes in the stack trace indicates it is part of the call the salesforce api through the salesforce api stub.


--Neil
SuperfellSuperfell
Lat time i looked, you couldn't have axis2 and axis in the same VM because of class name clashes.
ndoshindoshi
It seems to be working fine for me until I try to redeploy axis.

I found a post of someone actually running axis within axis2:
http://markmail.org/message/36rd3rgbgomwbcud#query:axis2%20axis%20same%20VM+page:1+mid:36rd3rgbgomwbcud+state:results

--Neil
DorDor
I used also Axis2 to generate the java classes, i am using it also in the deploy on my jboss 4.2.3 and there is no problem.
 
Are you still having this problem ?
 
Can you send you configuration like:
AS name
Axis2 version
etc
 
Dor


Message Edited by Dor on 11-20-2008 09:06 AM
ndoshindoshi
jboss-4.0.4.GA
axis2-1.4.1

I have a folder called WebContent in my project that contains the axis2 files, web.xml, applicationcontext.xml (spring), etc.
My build process takes my source code and builds it to a jar file.
Then it takes the services.xml and puts that in an aar file.
Then it puts the jar file in the lib directory of WebContent/META-INF and the aar file in the services directory of WebContent/META-INF.

Before I set up Spring it was just building an aar file with all the classes & services.xml and putting that in the services directory, but the behavior was the same.

What does your deployment process look like?
Does your service use spring as well or no?

Thanks for your help!