You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Danny Lin <Li...@doc.state.sc.us> on 2007/01/15 22:11:30 UTC
Axis2 client JAR requirements
I have a webservice written using XMLBeans databinding. The client is
also using XMLBeans. So far, I've got the web service running and the
client (a Java class with main() method) is able to talk to the service
without problems.
In practice, I need to have a client from another webapp. I want to do
something similar to my client.java in the test. The Axis2 is installed
as a webapp. What's the recommendation for sharing the JAR libraries?
Should I copy all Axis2 JAR to Tomcat shared/lib directory? Or, should I
hand pick the required JARs and pack them within my WAR file? Is there a
list of the required JAR files when using XMLBeans databinding?
Thanks.
Danny
Re: Axis2 client JAR requirements
Posted by ChadDavis <ch...@gmail.com>.
Danny,
The axis2 distribution, probably something similar in axis1, has a
script in the bin directory that sets an AXIS@2_CLASSPATH variable
that includes all the jars from the lib directory automatically. I
realize this doesn't answer your question about how many of the jars
from the lib are necessary, but . . . this script is convenient at any
rate. Its called axis2 and you can use it similarly to 'java'; e.g.
axis2.sh org.foo.bar.MyClient
Note, it sources a setenv.sh script to set up the classpath, and i
think it needs a environement varialbe for AXIS2_HOME set.
Chad
On 1/15/07, Danny Lin <Li...@doc.state.sc.us> wrote:
>
>
> Right now I am getting NoClassDefFoundError (see below), when my code is
> creating a stub. Any help is greatly appreciated.
>
>
>
> InmateMatchServiceStub stub = new InmateMatchServiceStub(myURL);
>
> java.lang.NoClassDefFoundError: org/apache/axis2/client/Stub
> at java.lang.ClassLoader.defineClass0(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
> at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
> at
> org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
> at
> org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
> at
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
> at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
> at
> us.sc.state.doc.intake.IntakeInmateMatchAction.searchSCDC(IntakeInmateMatchAction.java:108)
>
>
> ________________________________
> From: Danny Lin [mailto:Lin.Danny@doc.state.sc.us]
> Sent: Monday, January 15, 2007 4:12 PM
> To: axis-user@ws.apache.org; axis-dev@ws.apache.org
> Subject: Axis2 client JAR requirements
>
>
>
> I have a webservice written using XMLBeans databinding. The client is also
> using XMLBeans. So far, I've got the web service running and the client (a
> Java class with main() method) is able to talk to the service without
> problems.
>
> In practice, I need to have a client from another webapp. I want to do
> something similar to my client.java in the test. The Axis2 is installed as a
> webapp. What's the recommendation for sharing the JAR libraries? Should I
> copy all Axis2 JAR to Tomcat shared/lib directory? Or, should I hand pick
> the required JARs and pack them within my WAR file? Is there a list of the
> required JAR files when using XMLBeans databinding?
>
> Thanks.
>
> Danny
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: Axis2 client JAR requirements
Posted by Danny Lin <Li...@doc.state.sc.us>.
OK. I have this problem resolved by removing the client jars
(XBeans-packaged.jar and myClient.jar) from Tomcat shared/lib directory.
I also added all Axis2 Jars to Tomcat shared/lib except the 4 jar files
that I decided to keep my old ones. I figured that they were not
contributing to the problem. Now I am going to remove Axis2 jars from
Tomcat shared/lib one by one to see which jar is indeed needed.
activation.jar
commons-fileupload.jar
commons-logging.jar
mail.jar
________________________________
From: Danny Lin [mailto:Lin.Danny@doc.state.sc.us]
Sent: Tuesday, January 16, 2007 10:21 AM
To: axis-dev@ws.apache.org; axis-user@ws.apache.org
Subject: RE: Axis2 client JAR requirements
I copied all Axis2 jar files to my Tomcat shared/lib directory and
removed 4 jars that are different versions:
activation.jar
commons-fileupload.jar
commons-logging.jar
mail.jar
So, at this point, my Tomcat is using the same jar files as Axis2. I am
no longer getting the class loader error. However, I am getting an
AxisFault. (see below.) What is a LinkageError? Any ideas? Thanks.
Danny
org.apache.axis2.AxisFault: java.lang.LinkageError: loader constraints
violated when linking org/apache/xmlbeans/XmlOptions class
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:308)
clients.InmateMatchServiceStub.getInmateList(InmateMatchServiceStub.java
:155)
us.sc.state.doc.intake.IntakeInmateMatchAction.searchSCDC(IntakeInmateMa
tchAction.java:134)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:274)
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
ion.java:160)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
________________________________
From: Danny Lin [mailto:Lin.Danny@doc.state.sc.us]
Sent: Monday, January 15, 2007 4:12 PM
To: axis-user@ws.apache.org; axis-dev@ws.apache.org
Subject: Axis2 client JAR requirements
I have a webservice written using XMLBeans databinding. The client is
also using XMLBeans. So far, I've got the web service running and the
client (a Java class with main() method) is able to talk to the service
without problems.
In practice, I need to have a client from another webapp. I want to do
something similar to my client.java in the test. The Axis2 is installed
as a webapp. What's the recommendation for sharing the JAR libraries?
Should I copy all Axis2 JAR to Tomcat shared/lib directory? Or, should I
hand pick the required JARs and pack them within my WAR file? Is there a
list of the required JAR files when using XMLBeans databinding?
Thanks.
Danny
RE: Axis2 client JAR requirements
Posted by Danny Lin <Li...@doc.state.sc.us>.
OK. I have this problem resolved by removing the client jars
(XBeans-packaged.jar and myClient.jar) from Tomcat shared/lib directory.
I also added all Axis2 Jars to Tomcat shared/lib except the 4 jar files
that I decided to keep my old ones. I figured that they were not
contributing to the problem. Now I am going to remove Axis2 jars from
Tomcat shared/lib one by one to see which jar is indeed needed.
activation.jar
commons-fileupload.jar
commons-logging.jar
mail.jar
________________________________
From: Danny Lin [mailto:Lin.Danny@doc.state.sc.us]
Sent: Tuesday, January 16, 2007 10:21 AM
To: axis-dev@ws.apache.org; axis-user@ws.apache.org
Subject: RE: Axis2 client JAR requirements
I copied all Axis2 jar files to my Tomcat shared/lib directory and
removed 4 jars that are different versions:
activation.jar
commons-fileupload.jar
commons-logging.jar
mail.jar
So, at this point, my Tomcat is using the same jar files as Axis2. I am
no longer getting the class loader error. However, I am getting an
AxisFault. (see below.) What is a LinkageError? Any ideas? Thanks.
Danny
org.apache.axis2.AxisFault: java.lang.LinkageError: loader constraints
violated when linking org/apache/xmlbeans/XmlOptions class
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:308)
clients.InmateMatchServiceStub.getInmateList(InmateMatchServiceStub.java
:155)
us.sc.state.doc.intake.IntakeInmateMatchAction.searchSCDC(IntakeInmateMa
tchAction.java:134)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:274)
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
ion.java:160)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
________________________________
From: Danny Lin [mailto:Lin.Danny@doc.state.sc.us]
Sent: Monday, January 15, 2007 4:12 PM
To: axis-user@ws.apache.org; axis-dev@ws.apache.org
Subject: Axis2 client JAR requirements
I have a webservice written using XMLBeans databinding. The client is
also using XMLBeans. So far, I've got the web service running and the
client (a Java class with main() method) is able to talk to the service
without problems.
In practice, I need to have a client from another webapp. I want to do
something similar to my client.java in the test. The Axis2 is installed
as a webapp. What's the recommendation for sharing the JAR libraries?
Should I copy all Axis2 JAR to Tomcat shared/lib directory? Or, should I
hand pick the required JARs and pack them within my WAR file? Is there a
list of the required JAR files when using XMLBeans databinding?
Thanks.
Danny
RE: Axis2 client JAR requirements
Posted by Danny Lin <Li...@doc.state.sc.us>.
I copied all Axis2 jar files to my Tomcat shared/lib directory and
removed 4 jars that are different versions:
activation.jar
commons-fileupload.jar
commons-logging.jar
mail.jar
So, at this point, my Tomcat is using the same jar files as Axis2. I am
no longer getting the class loader error. However, I am getting an
AxisFault. (see below.) What is a LinkageError? Any ideas? Thanks.
Danny
org.apache.axis2.AxisFault: java.lang.LinkageError: loader constraints
violated when linking org/apache/xmlbeans/XmlOptions class
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:308)
clients.InmateMatchServiceStub.getInmateList(InmateMatchServiceStub.java
:155)
us.sc.state.doc.intake.IntakeInmateMatchAction.searchSCDC(IntakeInmateMa
tchAction.java:134)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:274)
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
ion.java:160)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
________________________________
From: Danny Lin [mailto:Lin.Danny@doc.state.sc.us]
Sent: Monday, January 15, 2007 4:12 PM
To: axis-user@ws.apache.org; axis-dev@ws.apache.org
Subject: Axis2 client JAR requirements
I have a webservice written using XMLBeans databinding. The client is
also using XMLBeans. So far, I've got the web service running and the
client (a Java class with main() method) is able to talk to the service
without problems.
In practice, I need to have a client from another webapp. I want to do
something similar to my client.java in the test. The Axis2 is installed
as a webapp. What's the recommendation for sharing the JAR libraries?
Should I copy all Axis2 JAR to Tomcat shared/lib directory? Or, should I
hand pick the required JARs and pack them within my WAR file? Is there a
list of the required JAR files when using XMLBeans databinding?
Thanks.
Danny
RE: Axis2 client JAR requirements
Posted by Danny Lin <Li...@doc.state.sc.us>.
Right now I am getting NoClassDefFoundError (see below), when my code is
creating a stub. Any help is greatly appreciated.
InmateMatchServiceStub stub = new InmateMatchServiceStub(myURL);
java.lang.NoClassDefFoundError: org/apache/axis2/client/Stub
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
ssLoader.java:1634)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
.java:860)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1307)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1189)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at
us.sc.state.doc.intake.IntakeInmateMatchAction.searchSCDC(IntakeInmateMa
tchAction.java:108)
________________________________
From: Danny Lin [mailto:Lin.Danny@doc.state.sc.us]
Sent: Monday, January 15, 2007 4:12 PM
To: axis-user@ws.apache.org; axis-dev@ws.apache.org
Subject: Axis2 client JAR requirements
I have a webservice written using XMLBeans databinding. The client is
also using XMLBeans. So far, I've got the web service running and the
client (a Java class with main() method) is able to talk to the service
without problems.
In practice, I need to have a client from another webapp. I want to do
something similar to my client.java in the test. The Axis2 is installed
as a webapp. What's the recommendation for sharing the JAR libraries?
Should I copy all Axis2 JAR to Tomcat shared/lib directory? Or, should I
hand pick the required JARs and pack them within my WAR file? Is there a
list of the required JAR files when using XMLBeans databinding?
Thanks.
Danny
RE: Axis2 client JAR requirements
Posted by Danny Lin <Li...@doc.state.sc.us>.
I copied all Axis2 jar files to my Tomcat shared/lib directory and
removed 4 jars that are different versions:
activation.jar
commons-fileupload.jar
commons-logging.jar
mail.jar
So, at this point, my Tomcat is using the same jar files as Axis2. I am
no longer getting the class loader error. However, I am getting an
AxisFault. (see below.) What is a LinkageError? Any ideas? Thanks.
Danny
org.apache.axis2.AxisFault: java.lang.LinkageError: loader constraints
violated when linking org/apache/xmlbeans/XmlOptions class
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisO
peration.java:308)
clients.InmateMatchServiceStub.getInmateList(InmateMatchServiceStub.java
:155)
us.sc.state.doc.intake.IntakeInmateMatchAction.searchSCDC(IntakeInmateMa
tchAction.java:134)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.j
ava:274)
org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAct
ion.java:160)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestPr
ocessor.java:419)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:
224)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
________________________________
From: Danny Lin [mailto:Lin.Danny@doc.state.sc.us]
Sent: Monday, January 15, 2007 4:12 PM
To: axis-user@ws.apache.org; axis-dev@ws.apache.org
Subject: Axis2 client JAR requirements
I have a webservice written using XMLBeans databinding. The client is
also using XMLBeans. So far, I've got the web service running and the
client (a Java class with main() method) is able to talk to the service
without problems.
In practice, I need to have a client from another webapp. I want to do
something similar to my client.java in the test. The Axis2 is installed
as a webapp. What's the recommendation for sharing the JAR libraries?
Should I copy all Axis2 JAR to Tomcat shared/lib directory? Or, should I
hand pick the required JARs and pack them within my WAR file? Is there a
list of the required JAR files when using XMLBeans databinding?
Thanks.
Danny
RE: Axis2 client JAR requirements
Posted by Danny Lin <Li...@doc.state.sc.us>.
Right now I am getting NoClassDefFoundError (see below), when my code is
creating a stub. Any help is greatly appreciated.
InmateMatchServiceStub stub = new InmateMatchServiceStub(myURL);
java.lang.NoClassDefFoundError: org/apache/axis2/client/Stub
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
ssLoader.java:1634)
at
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
.java:860)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1307)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1189)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at
us.sc.state.doc.intake.IntakeInmateMatchAction.searchSCDC(IntakeInmateMa
tchAction.java:108)
________________________________
From: Danny Lin [mailto:Lin.Danny@doc.state.sc.us]
Sent: Monday, January 15, 2007 4:12 PM
To: axis-user@ws.apache.org; axis-dev@ws.apache.org
Subject: Axis2 client JAR requirements
I have a webservice written using XMLBeans databinding. The client is
also using XMLBeans. So far, I've got the web service running and the
client (a Java class with main() method) is able to talk to the service
without problems.
In practice, I need to have a client from another webapp. I want to do
something similar to my client.java in the test. The Axis2 is installed
as a webapp. What's the recommendation for sharing the JAR libraries?
Should I copy all Axis2 JAR to Tomcat shared/lib directory? Or, should I
hand pick the required JARs and pack them within my WAR file? Is there a
list of the required JAR files when using XMLBeans databinding?
Thanks.
Danny