简体   繁体   中英

java.lang.VerifyError: JVMVRFY012 stack shape inconsistent;

I am getting the following error while deploying a Maven project in WAS 8.5.5.

I have installed JDK 1.6 and 1.7 in WAS.

Error 500: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.VerifyError: JVMVRFY012 stack shape inconsistent; class=com/xyz/simtools/savings/jaxb/SavingsInput_JAXB_Deserialization_Stub, method=write(ILjava/lang/Object;)V, pc=356

Things I noticed:

  1. In Tomcat, it's working fine
  2. There was some fix for this in IBM JDK according to this but it is still not working for me

Things I tried:

  1. Tried with both JDK versions in WAS.
  2. Read this link in IBM Forum
  3. Compiled my project in 1.5 and 1.7 and tried deploying

Am I missing something? Any other changes which I need to take care of?

I had the same issue, but in my case the problem and the fix was a different thing.

(Possible) cause: My verdict regarding the cause of the problem was the conflict between two version implementations of the same API . At the design time , at my workstation (according established rules of the place I am), my IDE was using the SAAJ 1.4 of IBM JDK implementation to compile my Web Services classes.

IBM\jdk\jre\lib\rt.jar/com\sun\xml\internal\messaging\saaj\soap\SOAPDocumentImpl.class

At runtime , using Tomee(Tomcat) 1.7.3, the same class were being loaded throughout the path:

$TOMEE_HOME\lib\saaj-impl-1.3.18.jar/com\sun\xml\internal\messaging\saaj\soap\SOAPDocumentImpl.class

And this was causing the verify error at the time the Web Services were executed:

  • java.lang.VerifyError: JVMVRFY012 stack shape inconsistent;
  • (In Portuguese): java.lang.VerifyError: JVMVRFY012 formato de pilha inconsistente;

Workaround : Simply, take the saaj-impl-1.3.18.jar out of the Tomee's lib folder (move it). As the Tomee/Tomcat was using the same IBM JDK as my IDE, I found out that the conflict could be because of the saaj-impl-1.3.18.jar localized at the Tomee's lib folder. Moving out of there, make Tomee use the same implementation at runtime that were used at compile time (IBM JDK).

Pay attention that I had this problem at my development workstation, is not a developlment/production(host) environment. Because of the rules of the workstation profile, this is the workaround that I found out works to me.

Well finally i figured it out..

Analysis : The issue occurred because of "jaxb" dependency version. In some of my dependency projects "jaxb" dependency was not included in ivy.xml... This allowed the compiler to take the jaxb present in JDK as dependency. However in other dependency projects, "jaxb" dependency was explicitly defined in ivy with some version ... Because of this, Dependency projects were compiled with different verion of jaxb which would eventually through "VerifyError" wrt to jaxb.

Solution : Issue is resolved by adding "jaxb" version in ivy for dependency projects which didnt explicitly have jaxb version as well as in main project as Maven dependency.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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