java 8 - Getting "Expecting a stackmap frame at branch target" when running Maven integration testing -
i’m using maven 3.2.3 version of java
davea$ echo $java_home /library/java/javavirtualmachines/jdk1.8.0_45.jdk/contents/home
when run
mvn clean install
i errors below in integration tests …
testfindsampleusersbycodeascbydefault(org.mainco.subco.user.service.sampleuserservice2it) time elapsed: 2.204 sec <<< error! java.lang.verifyerror: expecting stackmap frame @ branch target 57 exception details: location: org/mainco/subco/user/service/sampleuserserviceimpl$valuecomparator.compare(lorg/mainco/subco/user/domain/user;lorg/mainco/subco/user/domain/user;)i @10: ifnull reason: expected stackmap frame @ location. bytecode: 0x0000000: 2ab4 001b 2bb9 002e 0200 c600 2f2a b400 0x0000010: 1b2b b900 2e02 00c0 0030 b600 34c6 001c 0x0000020: 2ab4 001b 2bb9 002e 0200 c000 30b6 0034 0x0000030: b600 39b6 003e a700 0512 404e 2ab4 001b 0x0000040: 2cb9 002e 0200 c600 2f2a b400 1b2c b900 0x0000050: 2e02 00c0 0030 b600 34c6 001c 2ab4 001b 0x0000060: 2cb9 002e 0200 c000 30b6 0034 b600 39b6 0x0000070: 003e a700 0512 403a 042d 1904 b600 4436 0x0000080: 0515 0599 0016 2d19 04b6 0044 2d19 04b6 0x0000090: 0044 b800 4a6c a700 0403 3606 1506 2ab4 0x00000a0: 0023 9900 0702 a700 0404 a000 0502 ac04 0x00000b0: ac @ org.mainco.subco.user.service.sampleuserserviceimpl.findsampleusers(sampleuserserviceimpl.java:439) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:497) @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:317) @ org.springframework.aop.framework.reflectivemethodinvocation.invokejoinpoint(reflectivemethodinvocation.java:183) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:150) @ org.springframework.transaction.interceptor.transactioninterceptor$1.proceedwithinvocation(transactioninterceptor.java:96) @ org.springframework.transaction.interceptor.transactionaspectsupport.invokewithintransaction(transactionaspectsupport.java:260) @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:94) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172) @ org.springframework.aop.interceptor.exposeinvocationinterceptor.invoke(exposeinvocationinterceptor.java:91) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:172) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:204) @ com.sun.proxy.$proxy98.findsampleusers(unknown source) @ org.mainco.subco.user.service.sampleuserservice2it.testfindsampleusersbycodeascbydefault(sampleuserservice2it.java:215)
here how compiler plugin configured …
<profile> <id>jdk-8</id> <activation> <jdk>1.8</jdk> </activation> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-compiler-plugin</artifactid> <version>3.1</version> <configuration> <source>1.8</source> <target>1.8</target> <compilerargument>-proc:none</compilerargument> <fork>true</fork> </configuration> <executions> <execution> <id>default-testcompile</id> <phase>test-compile</phase> <goals> <goal>testcompile</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </profile>
and here how failsafe configured
<plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-failsafe-plugin</artifactid> <version>2.18.1</version> <configuration> <reuseforks>true</reuseforks> <argline>-xmx4096m -xx:maxpermsize=512m -xx:-usesplitverifier ${itcoverageagent}</argline> <skiptests>${skipalltests}</skiptests> </configuration> <executions> <execution> <goals> <goal>integration-test</goal> <goal>verify</goal> </goals> </execution> </executions> </plugin>
any ideas how prevent these bizarre “expecting stackmap frame @ branch target” errors i’m seeing?
edit:
i'm using these dependnecies (as speculated comments these problems):
[info] +- org.springframework:spring-aop:jar:3.2.11.release:compile ... [info] +- org.aspectj:aspectjweaver:jar:1.8.6:compile [info] +- org.aspectj:aspectjrt:jar:1.8.6:compile
i had same problem when moved jdk 8. code built fine, got these errors when running unit tests. see using -xx:-usesplitverifier
, didn't work me either. had found short blurb somewhere instead of using -xx:-usesplitverifier
jdk 8, should use -noverify
. gave try , worked me.
hope helps.
Comments
Post a Comment