java.lang.VerifyError when migrating web applications from EAP 5 to EAP 6

Solution Unverified - Updated -

Environment

  • JBoss Enterprise Application Platform (EAP) 6.x

Issue

  • When trying to migrate web application from EAP 5 to EAP 6, the following exception is seen:
java.lang.VerifyError: Expecting a stackmap frame at branch target 14 in method com.example.customer.$javassist_read_id()J at offset 10

Resolution

Recompile the web application to use the same major JDK version as the one being used to run JBoss.

If you are using Maven, this can be fixed by adding/changing the compiler plugin to look like this:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.1</version>
    <configuration>
        <source>1.7</source>
        <target>1.7</target>
        <encoding>UTF-8</encoding>
    </configuration>
</plugin>

Root Cause

  • This can happen when JBoss uses JDK 7 while the web application was compiled using JDK 6.

Diagnostic Steps

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.