未找到class def WSDL2JAVA axis 1.4

jljoyd4f  于 2023-04-19  发布在  Java
关注(0)|答案(1)|浏览(105)

嘿,我试图得到客户端java类使用轴1.4,但我看到没有类DEF发现,当我试图运行下面的命令从命令提示符...请帮助为什么

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)
6yt4nkrj

6yt4nkrj1#

您需要检查commons-logging.jar是否在您的类路径上(在您的示例中,位于C:\axis-1_4\lib)。请查看本指南的“安装Axis并使用本指南”部分。
UPD:我刚刚想到,你需要使用通配符将“lib”文件夹中的所有jar添加到classpath:C:\axis-1_4\lib*
查看this Oracle documentation

相关问题