繁体   English   中英

在使用jdk 1.5而不是1.6时运行时,获取getNamespaceContext()的NoSuchMethodError

[英]getting NoSuchMethodError for getNamespaceContext() when running with jdk 1.5 but not with 1.6

我正在运行一个用Java编写的程序,该程序已部署在Oracle应用服务器上,并运行1.5 JVM。以下是堆栈跟踪:

Exception in thread "main" java.lang.NoSuchMethodError: com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.getNamespaceContext()Lcom/sun/org/apache/xerces/internal/xni/NamespaceContext;
 at com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl.<init>(XMLStreamReaderImpl.java:99)
 at com.sun.xml.internal.stream.XMLInputFactoryImpl.getXMLStreamReaderImpl(XMLInputFactoryImpl.java:264)
 at com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:136)
 at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory$Zephyr.newInstance(XMLStreamReaderFactory.java:251)
 at com.sun.xml.ws.api.streaming.XMLStreamReaderFactory.<clinit>(XMLStreamReaderFactory.java:84)
 at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.createReader(RuntimeWSDLParser.java:805)
 at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.resolveWSDL(RuntimeWSDLParser.java:262)
 at com.sun.xml.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:129)
 at com.sun.xml.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:265)
 at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:228)
 at com.sun.xml.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:176)
 at com.sun.xml.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:104)
 at javax.xml.ws.Service.<init>(Service.java:56)
 at com.earthport.bind.MerchantAPIService.<init>(MerchantAPIService.java:50)
 at com.earthport.client.service.stub.MerchantAPIClientImpl$1CustomMerchantAPIService.    <init>(MerchantAPIClientImpl.java:107)
 at     com.earthport.client.service.stub.MerchantAPIClientImpl.createMerchantAPIService(MerchantAPI    ClientImpl.java:111)
 at com.earthport.client.service.stub.MerchantAPIClientImpl.<init>    (MerchantAPIClientImpl.java:84)
 at     com.earthport.client.service.ServiceProxyFactoryImpl.createServiceProxy(ServiceProxyFactoryI    mpl.java:25)
 at utils.AmxEPAccCre.<init>(AmxEPAccCre.java:79)
 at utils.WService.<init>(WService.java:95)
 at utils.WService.main(WService.java:795)
Process exited.

如果我使用jdk 1.6运行完全相同的程序,则该程序可以完美运行。 这是图书馆参考的特定问题吗? 有人以前见过这种异常吗?

干杯。

我敢打赌,您的应用程序或Oracle AppServer附带的Xerces实现与JDK附带的实现之间存在冲突。

它可以与JDK6中的版本一起使用,但与JDK 5中的版本不兼容。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM