java.lang.NoClassDefFoundError: org/apache/axis2/AxisFault When axis2-kernel-1.5.4.jar is in the class path
I have a jar file with a main() statement that instantiates and calls an axis2 web service stub. It cannot seem to find org.apache.axis2.AxisFault despite it being on my classpath. I am running 1.6.0_25 on windows 7. My command is as follows:
java -classpath "C:\Program Files\Apache Software Foundation\axis2-1.5.4\lib\axis2-kernel-1.5.4.jar" -jar .\build\lib\SoapClient-test-client.jar
The exception is:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis2/AxisFault
Caused by: java.lang.ClassNotFoundException: org.apache.axis2.AxisFault
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessContr开发者_JAVA技巧oller.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
-jar
makes java ignore any -cp
jars. Adjust the Class-Path in the manifest.
精彩评论