#1795 ✓resolved

Java 7 Support (setting java.source=1.7)

Reported by Simplysoft | March 19th, 2014 @ 09:59 PM


We are trying to get play running with java7 by settings java.source=1.7 in application.conf.
When enabling this, we encounter the well known java.lang.VerifyError errors.
(Switching back to java.source=1.6 solves the problem, but we want to get it to run with 1.7.)

Framework version: git master (master-40215ff)
Platform you're using: Mac OS X / java 7

Reproduction steps:
* Enable java.source=1.7 in application.conf
* Try to run app.


We assume that the error are produced by the outdated libraries that are used to enhance classes. So we have updated several libs, all of them should now support java7:

* org.eclipse.jdt.core to 3.8.3
* javassist to 3.18.1-GA
* commons-javaflow to the latest svn version (2.0 snapshot) (which should support java7) and patched by the play patch
* cglib-nodedep to 3.1
* asm-all to 3.2

But this still does not solve the problem.
Are we missing any other libraries that are involved in byte code manipulation?
Any help is appreciated

Comments and changes to this ticket

  • Alex

    Alex March 20th, 2014 @ 01:23 AM

    • Assigned user set to “Alex”

    How do you run your application? as it must have been fix with #1360.
    Do you add the " -XX:-UseSplitVerifier" in your VM arguments?

  • Matthias Kurz

    Matthias Kurz March 20th, 2014 @ 06:44 AM

    Are you using Oracle's JDK?
    We are currently running Play from the 1.3 branch on the latest Java 7 version with "java.source=1.7" without any problems (with the default libraries).

  • Simplysoft

    Simplysoft March 20th, 2014 @ 10:25 AM

    We are running the app on google app engine. As it appears they don't have the "-XX:-UseSplitVerifier"
    So the only workaround right now is to use java.source=1.6 to prevent the java vm to use the new verifier.

    @Matthias Kurz: Do you run it without "-XX:-UseSplitVerifier"?

  • Matthias Kurz

    Matthias Kurz March 20th, 2014 @ 01:46 PM

    Which version of Play are you running? We are running Play 1.3 from source (the 1.3.x branch).
    In this latest development branch the -XX:-UseSplitVerifier argument gets set automatically already, so we did NOT set it manually.

  • Simplysoft

    Simplysoft March 20th, 2014 @ 01:58 PM

    We did try it with branch master (sha 40215ff). Looks like it is different from the 1.3.x branch. (BTW: is there any documentation whats the difference between master and 1.3.x and 1.2.x)
    We will try with the branch 1.3 just to be sure. But it looks like this will still have the problem with invalid stack map table because the used libraries (e.g. asm 3.3) are known to be not compatible with java7, i.e. not produced valid 51 byte code

    You are right that the argument -XX:-UseSplitVerifier get automatically added. For us this is only the case when we precompile the code before we deploy it to google app engine.
    On google app engine the argument is not present and we do not have any influence on setting this flag.

  • Alex

    Alex October 9th, 2017 @ 03:51 PM

    • State changed from “new” to “resolved”

    Java 7 is supported in 1.3.x

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2>Play framework</h2>

Play makes it easier to build Web applications with Java. It is a clean alternative to bloated Enterprise Java stacks. It focuses on developer productivity and targets RESTful architectures. Learn more on the <a href="http://www.playframework.org">http://www.playframework.org</a> website.<br><br>

<h2>Source code is hosted on github</h2>Check out our repository at <a href="http://github.com/playframework/play">http://github.com/playframework/play</a><br><br>

<h2>Contributing, creating a patch</h2> Please read the <a href="http://play.lighthouseapp.com/projects/57987/contributor-guide">contributor guide</a><br><br>

<h2>Reporting Security Vulnerabilities</h2> Since all bug reports are public, please report any security vulnerability directly to <em>guillaume dot bort at gmail dot com</em>.<br><br>

<h2>Creating a bug report</h2> Bug reports are incredibly helpful, so take time to report bugs and request features in our ticket tracker. We’re always grateful for patches to Play’s code. Indeed, bug reports with attached patches will get fixed far quickly than those without any.<br><br>

Please include as much relevant information as possible including the exact framework version you're using and a code snippet that reproduces the problem.<br><br>

Don't have too much expectations. Unless the bug is really a serious "everything is broken" thing, you're creating a ticket to start a discussion. Having a patch (or a branch on Github we can pull from) is better, but then again we'll only pull high quality branches that make sense to be in the core of Play.