ClassNotFoundException axiom-api-1.2.7.jar [英] ClassNotFoundException axiom-api-1.2.7.jar

查看:143
本文介绍了ClassNotFoundException axiom-api-1.2.7.jar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Java项目中遇到此异常

I am getting this exception in my java project

Caused by: java.lang.ClassNotFoundException: org.apache.axiom.om.OMDataSource
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.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)

我的课程路径是

C:\axiom-impl-1.2.7.jar;C:\axiom-api-1.2.7.jar;C:\axiom-dom-1.2.7.jar;.;

你能帮我吗?

推荐答案

最终设法解决了此问题。问题是jar里面有一个manifest.mf文件,它定义了类路径。我猜这要比命令提示符下java命令中-classpath选项的任何env变量优先。

Finally managed to resolve this issue. The problem was that the jar had a manifest.mf file inside it which defined the classpath. I guess this takes priority over any env variable of the -classpath option in the java command in command prompt.

这是更改
后的manifest.mf文件清单版本:1.0
蚂蚁版本:Apache Ant 1.8.1
创建于:1.6.0_20-b02(Sun Microsystems Inc.)
内置于:Arcot
主类:com.arcot.csso.credchangereportsvc.CredChangeReportSVC
版本:1.0
类路径:lib / classes lib / TPFService-XBeans-packaged.jar lib / TPFServ
ice-client .jar lib / aspectjrt.jar lib / axis2-kernel-1.4.1.jar lib / commo
ns-lang-2.5.jar lib / log4j-1.2.16.jar lib / ojdbc14-10.2.0.1.0 .jar lib / x
mlbeans-2.4.0.jar ./conf/ lib / axiom-api-1.2.7.jar lib / wsdl4j-1.6.2.jar lib / XmlSchema-1.4.2.jar
lib / commons-logging-1.1.1.jar lib / commons-httpclient-3.1.jar
lib / axiom-impl-1.2.7.jar lib / backport-util-concurrent-3.1.jar lib /neethi-2.0.4.jar lib / commons-codec-1.3.jar

This is my manifest.mf file after changes Manifest-Version: 1.0 Ant-Version: Apache Ant 1.8.1 Created-By: 1.6.0_20-b02 (Sun Microsystems Inc.) Built-By: Arcot Main-Class: com.arcot.csso.credchangereportsvc.CredChangeReportSVC Version: 1.0 Class-Path: lib/classes lib/TPFService-XBeans-packaged.jar lib/TPFServ ice-client.jar lib/aspectjrt.jar lib/axis2-kernel-1.4.1.jar lib/commo ns-lang-2.5.jar lib/log4j-1.2.16.jar lib/ojdbc14-10.2.0.1.0.jar lib/x mlbeans-2.4.0.jar ./conf/ lib/axiom-api-1.2.7.jar lib/wsdl4j-1.6.2.jar lib/XmlSchema-1.4.2.jar lib/commons-logging-1.1.1.jar lib/commons-httpclient-3.1.jar lib/axiom-impl-1.2.7.jar lib/backport-util-concurrent-3.1.jar lib/neethi-2.0.4.jar lib/commons-codec-1.3.jar

这篇关于ClassNotFoundException axiom-api-1.2.7.jar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