[
http://jira.jboss.com/jira/browse/JBAOP-256?page=comments#action_12376915 ]
Flavia Rainone commented on JBAOP-256:
--------------------------------------
This is the mechanism that is causing this bug:
-> ClientBrowserDelegate code edited and compiled
-> javac selectively compiles only the affected classes, i.e., it recompiles
ClientBrowserDelegate, but not the other classes
->aopc decides to instrument ClientBrowserDelegate, since it doesn't implement
Advised
->aopc tries to reuse ClientBrowserDelegate$close_N4742752445160157748 invocation
class, generated during the previous instrumentation of ClientBrowserDelegate
->aopc fails, because the invocation class is pruned.
We could try to solve this problem by verifying why it is pruned. But I think that the
ideal approach would be to remove the classes created during the previous instrumentation
of ClientBrowserDelegate before instrumenting it. This way, we could remove all useless
Invocation classes (they may become useless since ClientBrowserDelegate class has changed
since previous instrumentation).
java.lang.RuntimeException: defrost():
org.jboss.jms.client.delegate.ClientBrowserDelegate$... was pruned
---------------------------------------------------------------------------------------------------------
Key: JBAOP-256
URL:
http://jira.jboss.com/jira/browse/JBAOP-256
Project: JBoss AOP
Issue Type: Bug
Affects Versions: 1.5.0.GA
Reporter: Ovidiu Feodorov
Messaging build fails at the AOPC phase if we dont' do a full clean after modifying
advised clases.
An example of exception that is thrown by the AOPC in such cases follows:
compile-classes:
[javac] Compiling 1 source file to C:\work\src\cvs\jboss-head\jms\output\classes
[aopc] java.lang.RuntimeException: defrost():
org.jboss.jms.client.delegate.ClientBrowserDelegate$close_N4742752445160157748 was
pruned.
[aopc] at javassist.CtClassType.checkPruned(CtClassType.java:1093)
[aopc] at javassist.CtClassType.defrost(CtClassType.java:272)
[aopc] at
org.jboss.aop.instrument.OptimizedInvocations.defrostClassIfExists(OptimizedInvocations.java:66)
[aopc] at
org.jboss.aop.instrument.OptimizedInvocations.makeInvocationClass(OptimizedInvocations.java:96)
[aopc] at
org.jboss.aop.instrument.OptimizedMethodInvocations.createOptimizedInvocationClass(OptimizedMethodInvocations.java:78)
[aopc] at
org.jboss.aop.instrument.OptimizedMethodExecutionTransformer.transformMethod(OptimizedMethodExecutionTransformer.java:59)
[aopc] at
org.jboss.aop.instrument.MethodExecutionTransformer.instrument(MethodExecutionTransformer.java:137)
[aopc] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:654)
[aopc] at org.jboss.aop.AspectManager.translate(AspectManager.java:835)
[aopc] at org.jboss.aop.AspectManager.transform(AspectManager.java:747)
[aopc] at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:345)
[aopc] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:234)
[aopc] at org.jboss.aop.standalone.Compiler.main(Compiler.java:90)
[aopc] [error] failed to transform:
org.jboss.jms.client.delegate.ClientBrowserDelegate.. Do verbose mode if you want full
stack trace.
[aopc] java.lang.RuntimeException: failed to transform:
org.jboss.jms.client.delegate.ClientBrowserDelegate
[aopc] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:728)
[aopc] at org.jboss.aop.AspectManager.translate(AspectManager.java:835)
[aopc] at org.jboss.aop.AspectManager.transform(AspectManager.java:747)
[aopc] at org.jboss.aop.standalone.Compiler.compileFile(Compiler.java:345)
[aopc] at org.jboss.aop.standalone.Compiler.compile(Compiler.java:234)
[aopc] at org.jboss.aop.standalone.Compiler.main(Compiler.java:90)
[aopc] Caused by: java.lang.RuntimeException: defrost():
org.jboss.jms.client.delegate.ClientBrowserDelegate$close_N4742752445160157748 was
pruned.
[aopc] at javassist.CtClassType.checkPruned(CtClassType.java:1093)
[aopc] at javassist.CtClassType.defrost(CtClassType.java:272)
[aopc] at
org.jboss.aop.instrument.OptimizedInvocations.defrostClassIfExists(OptimizedInvocations.java:66)
[aopc] at
org.jboss.aop.instrument.OptimizedInvocations.makeInvocationClass(OptimizedInvocations.java:96)
[aopc] at
org.jboss.aop.instrument.OptimizedMethodInvocations.createOptimizedInvocationClass(OptimizedMethodInvocations.java:78)
[aopc] at
org.jboss.aop.instrument.OptimizedMethodExecutionTransformer.transformMethod(OptimizedMethodExecutionTransformer.java:59)
[aopc] at
org.jboss.aop.instrument.MethodExecutionTransformer.instrument(MethodExecutionTransformer.java:137)
[aopc] at org.jboss.aop.instrument.Instrumentor.transform(Instrumentor.java:654)
[aopc] ... 5 more
[aopc] Exception in thread "main"
BUILD FAILED
C:\work\src\cvs\jboss-head\jms\build.xml:339: Java returned: 1
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira