heyy我正在尝试使用轴1.4获取客户端java类,但是当我尝试从命令提示符运行以下命令时,我看到NO CLASS DEF FOUND ...请帮助原因
WSDL file location: C:\
WSDL2JAVA .class location: C:\axis-1_4\lib\org\apache\axis\wsdl\WSDL2JAVA
C:\>java -classpath \axis-1_4\lib org.apache.axis.wsdl.WSDL2Java -v -o -s d:\gen
erate C:\MyWebService.wsdl
Exception in thread "main" java.lang.NoClassDefFoundError: org.apache.commons.lo
gging.LogFactory
at org.apache.axis.components.logger.LogFactory.class$(LogFactory.java:4
5)
at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:45
)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory
.java:41)
at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java
:33)
at org.apache.axis.i18n.ProjectResourceBundle.<clinit>(ProjectResourceBu
ndle.java:53)
at org.apache.axis.i18n.MessagesConstants.<clinit>(MessagesConstants.jav
a:32)
at org.apache.axis.utils.Messages.<clinit>(Messages.java:36)
at org.apache.axis.wsdl.WSDL2Java.<clinit>(WSDL2Java.java:112)
答案 0 :(得分:1)
您需要检查commons-logging.jar是否在您的类路径中(在您的示例中,位于C:\ axis-1_4 \ lib)。请查看此guide,“安装Axis和使用本指南”部分。
UPD:我刚刚发现,您需要使用通配符将“lib”文件夹中的所有jar添加到类路径中:C:\ axis-1_4 \ lib *