How do we prevent Enhancers to be applied on certain classes?

40 views
Skip to first unread message

Joel Grenon

unread,
Jun 8, 2011, 12:47:44 PM6/8/11
to play-fr...@googlegroups.com
I'm using the latest HEAD version. My application was working well with mid-May builds. After pulling changes from Github, I get the following problem: 

I have an utility class, nothing to do specifically with Play, in an utils package in my app source folder. 
When I launch my application, I get the following error from LVEnhancer : 

Caused by: java.lang.UnsupportedOperationException: WIDE opcode is not handled yet
at bytecodeparser.analysis.Opcodes$9.init(Opcodes.java:392)
at bytecodeparser.CodeParser.parse(CodeParser.java:39)
at bytecodeparser.analysis.stack.StackAnalyzer.init(StackAnalyzer.java:71)
at bytecodeparser.analysis.stack.StackAnalyzer.analyze(StackAnalyzer.java:62)
at play.classloading.enhancers.LVEnhancer.enhanceThisClass(LVEnhancer.java:72)

This class should not be enhanced at all and thus the problem would be prevented. Is there a way to prevent enhancement of specific classes? Do I have to place these classes somewhere else? Can I annotate them somehow? 

Joel

Julien Richard-Foy

unread,
Jun 8, 2011, 1:23:39 PM6/8/11
to play-fr...@googlegroups.com
You can put your code in a static jar (inside your lib/ application
directory), but that’s not the most convenient solution.
Anyway that’s a bug you should report on lighthouseapp and which
should be fixed.

Guillaume Bort

unread,
Jun 8, 2011, 1:54:37 PM6/8/11
to play-fr...@googlegroups.com
It is better to move to the 1.2.x branch for now. The master contains
a new byte-code enhancer that still fail on some cases.

> --
> You received this message because you are subscribed to the Google Groups
> "play-framework" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/play-framework/-/U0NsQVdTT19kMmNK.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to
> play-framewor...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/play-framework?hl=en.
>

--
Guillaume Bort, http://guillaume.bort.fr

Morten Kjetland

unread,
Jun 8, 2011, 5:11:32 PM6/8/11
to play-fr...@googlegroups.com
Joel Grenon: Can you file a bug with details about how to reproduce this problem?
This makes it easier to follow the "case" and know when it's fixed.

-morten
~~~~~~~~~~~~~~~
Morten Kjetland
~~~~~~~~~~~~~~~
https://twitter.com/mbknor

Stéphane Godbillon

unread,
Jun 8, 2011, 5:46:51 PM6/8/11
to play-fr...@googlegroups.com
Hi,

The very first version of BytecodeParser did not support the WIDE
opcode. I did release a version of BytecodeParser that supports it a
few days ago ; I will make a pull request to update it tomorrow.
--
Stephane Godbillon

Morten Kjetland

unread,
Jun 8, 2011, 5:59:27 PM6/8/11
to play-fr...@googlegroups.com
Thanks!

2011/6/8 Stéphane Godbillon <s...@zenexity.fr>

Stéphane Godbillon

unread,
Jun 9, 2011, 5:26:50 PM6/9/11
to play-fr...@googlegroups.com
Joel,

The pull request 262 (https://github.com/playframework/play/pull/262)
should fix your problem :)
--
Stephane Godbillon

Morten Kjetland

unread,
Jun 9, 2011, 6:06:52 PM6/9/11
to play-fr...@googlegroups.com
Pullrequest merged and http://play.lighthouseapp.com/projects/57987-play-framework/tickets/902-bytecodeparser-update#ticket-902-5 closed.

Now master branch should work for you again.

-morten

2011/6/9 Stéphane Godbillon <s...@zenexity.fr>
Reply all
Reply to author
Forward
0 new messages