How to resolve java.lang.VerifyError: JVMVRFY012 inconsistent stack form; class = com / sun / xml / mail / saaj / soap / SOAPDocumentImpl

advertisements

I am getting the below error when calling SOAP based webservice from SOAP client. This WebService is deployed in Websphere 8.5.0 with IBM JDK 7.0. however i am able to successfully call and get the response from the same WebService, when i deploy the same ear in WAS with IBM JDK 6.0.Any inputs on how to resolve this issue would be much appreciated.

java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=com/sun/xml/messaging/saaj/soap/SOAPDocumentImpl, method=createDocumentFragment()Lorg/w3c/dom/DocumentFragment;, pc=5 at java.lang.J9VMInternals.verifyImpl(Native Method) at java.lang.J9VMInternals.verify(J9VMInternals.java:94) at java.lang.J9VMInternals.initialize(J9VMInternals.java:169) at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.(SOAPPartImpl.java:106) at com.sun.xml.messaging.saaj.soap.ver1_2.SOAPPart1_2Impl.(SOAPPart1_2Impl.java:69) at com.sun.xml.messaging.saaj.soap.ver1_2.Message1_2Impl.getSOAPPart(Message1_2Impl.java:89) at com.sun.xml.messaging.saaj.soap.MessageImpl.initCharsetProperty(MessageImpl.java:1491) at com.sun.xml.messaging.saaj.soap.MessageImpl.init(MessageImpl.java:552) ... 47 more


The issue was due conflict between the WAS provided Libraries vs WebApp libraries.Finally i am able to fix this issue by making the fallowing changes. Now i am able to deploy the same application on WAS 8.5.0, 8.5.5 with IBM Java 6 or 7.

  1. Set the WebModule level class loader property to Class loaded with local class loader first (parent last). This can be achieved by using WebSphere admin console

    Applications-> All Applications->Select Application Name->Manage Modules->select a module->class loader order

  2. Removed the below dependencies from my project pom

    wsdl4j, axis-saaj, axis-jaxrpc, org.apache.axis, xml-apis,commons-discovery, jaxb-core

  3. Added the below dependencies to my project pom

    xalan, xercesImpl, jaxb-apis, jaxb-impl