我已经使用 Axis2 向我的项目中添加了一个 Web 服务,但现在我无法运行我的应用程序。
这是我正在使用的类路径:
<property name="classpath" location="bin:EventReservationCore/bin:EventReservationCore/db:EventReservationCore/lib/*:EventReservationCore/lib/util_iso2.jar:EventReservationCore/lib/sqlitejdbc-v056.jar:AuthorizationRMI/lib/AuthorizationService.jar:EventReservationCore/lib/activemq-all-5.4.3.jar:/home/ander/axis2-1.6.1/webapp/axis2.war"/>
这是在我添加 Axis2 Web 服务之前一直运行的目标。
<target name="run.besocial">
<java classname="eventReservationServer.ReservationEventServer" classpath="${classpath}" fork="true">
<jvmarg value="-Djava.rmi.server.codebase=file:EventReservationCore/bin/ file:EventReservationCore/lib/util_iso2.jar"/>
<jvmarg value="-Djava.security.policy=EventReservationCore/java.policy" />
</java>
</target>
结果我得到这个错误:
[java] Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/axis2/client/Stub
[java] at java.lang.ClassLoader.defineClass1(Native Method)
[java] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
[java] at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
[java] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
[java] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
[java] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[java] at eventReservationServer.eventServerGateway.WSEventServerGateway.getEvents(WSEventServerGateway.java:19)
[java] at eventReservationServer.ReservationEventServer.<init>(ReservationEventServer.java:101)
[java] at eventReservationServer.ReservationEventServer.main(ReservationEventServer.java:130)
[java] Caused by: java.lang.ClassNotFoundException: org.apache.axis2.client.Stub
[java] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[java] at java.security.AccessController.doPrivileged(Native Method)
[java] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
[java] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[java] at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
[java] ... 15 more