gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 05:03:06 25 4
gpt4 key购买 nike

调用时:

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

最佳答案

问题已解决:

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

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

关于java - 使用oracle webservices代理时出现错误: java. lang.NoClassDefFoundError: org/codehaus/stax2/XMLInputFactory2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5993144/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com