使用oracle webservices代理时使用时出错:java.lang.NoClassDefFoundError: org/codehaus/stax2/XMLInputFactory2

发布于 2024-11-07 17:22:43 字数 2431 浏览 1 评论 0原文

调用时:

GetAccountBalanceResponse resp = services.getAccountBalance(request);

这是完整的错误堆栈:

Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/stax2/XMLInputFactory2
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.getStaXParsedEnvelope(AbstractSOAPImplementation.java:160)
at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.createEnvelope(AbstractSOAPImplementation.java:55)
at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:91)
at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:1573)
at oracle.j2ee.ws.client.StreamingSender._preHandlingHook(StreamingSender.java:711)
at oracle.j2ee.ws.client.StubBase._preHandlingHook(StubBase.java:754)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:208)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:113)
at company.bank.bbank.proxy.runtime.ServicesBinding_Stub.getAccountBalance(ServicesBinding_Stub.java:130)
at company.bank.bbank.proxy.ServicesPortClient.getAccountBalance(ServicesPortClient.java:48)
at company.bank.bbank.client.main(client.java:119)
Caused by: java.lang.ClassNotFoundException: org.codehaus.stax2.XMLInputFactory2
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 25 more

When calling:

GetAccountBalanceResponse resp = services.getAccountBalance(request);

Here is the full error stack:

Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/stax2/XMLInputFactory2
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.getStaXParsedEnvelope(AbstractSOAPImplementation.java:160)
at oracle.j2ee.ws.saaj.soap.AbstractSOAPImplementation.createEnvelope(AbstractSOAPImplementation.java:55)
at oracle.j2ee.ws.saaj.soap.SOAPPartImpl.getEnvelope(SOAPPartImpl.java:91)
at oracle.j2ee.ws.saaj.soap.MessageImpl.getSOAPBody(MessageImpl.java:1573)
at oracle.j2ee.ws.client.StreamingSender._preHandlingHook(StreamingSender.java:711)
at oracle.j2ee.ws.client.StubBase._preHandlingHook(StubBase.java:754)
at oracle.j2ee.ws.client.StreamingSender._sendImpl(StreamingSender.java:208)
at oracle.j2ee.ws.client.StreamingSender._send(StreamingSender.java:113)
at company.bank.bbank.proxy.runtime.ServicesBinding_Stub.getAccountBalance(ServicesBinding_Stub.java:130)
at company.bank.bbank.proxy.ServicesPortClient.getAccountBalance(ServicesPortClient.java:48)
at company.bank.bbank.client.main(client.java:119)
Caused by: java.lang.ClassNotFoundException: org.codehaus.stax2.XMLInputFactory2
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
... 25 more

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

习ぎ惯性依靠 2024-11-14 17:22:43

问题已解决:

将此依赖项添加到您的项目中;

    <dependency>
        <groupId>org.codehaus.woodstox</groupId>
        <artifactId>stax2-api</artifactId>
        <version>3.1.1</version>
    </dependency>

problem solved:

add this dependency to your project;

    <dependency>
        <groupId>org.codehaus.woodstox</groupId>
        <artifactId>stax2-api</artifactId>
        <version>3.1.1</version>
    </dependency>
万劫不复 2024-11-14 17:22:43

快速谷歌搜索会发现 http://woodstox.codehaus.org/ 作为可能的库包含。我猜您要么正在使用这个库,要么正在使用依赖于它的东西。下载 jar 文件并确保在运行应用程序时将其添加到类路径中。

可能的 jar 文件: http ://repository.codehaus.org/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar

A quick google search turns up http://woodstox.codehaus.org/ as a possible library include. I'm guessing you are either using this library or using something that depends on it. Download the jar file and make sure it is added to your classpath when running the application.

Probable jar file: http://repository.codehaus.org/org/codehaus/woodstox/stax2-api/3.1.1/stax2-api-3.1.1.jar

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文