#1800 ✓resolved
Andrei Solntsev

Support Java 8

Reported by Andrei Solntsev | April 11th, 2014 @ 08:26 PM | in 1.4.x

We want to run Play1 applications with Java 8.
The first problem is that "-XX:-UseSplitVerifier" option is not supported by Java8.
I suggest using "-noverify" option instead of "-XX:-UseSplitVerifier" - it should work with both Java7 and Java8.

Framework version: 1.2.7
Platform you're using: Windows, Unix, Mac OS

Reproduction steps: Run any Play! application with Java 8

Details:
I have created a Pull Request that resolves this issue: https://github.com/playframework/play1/pull/743.
We have been testing this pull request for several weeks, and confirm that it works stably.

Comments and changes to this ticket

  • Play Duck

    Play Duck April 15th, 2014 @ 12:46 AM

    (from [8ffc86bdfe83822ea64a3ec9385d72566262b48f]) [#1800] Remove unused javassist-3.15.0.GA.jar lib [#1800] Update dependencies.yml file [#1800] Update eclipsify command https://github.com/playframework/play1/commit/8ffc86bdfe83822ea64a3...

  • Play Duck

    Play Duck April 15th, 2014 @ 12:46 AM

    (from [8ffc86bdfe83822ea64a3ec9385d72566262b48f]) [#1800] Remove unused javassist-3.15.0.GA.jar lib [#1800] Update dependencies.yml file [#1800] Update eclipsify command https://github.com/playframework/play1/commit/8ffc86bdfe83822ea64a3...

  • Play Duck

    Play Duck April 15th, 2014 @ 12:46 AM

    (from [8ffc86bdfe83822ea64a3ec9385d72566262b48f]) [#1800] Remove unused javassist-3.15.0.GA.jar lib [#1800] Update dependencies.yml file [#1800] Update eclipsify command https://github.com/playframework/play1/commit/8ffc86bdfe83822ea64a3...

  • Play Duck
  • Play Duck
  • Play Duck

    Play Duck April 15th, 2014 @ 01:17 AM

    (from [722fa14b3f6f07e9d2349dba42c0a224d37c05cc]) [#1800] Remove unused javassist-3.15.0.GA.jar lib [#1800] Update dependencies.yml file [#1800] Update eclipsify command

    Conflicts:
    framework/lib/javassist-3.15.0.GA.jar https://github.com/playframework/play1/commit/722fa14b3f6f07e9d2349...

  • Play Duck

    Play Duck April 15th, 2014 @ 01:17 AM

    (from [722fa14b3f6f07e9d2349dba42c0a224d37c05cc]) [#1800] Remove unused javassist-3.15.0.GA.jar lib [#1800] Update dependencies.yml file [#1800] Update eclipsify command

    Conflicts:
    framework/lib/javassist-3.15.0.GA.jar https://github.com/playframework/play1/commit/722fa14b3f6f07e9d2349...

  • Play Duck

    Play Duck April 15th, 2014 @ 01:17 AM

    (from [722fa14b3f6f07e9d2349dba42c0a224d37c05cc]) [#1800] Remove unused javassist-3.15.0.GA.jar lib [#1800] Update dependencies.yml file [#1800] Update eclipsify command

    Conflicts:
    framework/lib/javassist-3.15.0.GA.jar https://github.com/playframework/play1/commit/722fa14b3f6f07e9d2349...

  • Play Duck

    Play Duck April 15th, 2014 @ 01:29 AM

    (from [4521b8026b13ada18439120af2f8a4e8a79b7471]) [#1800] Remove unused javassist-3.15.0.GA.jar lib [#1800] Update dependencies.yml file [#1800] Update eclipsify command

    Conflicts:
    framework/dependencies.yml framework/pym/play/commands/eclipse.py https://github.com/playframework/play1/commit/4521b8026b13ada184391...

  • Play Duck

    Play Duck April 15th, 2014 @ 01:29 AM

    (from [4521b8026b13ada18439120af2f8a4e8a79b7471]) [#1800] Remove unused javassist-3.15.0.GA.jar lib [#1800] Update dependencies.yml file [#1800] Update eclipsify command

    Conflicts:
    framework/dependencies.yml framework/pym/play/commands/eclipse.py https://github.com/playframework/play1/commit/4521b8026b13ada184391...

  • Play Duck

    Play Duck April 15th, 2014 @ 01:29 AM

    (from [4521b8026b13ada18439120af2f8a4e8a79b7471]) [#1800] Remove unused javassist-3.15.0.GA.jar lib [#1800] Update dependencies.yml file [#1800] Update eclipsify command

    Conflicts:
    framework/dependencies.yml framework/pym/play/commands/eclipse.py https://github.com/playframework/play1/commit/4521b8026b13ada184391...

  • Alex

    Alex April 15th, 2014 @ 02:13 AM

    • State changed from “new” to “inprogress”
    • Tag set to compiler, jdk1.8
    • Assigned user set to “Alex”
    • Milestone set to 1.3

    Support for running with JDK8.
    Merged in master, 1.2.x and 1.3.x

  • Matthias Kurz

    Matthias Kurz April 15th, 2014 @ 11:05 AM

    Hi Alex!

    Thanks for the work!

    When I tried to set
    java.source=1.8
    in application.conf however, it doesn't work.
    In the play.classloading.ApplicationCompiler constructor around line 59, the javaVersion should be set to 1.8 like:
    javaVersion = CompilerOptions.VERSION_1_8;
    The problem is the CompilerOptions.VERSION_1_8 constant does not exist yet in the org.eclipse.jdt.core-3.7.1.v_B76_R37x dependency.
    I tried to update the dependency without luck yet, maybe you can give it a shot?
    Thanks!

  • Alex

    Alex April 16th, 2014 @ 12:12 AM

    Hi Matthias,
    thanks , i saw that, that's why I wrote "running with jdk8", I mean you java code 1.7 can run under java8, that's all for this commit done by another.

    For the java 8 support, there is another PR I am working on https://github.com/playframework/play1/pull/748, You cannot use it in the previous version as the compiler was not updated.

    I will add a new project sample today for java8, and merged it if is ok.

  • Play Duck

    Play Duck April 16th, 2014 @ 03:57 AM

    (from [3d625c41677ad178676adc2ed4c62c1a3e5434ee]) Merge pull request #748 from xael-fry/1800_updateCompilerJava8

    [#1800] Update compiler for support to java 8 https://github.com/playframework/play1/commit/3d625c41677ad178676ad...

  • Play Duck
  • Play Duck
  • Play Duck
  • Matthias Kurz

    Matthias Kurz April 16th, 2014 @ 09:06 AM

    Thanks for all your work and efforts Alex!

  • Play Duck

    Play Duck April 18th, 2014 @ 06:09 AM

    (from [3b7d7be90cfac1f60e722aacca577e8f5da25ef5]) [#1800] Update javadoc to link to Java8 [#1800] Add example for java8

    Conflicts:
    framework/pym/play/commands/javadoc.py https://github.com/playframework/play1/commit/3b7d7be90cfac1f60e722...

  • Play Duck

    Play Duck April 18th, 2014 @ 06:09 AM

    (from [3b7d7be90cfac1f60e722aacca577e8f5da25ef5]) [#1800] Update javadoc to link to Java8 [#1800] Add example for java8

    Conflicts:
    framework/pym/play/commands/javadoc.py https://github.com/playframework/play1/commit/3b7d7be90cfac1f60e722...

  • Play Duck
  • Play Duck
  • Play Duck
  • Play Duck
  • Alex

    Alex April 18th, 2014 @ 06:17 AM

    • State changed from “inprogress” to “resolved”

    Merged and pushed in master, 1.2.x and 1.3.x

  • Chris Webb

    Chris Webb April 20th, 2014 @ 09:44 AM

    Hello,

    I've just tried to run my application using the latest commit of v1.3.x and Java 8 and I'm getting this exception, which is the first of many similar...

    chris$ /usr/local/play-1.3.x-16a9b3f/play run  
    ~        _            _ 
    ~  _ __ | | __ _ _  _| |
    ~ | '_ \| |/ _' | || |_|
    ~ |  __/|_|\____|\__ (_)
    ~ |_|            |__/   
    ~
    ~ play! 1.3.x-16a9b3f, http://www.playframework.org
    ~
    ~ Ctrl+C to stop
    ~ 
    objc[15390]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.  
    Listening for transport dt_socket at address: 8000  
    10:33:50,961 [main] INFO  ~ Starting /Users/chris/git/PTAsocial-MVP  
    :: loading settings :: url = jar:file:/usr/local/play-1.3.x-16a9b3f/framework/lib/ivy-2.3.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
    10:33:51,196 [main] INFO  ~ Module crud is available (/usr/local/play-1.3.x-16a9b3f/modules/crud)  
    10:33:51,196 [main] INFO  ~ Module fastergt is available (/Users/chris/git/PTAsocial-MVP/modules/fastergt-1.8)  
    10:33:51,196 [main] INFO  ~ Module db is available (/Users/chris/git/PTAsocial-MVP/local-modules/db-1.1.2)  
    10:33:51,197 [main] INFO  ~ Module accesslog is available (/usr/local/play-1.3.x-16a9b3f/modules/accesslog-1.2)  
    10:33:51,197 [main] INFO  ~ Module deadbolt is available (/usr/local/play-1.3.x-16a9b3f/modules/deadbolt-1.5.4)  
    10:33:51,197 [main] INFO  ~ Module coffee is available (/usr/local/play-1.3.x-16a9b3f/modules/coffee-1.0)  
    10:33:51,197 [main] INFO  ~ Module securesocial is available (/Users/chris/git/PTAsocial-MVP/local-modules/securesocial-0.2.7)  
    10:33:51,197 [main] INFO  ~ Module morphia is available (/Users/chris/git/PTAsocial-MVP/modules/morphia-1.4.0)  
    10:33:52,110 [main] INFO  ~ Loaded image cleaner plugin  
    10:33:52,308 [main] WARN  ~ You're running Play! in DEV mode  
    10:33:52,376 [main] INFO  ~ Listening for HTTP on port 9000 (Waiting a first request to start) ...  
    ~ Server is up and running
    10:33:59,641 [play-thread-1] ERROR ~ Error in ControllersEnhancer. controllers.Application.updateAccess has not been properly enhanced (fieldAccess javassist.expr.FieldAccess@7de7f493).  
    java.lang.RuntimeException: Trying to visit uncompiled class while enhancing. Uncompiled class: models.User  
        at play.classloading.enhancers.Enhancer$ApplicationClassesClasspath.openClassfile(Enhancer.java:75)
        at javassist.ClassPoolTail.openClassfile(ClassPoolTail.java:323)
        at javassist.ClassPool.openClassfile(ClassPool.java:642)
        at javassist.CtClassType.getClassFile2(CtClassType.java:187)
        at javassist.CtClassType.makeFieldCache(CtClassType.java:848)
        at javassist.CtClassType.getMembers(CtClassType.java:839)
        at javassist.CtClassType.getDeclaredField2(CtClassType.java:973)
        at javassist.CtClassType.getField2(CtClassType.java:927)
        at javassist.CtClassType.getField(CtClassType.java:908)
        at javassist.CtClass.getField(CtClass.java:798)
        at javassist.expr.FieldAccess.getField(FieldAccess.java:114)
        at play.classloading.enhancers.ControllersEnhancer$1.edit(ControllersEnhancer.java:49)
        at javassist.expr.ExprEditor.loopBody(ExprEditor.java:198)
        at javassist.expr.ExprEditor.doit(ExprEditor.java:91)
        at javassist.CtBehavior.instrument(CtBehavior.java:712)
        at play.classloading.enhancers.ControllersEnhancer.enhanceThisClass(ControllersEnhancer.java:44)
        at play.CorePlugin.enhance(CorePlugin.java:297)
        at play.plugins.PluginCollection.enhance(PluginCollection.java:561)
        at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:235)
        at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:168)
        at play.classloading.ApplicationClassloader.loadClass(ApplicationClassloader.java:85)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:411)
        at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)
        at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:564)
        at org.codehaus.groovy.control.ResolveVisitor.resolveToClass(ResolveVisitor.java:709)
        at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:275)
        at org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:243)
        at org.codehaus.groovy.control.ResolveVisitor.transformPropertyExpression(ResolveVisitor.java:881)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:744)
        at org.codehaus.groovy.control.ResolveVisitor.transformMethodCallExpression(ResolveVisitor.java:1086)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:750)
        at org.codehaus.groovy.control.ResolveVisitor.transformBinaryExpression(ResolveVisitor.java:984)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:748)
        at org.codehaus.groovy.ast.expr.MapEntryExpression.transformExpression(MapEntryExpression.java:41)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:759)
        at org.codehaus.groovy.ast.expr.Expression.transformExpressions(Expression.java:63)
        at org.codehaus.groovy.ast.expr.MapExpression.transformExpression(MapExpression.java:61)
        at org.codehaus.groovy.control.ResolveVisitor.transform(ResolveVisitor.java:759)
        at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitReturnStatement(ClassCodeExpressionTransformer.java:101)
        at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:47)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:165)
        at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1341)
        at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitTryCatchFinally(CodeVisitorSupport.java:82)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitTryCatchFinally(ClassCodeVisitorSupport.java:230)
        at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit(TryCatchStatement.java:42)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:165)
        at org.codehaus.groovy.control.ResolveVisitor.visitBlockStatement(ResolveVisitor.java:1341)
        at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
        at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:50)
        at org.codehaus.groovy.control.ResolveVisitor.visitConstructorOrMethod(ResolveVisitor.java:173)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
        at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
        at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1284)
        at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:148)
        at org.codehaus.groovy.control.CompilationUnit$9.call(CompilationUnit.java:605)
        at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:843)
        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:548)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:497)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:480)
        at play.template2.compile.GTGroovyCompileToClass.compileGroovySource(GTGroovyCompileToClass.java:71)
        at play.template2.compile.GTCompiler.compile(GTCompiler.java:82)
        at play.template2.GTTemplateRepo.compileTemplate(GTTemplateRepo.java:296)
        at play.template2.GTTemplateRepo.getTemplateInstance(GTTemplateRepo.java:185)
        at play.template2.GTTemplateRepo.getTemplateInstance(GTTemplateRepo.java:140)
        at play.template2.GTJavaBase.internalRenderTemplate(GTJavaBase.java:133)
        at play.modules.gtengineplugin.gt_integration.GTJavaBase1xImpl.internalRenderTemplate(GTJavaBase1xImpl.java:82)
        at play.template2.GTJavaBase.renderTemplate(GTJavaBase.java:97)
        at play.modules.gtengineplugin.GTTemplate.renderGTTemplate(GTTemplate.java:93)
        at play.modules.gtengineplugin.GTTemplate.internalGTRender(GTTemplate.java:75)
        at play.modules.gtengineplugin.GTTemplate.internalRender(GTTemplate.java:54)
        at play.modules.gtengineplugin.GTTemplate.render(GTTemplate.java:128)
        at play.server.PlayHandler.serve500(PlayHandler.java:792)
        at Invocation.HTTP Request(Play!)
    

    Any idea what might be causing this?

    rgds,
    Chris

  • Alex

    Alex April 20th, 2014 @ 11:54 AM

    Hi @Chris, do you set java.source=1.8? do clean the project before running it?
    Do you have the same problem with the samples-and-tests/java8Support project?

  • Nicolas Leroux

    Nicolas Leroux April 20th, 2014 @ 11:56 AM

    It can be that the byte code enhancement is not compatible with the new java 8 byte code, so yes a clean is needed.

  • Chris Webb

    Chris Webb April 20th, 2014 @ 06:22 PM

    Hi Alex, definitely did a clean first but I did have java.source set to 1.7. Would that cause an issue?

  • Nicolas Leroux

    Nicolas Leroux April 20th, 2014 @ 06:29 PM

    Yes it would be a pb. Can you try to remove the java source? Thanks

  • Chris Webb

    Chris Webb April 20th, 2014 @ 11:22 PM

    Ok with java.source set to 1.8 or not set at all I get past the issue above but then I get another exception:

    @6i1g1pnk0
    Internal Server Error (500) for request GET /community-events?showPast=false
    
    Execution exception (In /app/models/User.java around line 831)  
    GTAppClassException occured : null
    
    play.exceptions.JavaExecutionException  
        at play.modules.gtengineplugin.GTTemplate.renderGTTemplate(GTTemplate.java:121)
        at play.modules.gtengineplugin.GTTemplate.internalGTRender(GTTemplate.java:75)
        at play.modules.gtengineplugin.GTTemplate.internalRender(GTTemplate.java:54)
        at play.modules.gtengineplugin.GTTemplate.render(GTTemplate.java:128)
        at play.mvc.results.RenderTemplate.<init>(RenderTemplate.java:24)
        at play.mvc.Controller.renderTemplate(Controller.java:676)
        at play.mvc.Controller.renderTemplate(Controller.java:656)
        at play.mvc.Controller.render(Controller.java:713)
        at controllers.Application.communityEvents(Application.java:250)
        at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:556)
        at play.mvc.ActionInvoker.invoke(ActionInvoker.java:507)
        at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:483)
        at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:478)
        at play.mvc.ActionInvoker.invoke(ActionInvoker.java:160)
        at Invocation.HTTP Request(Play!)
    Caused by: play.template2.exceptions.GTAppClassException  
        at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
        at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
        at net.sf.cglib.asm.ClassReader.<init>(Unknown Source)
        at net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
        at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
        at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
        at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
        at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
        at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
        at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:317)
        at ch.lambdaj.proxy.ClassImposterizer.createProxyClass(ClassImposterizer.java:122)
        at ch.lambdaj.proxy.ClassImposterizer.imposterise(ClassImposterizer.java:100)
        at ch.lambdaj.proxy.ProxyUtil.createProxy(ProxyUtil.java:52)
        at ch.lambdaj.function.argument.ArgumentsFactory.createPlaceholder(ArgumentsFactory.java:52)
        at ch.lambdaj.function.argument.ArgumentsFactory.registerNewArgument(ArgumentsFactory.java:45)
        at ch.lambdaj.function.argument.ArgumentsFactory.createArgument(ArgumentsFactory.java:39)
        at ch.lambdaj.function.argument.ProxyArgument.invoke(ProxyArgument.java:36)
        at ch.lambdaj.proxy.InvocationInterceptor.intercept(InvocationInterceptor.java:21)
        at models.CommunityMember$$EnhancerByCGLIB$$430a996c.getActivatedTimestamp(<generated>)
        at play.classloading.enhancers.PropertiesEnhancer$FieldAccessor.invokeReadProperty(PropertiesEnhancer.java:221)
        at models.User.getActiveCommunities(User.java:831)
        at models.User$getActiveCommunities.call(Unknown Source)
        at /app/views/Application/main.html.(line:16)
        at play.template2.GTJavaBase.internalRenderTemplate(GTJavaBase.java:124)
        at play.modules.gtengineplugin.gt_integration.GTJavaBase1xImpl.internalRenderTemplate(GTJavaBase1xImpl.java:82)
        at play.template2.GTJavaBase.internalRenderTemplate(GTJavaBase.java:139)
        at play.modules.gtengineplugin.gt_integration.GTJavaBase1xImpl.internalRenderTemplate(GTJavaBase1xImpl.java:82)
        at play.template2.GTJavaBase.renderTemplate(GTJavaBase.java:97)
        at play.modules.gtengineplugin.GTTemplate.renderGTTemplate(GTTemplate.java:93)
        ... 14 more
    Caused by: java.lang.IllegalArgumentException  
        ... 43 more
    

    Now it turns out that on line 831 of User.java is call to some LambdaJ (v2.3.3) code:

    select(this.members,having(on(CommunityMember.class).activatedTimestamp, notNullValue()).and(having(on(CommunityMember.class).rejectedTimestamp, nullValue())));
    

    Looks like that version of LambdaJ is not compatible with the updated bytecode modifier library which ultimately is not an issue as I intend to rip that stuff out anyway. I'll do that and let you know if I have any other issues.

    So just back to the understanding of "java.source". I thought it meant the Java source compliance so if my source has only 1.7 constructs then I can set it to "1.7" and if I have 1.8 constructs then I needs to specify "1.8". However clearly it means something else.

  • Chris Webb

    Chris Webb April 20th, 2014 @ 11:48 PM

    Just to let you know that it's all working now with the LambdaJ code removed. thx

  • Play Duck

    Play Duck April 22nd, 2014 @ 12:45 AM

    (from [ea7a14ae432d24ac3f73c5de1c70d9037db8c5c0]) Revert "Support Java 8." Revert [#1800] Update compiler for support to java 8

    This reverts commit 3d604052ab2e83c0913244f3782a6f369e143d27.
    This reverts commit 3d3c3fe45733147f5478a70bd58891f163647f51
    This reverts commit e9d80946f4198bc7239f506e76e54c3c40470193
    This reverts commit 4521b8026b13ada18439120af2f8a4e8a79b7471
    This reverts commit 021d275545b76ebac43be623143ec85fe7f52119
    This reverts commit 3b7d7be90cfac1f60e722aacca577e8f5da25ef5
    https://github.com/playframework/play1/commit/ea7a14ae432d24ac3f73c...

  • Alex

    Alex April 22nd, 2014 @ 12:47 AM

    Revert java 8 support in 1.2.x branch

  • Sebastian Beigel

    Sebastian Beigel May 14th, 2014 @ 08:06 AM

    Hi Alex,

    testing Java 8 support in play1 -- but unfortunately, the java8Support sample (and my own test-projects) don't work.

    After a clean and re-build of the framework (master-branch) I do

    cd samples-and-tests/java8Support/ 
    play clean
    play deps
    play test
    

    and go to http://localhost:9000/@tests

    I get the following error in the play log:

    Oops: UnexpectedException
    An unexpected error occured caused by exception UnexpectedException: While applying class play.classloading.enhancers.LVEnhancer on BasicTest
    
    play.exceptions.UnexpectedException: While applying play.CorePlugin@77f80c04 on BasicTest
        at play.plugins.PluginCollection.enhance(PluginCollection.java:566)
        at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:235)
        at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:165)
        at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:429)
        at play.Play.start(Play.java:526)
        at play.Play.detectChanges(Play.java:652)
        at play.Invoker$Invocation.init(Invoker.java:197)
        at Invocation.HTTP Request(Play!)
    Caused by: play.exceptions.UnexpectedException: While applying class play.classloading.enhancers.LVEnhancer on BasicTest
        at play.CorePlugin.enhance(CorePlugin.java:306)
        at play.plugins.PluginCollection.enhance(PluginCollection.java:561)
        ... 7 more
    Caused by: play.exceptions.UnexpectedException: LVEnhancer: cannot enhance the behavior 'BasicTest.simpleStreamTest()'
        at play.classloading.enhancers.LVEnhancer.enhanceThisClass(LVEnhancer.java:112)
        at play.CorePlugin.enhance(CorePlugin.java:301)
        ... 8 more
    Caused by: java.lang.NullPointerException
        at bytecodeparser.CodeParser.parse(CodeParser.java:53)
        at bytecodeparser.analysis.stack.StackAnalyzer.init(StackAnalyzer.java:91)
        at bytecodeparser.analysis.stack.StackAnalyzer.analyze(StackAnalyzer.java:81)
        at play.classloading.enhancers.LVEnhancer.enhanceThisClass(LVEnhancer.java:75)
        ... 9 more
    

    The same error with enhancing happens with my own test-projects. If I remove the Java 8 code (i.e. the lambda stuff), the code runs fine.

    I'm on OS X 10.9.2 with the official Oracle JDK 8 (1.8.0_05).

    Any help on this would be great as I'd really love to use Java 8 features in my play1 apps! :)

    Thank you,

    Sebastian

  • Sebastian Beigel

    Sebastian Beigel May 14th, 2014 @ 08:23 AM

    Ah, I see... Using the 1.3.x branch everything works like a charm :)

    Any ideas what is happening with the bytecodeparser in master? Any plans to make Java 8 support work in master? :)

    Thanks again!

    Sebastian

  • Alex

    Alex May 14th, 2014 @ 09:14 AM

    • State changed from “resolved” to “inprogress”

    Ok thank for reporting it, I will check the master branch

  • Alex

    Alex January 7th, 2015 @ 01:49 AM

    • Milestone changed from 1.3 to 1.4.x
  • Alex

    Alex October 9th, 2017 @ 03:50 PM

    • State changed from “inprogress” to “resolved”

    Java 8 is supported in 1.4.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.

Pages