JAX-WS 客户端在重新部署后无法连接(SymbolTable 中的 NullPointerException)

发布于 2024-12-06 20:17:14 字数 2258 浏览 1 评论 0原文

当我们使用 jax-ws 客户端重新部署 Web 应用程序时,客户端无法连接到 Web 服务。连接到服务器时抛出此异常:

java.lang.NullPointerException: null
at com.ctc.wstx.util.SymbolTable.findSymbol(SymbolTable.java:385) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1833) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2963) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2907) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.handleRootElem(BasicStreamReader.java:2049) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2029) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1100) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:81) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:78) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:99) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:89) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.hasWSDLDefinitions(RuntimeWSDLParser.java:231) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:141) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:256) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:219) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:167) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:95) ~[na:1.7.0-ea]
at javax.xml.ws.Service.<init>(Service.java:77) ~[na:1.7.0-ea]

重新启动 TomCat 后,客户端可以再次成功连接到服务器。 (使用 JDK 6 和 JDK 7 进行测试)

When we redeploy our webapplication with an jax-ws client, the client can not connect to the webservice. While connecting to the server it throws this exception:

java.lang.NullPointerException: null
at com.ctc.wstx.util.SymbolTable.findSymbol(SymbolTable.java:385) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.StreamScanner.parseLocalName(StreamScanner.java:1833) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.handleNsAttrs(BasicStreamReader.java:2963) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.handleStartElem(BasicStreamReader.java:2907) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.handleRootElem(BasicStreamReader.java:2049) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2029) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1100) ~[woodstox-core-asl-4.0.8.jar:4.0.8]
at com.sun.xml.internal.ws.util.xml.XMLStreamReaderFilter.next(XMLStreamReaderFilter.java:81) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.next(XMLStreamReaderUtil.java:78) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextContent(XMLStreamReaderUtil.java:99) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.streaming.XMLStreamReaderUtil.nextElementContent(XMLStreamReaderUtil.java:89) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.hasWSDLDefinitions(RuntimeWSDLParser.java:231) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:141) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.wsdl.parser.RuntimeWSDLParser.parse(RuntimeWSDLParser.java:120) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.client.WSServiceDelegate.parseWSDL(WSServiceDelegate.java:256) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:219) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:167) ~[na:1.7.0-ea]
at com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:95) ~[na:1.7.0-ea]
at javax.xml.ws.Service.<init>(Service.java:77) ~[na:1.7.0-ea]

After restarting TomCat the client could successfully connect to the sever again.
(Tested with JDK 6 and JDK 7)

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

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

发布评论

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

评论(1

且行且努力 2024-12-13 20:17:15

我们将使用 spring-ws 来代替,经过重新部署测试没有问题。

We'll use spring-ws instead, tested with redeploying without a problem.

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