Using jdk 1.8.0_51 source=1.7, target=1.7 Junit 4.6, ant 1.8.0
What is happening?
All the tests which were passing with 1.7 are now failing.
I need to know the following:
- Why is this happening ?
- Is there an option like -XX:-UseSplitVerifier(java 1.7)
- How to find out the root cause of the problem ?
- What are the steps to be taken to resolve this issue ?
We have ant targets for build, deploy, test.
Build and deploy are working without problems but Junit tests are failing in all the modules.
I tried upgrading ant(1.8.9), junit 4.10.
Could this be because of any jar which is not compiled with java 1.8?
Should i ensure all jars which i use are compiled with java8 ? If it is then , it could be a bad sign :(
I tried running junit through command prompt and it worked.
java -cp ./target/package-test:./target/mycompany-common.jar:./lib/junit-4.6.jar org.junit.runner.JUnitCore com.mycompany.JunitTest
===================================================================================== Tests: 1 Batches: 1 Threads: 1 Host: remote ===================================================================================== TEST RUN FAIL ERR SKIP DURATION JunitTest 1 1 0.068 sec ------------------------------------------------------------------------------------- TOTAL 1 1 ===================================================================================== The following tests had failures or errors: com.mycompany.JunitTest The failures and errors can be seen in the following files: /target/reports/junit/TEST-com.mycompany.JunitTest.txt Results of first failed test: Testsuite: com.mycompany.JunitTest Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.068 sec Testcase: test took 0.018 sec Caused an ERROR Expecting a stackmap frame at branch target 65 Exception Details: Location: com/mycompany/Identifier.equals(Ljava/lang/Object;)Z @26: ifne Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 033d 11ff ff3e 1215 1100 35b8 001b 2bc1 0x0000010: 0002 1100 353d 1100 003e 9a00 271c 1100 0x0000020: 35a0 0016 1d11 0000 a000 0f12 151c 1d04 0x0000030: b800 4111 ffff 3e12 1511 0036 b800 1b03 0x0000040: ac1d 9b00 0f12 151c 1d03 b800 4111 ffff 0x0000050: 3e12 1511 0039 b800 1b2b c000 023a 0412 0x0000060: 1511 003a b800 1b2a b400 2619 04b4 0026 0x0000070: b600 43ac Stackmap Table: same_frame_extended(@89) java.lang.VerifyError: Expecting a stackmap frame at branch target 65 Exception Details: Location: com/mycompany/Identifier.equals(Ljava/lang/Object;)Z @26: ifne Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 033d 11ff ff3e 1215 1100 35b8 001b 2bc1 0x0000010: 0002 1100 353d 1100 003e 9a00 271c 1100 0x0000020: 35a0 0016 1d11 0000 a000 0f12 151c 1d04 0x0000030: b800 4111 ffff 3e12 1511 0036 b800 1b03 0x0000040: ac1d 9b00 0f12 151c 1d03 b800 4111 ffff 0x0000050: 3e12 1511 0039 b800 1b2b c000 023a 0412 0x0000060: 1511 003a b800 1b2a b400 2619 04b4 0026 0x0000070: b600 43ac Stackmap Table: same_frame_extended(@89) at com.mycompany.JunitTest.test(JunitTest.java:17)