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

Visto 40 veces
Saltar al primer mensaje no leído

Joel Grenon

no leída,
8 jun 2011, 12:47:448/6/11
a 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

no leída,
8 jun 2011, 13:23:398/6/11
a 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

no leída,
8 jun 2011, 13:54:378/6/11
a 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

no leída,
8 jun 2011, 17:11:328/6/11
a 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

no leída,
8 jun 2011, 17:46:518/6/11
a 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

no leída,
8 jun 2011, 17:59:278/6/11
a play-fr...@googlegroups.com
Thanks!

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

Stéphane Godbillon

no leída,
9 jun 2011, 17:26:509/6/11
a play-fr...@googlegroups.com
Joel,

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

Morten Kjetland

no leída,
9 jun 2011, 18:06:529/6/11
a 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>
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos