#1434 ✓resolved
Ron Gross

UnexpectedException: While applying class play.classloading.enhancers.LocalvariablesNamesEnhancer - new version

Reported by Ron Gross | February 16th, 2012 @ 04:22 PM | in 1.2.5 (closed)

I have created a sscce that reproduced bug 857.
As requested by Morten Kjetland, I am submitting a new bug on this issue.

To reproduce:

I am running with Java 7 64 bit on Windows 7.

The error stack trace is:

@69dbne5ai Internal Server Error (500) for request GET /

Oops: UnexpectedException
An unexpected error occured caused by exception UnexpectedException: While applying class play.classloading.enhancers.LocalvariablesNamesEnhancer on controllers.Websites

play.exceptions.UnexpectedException: While applying play.CorePlugin@799aae6a on controllers.Websites

at play.plugins.PluginCollection.enhance(PluginCollection.java:511)
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:505)
at play.Play.detectChanges(Play.java:618)
at play.Invoker$Invocation.init(Invoker.java:198)
at Invocation.HTTP Request(Play!)

Caused by: play.exceptions.UnexpectedException: While applying class play.classloading.enhancers.LocalvariablesNamesEnhancer on controllers.Websites

at play.CorePlugin.enhance(CorePlugin.java:302)
at play.plugins.PluginCollection.enhance(PluginCollection.java:506)
... 7 more

Caused by: java.lang.ArrayIndexOutOfBoundsException: -2

at javassist.bytecode.stackmap.Tracer.doOpcode0_53(Tracer.java:238)
at javassist.bytecode.stackmap.Tracer.doOpcode(Tracer.java:94)
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:182)
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:141)
at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:96)
at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:416)
at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:398)
at javassist.CtBehavior.insertBefore(CtBehavior.java:719)
at javassist.CtBehavior.insertBefore(CtBehavior.java:685)
at play.classloading.enhancers.LocalvariablesNamesEnhancer.enhanceThisClass(LocalvariablesNamesEnhancer.java:268)
at play.CorePlugin.enhance(CorePlugin.java:297)
... 8 more

