WEBSPHERE 6.1 部署上的 JAX-WS AXIS2 Web 服务出现 java.lang.VerifyError
我正在尝试在 websphere 6.1 上部署基于 jax ws axis2 的 Web 服务。它在 tomcat 5.5 中正常工作
我一直在按照此链接提供的 axis2 在线文档中描述的步骤
避免与 WebSphere 的 JAX-WS 运行时发生冲突
该服务似乎部署正确(系统输出中没有消息错误),并且在请求时返回 wsdl 文件。我还可以使用 Web 服务上的模块来进行日志记录。
从客户端调用服务时出现问题:它返回一个 WebFault
服务器上的 Stacktrace 如下
[12 年 10 月 2 日 16.58.59:861 CET] 0000001e FactoryRegist E org.apache.axis2.jaxws.registry.FactoryRegistry null com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl 处的 java.lang.VerifyError。(RuntimeBuiltinLeafInfoImpl.java:224) 在 java.lang.J9VMInternals.initializeImpl(本机方法) 处 java.lang.J9VMInternals.initialize(J9VMInternals.java:194) 在 com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.(RuntimeTypeInfoSetImpl.java:61) 在 com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:127) 在 com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:79) 在 com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:152) 在 com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.(RuntimeModelBuilder.java:87) 在 com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422) 在 com.sun.xml.bind.v2.runtime.JAXBContextImpl。(JAXBContextImpl.java:286) 在 com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139) 在 com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117) 在 sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法) 处 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) 在 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 在 java.lang.reflect.Method.invoke(Method.java:618) 处 javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:214) 位于 javax.xml.bind.ContextFinder.find(ContextFinder.java:375) 位于 javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574) 在 javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522) 在 org.apache.axis2.jaxws.addressing.factory.impl.JAXWSEndpointReferenceFactoryImpl$1.run(JAXWSEndpointReferenceFactoryImpl.java:61) 在 org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132) 在 org.apache.axis2.jaxws.addressing.factory.impl.JAXWSEndpointReferenceFactoryImpl。(JAXWSEndpointReferenceFactoryImpl.java:56) 在 org.apache.axis2.jaxws.registry.FactoryRegistry.init(FactoryRegistry.java:122) 在 org.apache.axis2.jaxws.registry.FactoryRegistry。(FactoryRegistry.java:97) 在 java.lang.J9VMInternals.initializeImpl(本机方法) 处 java.lang.J9VMInternals.initialize(J9VMInternals.java:194) 在 org.apache.axis2.jaxws.message.util.MessageUtils.getMessageFromMessageContext(MessageUtils.java:145) 在 org.apache.axis2.jaxws.core.MessageContext.(MessageContext.java:120) 在 org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:124) 在 org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181) 在 org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172) 在 org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146) 在 wgs.v3.servlet.JetAxisServlet.doPost(JetAxisServlet.java:30) 处 javax.servlet.http.HttpServlet.service(HttpServlet.java:763) 在 javax.servlet.http.HttpServlet.service(HttpServlet.java:856) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1096) 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:570) 在 com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478) 在 com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3444) 在 com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267) 在 com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815) 在 com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466) 在 com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119) 在 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458) 在 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387) 在 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267) 在 com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214) 在 com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113) 在 com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) 在 com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) 在 com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) 在 com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) 处 com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195) 位于 com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743) 在 com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873) 处 com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
解决这个问题并查看库的源代码,发现错误发生在 JAXBContext newIstance 方法中,
启用类上的跟踪日志加载器显示为从 PARENT 加载 javax.xml.datatype.DatatypeConstants 类,因为在 WAR 模块中找不到它,这会给出 java.lang.VerifyError
我找不到解决方案
I'm trying to deploy a web service based on jax ws axis2 on websphere 6.1. It works properly in tomcat 5.5
I've been following the steps described in the axis2 online documentation available at this link
Avoiding conflicts with WebSphere's JAX-WS runtime
THe service seems to deploy properly (no message errors in System out) and the return the wsdl file when requested. I'm also able to engage a module on web service for logging purposes.
The problem comes out when invoking the service from a client: it returns a WebFault
Stacktrace on the server is as follow
[10/02/12 16.58.59:861 CET] 0000001e FactoryRegist E
org.apache.axis2.jaxws.registry.FactoryRegistry null
java.lang.VerifyError at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.(RuntimeBuiltinLeafInfoImpl.java:224)
at java.lang.J9VMInternals.initializeImpl(Native Method) at
java.lang.J9VMInternals.initialize(J9VMInternals.java:194) at
com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.(RuntimeTypeInfoSetImpl.java:61)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:127)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:79)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:152)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.(RuntimeModelBuilder.java:87)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:422)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.(JAXBContextImpl.java:286)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:139)
at
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:117)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618) at
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:214) at
javax.xml.bind.ContextFinder.find(ContextFinder.java:375) at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574) at
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522) at
org.apache.axis2.jaxws.addressing.factory.impl.JAXWSEndpointReferenceFactoryImpl$1.run(JAXWSEndpointReferenceFactoryImpl.java:61)
at
org.apache.axis2.java.security.AccessController.doPrivileged(AccessController.java:132)
at
org.apache.axis2.jaxws.addressing.factory.impl.JAXWSEndpointReferenceFactoryImpl.(JAXWSEndpointReferenceFactoryImpl.java:56)
at
org.apache.axis2.jaxws.registry.FactoryRegistry.init(FactoryRegistry.java:122)
at
org.apache.axis2.jaxws.registry.FactoryRegistry.(FactoryRegistry.java:97)
at java.lang.J9VMInternals.initializeImpl(Native Method) at
java.lang.J9VMInternals.initialize(J9VMInternals.java:194) at
org.apache.axis2.jaxws.message.util.MessageUtils.getMessageFromMessageContext(MessageUtils.java:145)
at
org.apache.axis2.jaxws.core.MessageContext.(MessageContext.java:120)
at
org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:124)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
at wgs.v3.servlet.JetAxisServlet.doPost(JetAxisServlet.java:30) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1096)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:570)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at
com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3444)
at
com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1466)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:119)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136) at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195) at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873) at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
Working on this problem and looking around the source code of the libaries it comes out that the error occurs in JAXBContext newIstance method
enabling the trace log on class loader is shown as the javax.xml.datatype.DatatypeConstants class is loaded from PARENT because it's not found in the WAR module and this gives the java.lang.VerifyError
I'm not able to find a solution
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后我摆脱了这个问题
只需在 war lib 中添加以下 jars
在 war 中正确找到所有内容,而不与 IBM libaries 发生冲突
Finally I got out from this problem
Just adding in the war lib the following jars
Every thing is correctly found inside the war without conflicts with IBM libaries