preslavrachev / maven-play-plugin

Automatically exported from code.google.com/p/maven-play-plugin
0 stars 0 forks source link

Add "-XX:-UseSplitVerifier" JVM argument to Surefire forked JVM #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Without "-XX:-UseSplitVerifier" JVM argument there are some problems with Play! 
and Java7.

Recently, when running with Java7 I found problems with unit test in 
http://maven-play-plugin.googlecode.com/svn/trunk/test-projects/external-modules
/ebean/ebean-yabe/ sample project. It throws exception:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: 
play.exceptions.JavaExecutionException: Expecting a stack map frame in method 
controllers.Secure$Security.authentify(Ljava/lang/String;Ljava/lang/String;)Z 
at offset 33
    at controllers.Admin.setConnectedUser(Admin.java:13)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:510)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:484)
    at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:479)
    at play.mvc.ActionInvoker.handleBefores(ActionInvoker.java:328)
    at play.mvc.ActionInvoker.invoke(ActionInvoker.java:142)
    at play.test.FunctionalTest$1.execute(FunctionalTest.java:270)
    at play.Invoker$Invocation.run(Invoker.java:278)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)

The same problem is described here: 
http://stackoverflow.com/questions/6704169/verifyerror-expecting-a-stack-map-fra
me-in-method-controllers-securesecurity-a

In all Play! server staring mojos this JVM argument is added to forked JVM, but 
not in JVM forked by Surefire for tests.

There are two possible solutions (I tested both with success):
1. add "-XX:-UseSplitVerifier" JVM argument
2. set "java.source=1.6" in "conf/application.conf" configuration file

I prefer the first one. This argument will be added in default parent pom.

Original issue reported on code.google.com by gslowiko...@gmail.com on 5 Jul 2013 at 7:46

GoogleCodeExporter commented 9 years ago
Added to play-app-default-parent in 
http://code.google.com/p/maven-play-plugin/source/detail?r=11642

Original comment by gslowiko...@gmail.com on 5 Jul 2013 at 7:52

GoogleCodeExporter commented 9 years ago
New snapshot deployed

Original comment by gslowiko...@gmail.com on 5 Jul 2013 at 7:56