WS AXIS2 webservice on WEBSPHERE 6.1 deployment gives 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.create Context(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.i bm.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.s endToDiscriminators(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


Finally I got out from this problem

Just adding in the war lib the following jars

xml-apis.jar
xercesImpl.jar
xalan.jar

Every thing is correctly found inside the war without conflicts with IBM libaries

链接地址: http://www.djcxy.com/p/41858.html

上一篇: 将JAXB类(不是它的对象)转换为xml模板

下一篇: WEBSPHERE 6.1部署中的WS AXIS2 webservice会给出java.lang.VerifyError