Successfully compiled the project and build as well with Maven. This is my first maven project. But I have no idea why I'm getting the below error.
Deployeed the war on tomcat and hit my url and the below error shown in my browser.
java.lang.VerifyError: Expecting a stackmap frame at branch target 72
Exception Details:
Location:
com/ebetinc/frontend/presentation/components/Login.isToteAvailable(Ljava/lang/String;Lcom/ebetinc/frontend/dao/DatabaseDao;)Z @46: lookupswitch
Reason:
Expected stackmap frame at this location.
Bytecode:
0000000: 043d 2bb9 03a4 0100 4e2a c601 1c13 03a6
0000010: 2ab8 03aa 9900 0803 3da7 010d 2db8 03ad
0000020: 9900 692a 3a04 0236 0519 04b6 03b1 ab00
0000030: 0000 003a 0000 0002 0000 0626 0000 002c
0000040: 0000 0644 0000 001a 0019 0413 03b3 b603
0000050: b599 0017 0336 05a7 0011 1904 1303 b7b6
0000060: 03b5 9900 0604 3605 1505 ab00 0000 001c
0000070: 0000 0002 0000 0000 0000 001a 0000 0001
0000080: 0000 001a 033d a700 a02d b803 ba99 0099
0000090: 2a3a 0402 3605 1904 b603 b1ab 0000 006a
00000a0: 0000 0004 0000 af34 0000 0029 0000 af4c
00000b0: 0000 003a 0000 af4d 0000 004b 0015 51cb
00000c0: 0000 005c 1904 1303 bcb6 03b5 9900 3903
00000d0: 3605 a700 3319 0413 03be b603 b599 0028
00000e0: 0436 05a7 0022 1904 1303 c0b6 03b5 9900
00000f0: 1705 3605 a700 1119 0413 03c2 b603 b599
0000100: 0006 0636 0515 05aa 0000 001f 0000 0000
0000110: 0000 0003 0000 001d 0000 001d 0000 001d
0000120: 0000 001d 033d 1cac
Stackmap Table:
append_frame(@28,Integer,Object[#931])
append_frame(@73,Object[#200],Integer)
same_frame(@90)
same_frame(@104)
same_frame(@132)
chop_frame(@134,2)
same_frame(@137)
append_frame(@196,Object[#200],Integer)
same_frame(@213)
same_frame(@230)
same_frame(@247)
same_frame(@261)
same_frame(@292)
chop_frame(@294,2)
Can anyone throw some inputs ? Thanks for any help.
Configuration:
Java 1.7
Maven 3+
Hi this is related to some bytecode in your application. (see this note on compatibility changes for Java 7 http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#incompatibilities, look there some lines below for JSR 202)
You can either
java
with paramter-XX:-UseSplitVerifier
edit Even the answer is already a bit old. Because of a current case I add some more detailed explanation.
The
StackMapTable
attribute in the class file was, even not documented at that time, introduced with Java 6.Foo.java
The class verifier did no check if the attribute was in the class or not.
Following creates the file
Foo.class
without theStackMatTable
attribute.FooDump.java
compile and run it
check that the
StackMapTable
attribute is not in the fileFooDemo.java
With Java 7 the class verification was changed.
For class files version 50 (Java 6) the check had a failover if the
StackMapTable
was missing or wrong (see: jvms-4.10.1).Run the check with the
Foo
class version of Java 6.This failover did not occur anymore for class files version 51 (Java 7).
To create a
Foo
class version of Java 7 amend the code ofFooDump.java
.compile and run it
check that it's a class version 51
In Java 7 the type check for the
StackMapTable
attribute can be disabled to step back to the Java 6 failover mechanism using option UseSplitVerifier.In Java 8 the verification of the
StackMapTable
attribute became mandatory and the optionUseSplitVerifier
was removed.note To use always the initial version of Java 6/7/8 was done by intention to show that the behaviour was there from the beginning.
You might find some suggestions to get it running with Java 8 ...
note This disables the bytecode verifier. Keep in mind to never disable bytecode verification in a production system.
I've had the same problem running a Java 1.7 Web Application on a Java 1.7 Weblogic 12C server, while trying to deploy the error occurs:
From all classes within the project it happened only with the class being instrumented, aClassPathWithClassName (in the error output above).
My local solution:
Locate javassist lib being used by the application on the POM and update it. Here it was 3.10.0.GA, changed to 3.24.1-GA.