Comments and changes to this ticket

  • Nicolas Leroux

    Nicolas Leroux February 20th, 2012 @ 08:04 PM

    • Milestone set to 1.2.5
    • Milestone order changed from “977” to “0”
  • Ron Gross

    Ron Gross February 20th, 2012 @ 08:10 PM

    Yay, thanks for the milestone :)

  • Ron Gross

    Ron Gross February 22nd, 2012 @ 10:35 AM

    FYI, Comment by Thomas Parie on the Google Group: Upgrading hibernate to latest version seems to resolve it, because it trasinvely upgrades javaassist from 3.9.0 GA to 3.12.0.GA.

  • Nicolas Leroux

    Nicolas Leroux February 22nd, 2012 @ 10:38 AM

    • State changed from “new” to “resolved”

    Cool, I am marking this issue as resolved then :)

  • Ron Gross

    Ron Gross February 22nd, 2012 @ 10:44 AM

    I haven't tested this personally yet, so I can't testify.

    Is hibernate upgraded in 1.2.5 ?

  • Nicolas Leroux

    Nicolas Leroux February 22nd, 2012 @ 10:47 AM

    Yes, it has been upgraded to 4.1

  • Ron Gross

    Ron Gross February 26th, 2012 @ 12:16 PM

    I tested this on both Windows 7 and Ubuntu, and in the new version (1.2.x-056c8b3) this is indeed resolved.

    P.S.
    I had an implicit dependency on hibernate 3.6.1, had to update it to 4.1.0

    Thanks!

  • Stijn de Witt

    Stijn de Witt May 13th, 2013 @ 03:20 PM

    Please re-open. We are getting this error with Play! 1.2.5. Not using Hibernate.

    I tried adding a manual dependency for javaassist for both versions 3.9.0 GA and 3.12.0.GA, but still getting this error in both cases.

  • Stijn de Witt

    Stijn de Witt May 13th, 2013 @ 03:28 PM

    For your information, I added the output that Play! gives us:

    E:\EnterpriseEdition\Head\workspace\CS>play war ResourcePlanner\trunk -o ResourcePlanner.war
    ~ _ _ ~ _ __ | | __ _ _ | | ~ | ' | |/ ' | || || ~ | /|_|\__|__ (_) ~ |_| |__/ ~ ~ play! 1.2.5, http://www.playframework.org ~ CompilerOracle: exclude jregex/Pretokenizer.next
    Listening for transport dt_socket at address: 8029
    17:23:07,365 INFO ~ Starting E:\EnterpriseEdition\Head\workspace\CS\ResourcePlanner\trunk
    17:23:08,346 INFO ~ Precompiling ...
    17:23:09,377 ERROR ~

    @6e9mk4pi2 Cannot start in PROD mode with errors

    Oops: UnexpectedException
    An unexpected error occured caused by exception UnexpectedException: While applying class play.classloading.enhancers.LocalvariablesNamesEnhancer on controllers.Compress

    play.exceptions.UnexpectedException: While applying play.CorePlugin@11eaf4e on controllers.Compress
    at play.plugins.PluginCollection.enhance(PluginCollection.java:556) at play.classloading.ApplicationClasses$ApplicationClass.enhance(ApplicationClasses.java:235) at play.classloading.ApplicationClassloader.loadApplicationClass(ApplicationClassloader.java:167) at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:431) at play.Play.preCompile(Play.java:593) at play.Play.init(Play.java:299) at play.server.Server.main(Server.java:159) Caused by: play.exceptions.UnexpectedException: While applying class play.classloading.enhancers.LocalvariablesNamesEnhancer on controllers.Compress
    at play.CorePlugin.enhance(CorePlugin.java:302) at play.plugins.PluginCollection.enhance(PluginCollection.java:551) ... 6 more Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
    at javassist.bytecode.stackmap.Tracer.doLDC(Tracer.java:273) at javassist.bytecode.stackmap.Tracer.doOpcode0_53(Tracer.java:185) at javassist.bytecode.stackmap.Tracer.doOpcode(Tracer.java:94) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:182) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:141) at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:96) at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:416) at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:398) at javassist.CtBehavior.insertBefore(CtBehavior.java:719) at javassist.CtBehavior.insertBefore(CtBehavior.java:685) at play.classloading.enhancers.LocalvariablesNamesEnhancer.enhanceThisClass(LocalvariablesNamesEnhancer.java:268) at play.CorePlugin.enhance(CorePlugin.java:297) ... 7 more ~ Packaging current version of the framework and the application to E:\EnterpriseEdition\Head\workspace\CS\ResourcePlanner.war ... ~ Done ! ~ ~ You can now load E:\EnterpriseEdition\Head\workspace\CS\ResourcePlanner.war as a standard WAR into your servlet container ~ You can't use play standard commands to run/stop/debug the WAR application... ~ ... just use your servlet container commands instead ~ ~ Have fun! ~

  • Stijn de Witt

    Stijn de Witt May 13th, 2013 @ 03:30 PM

    Ok, formatting all screwed, so added an attachment instead.

  • notalifeform (at gmail)

    notalifeform (at gmail) May 18th, 2013 @ 08:30 PM

    Hi Stijn,

    Could you create a new issue with test-project that repoduces it? you can refer to this issue. I can reproduce this issue by just copying the controller (of /Ron's example project) and dropping in javaassist 3.12.0.GA, so apparently that version is just not compatible w/ play.

    Robert

  • Ron Gross

    Ron Gross August 13th, 2013 @ 10:56 AM

    The problem still happened to me in Play 1.2.6 (in fact it started happening when I upgraded from play-1.2.4-mbknor-3 to play-1.2.6).

    To resolve, I excluded javassist in dependencies.yml:

    • play: exclude:
      • org.javassist -> javassist *

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.

Attachments

Tags

Pages