Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] LTW, Reweaving and Hot Code Replace changes reflected every two saves of files.

Hi Andy,

Thanks for your response. I will fill a bug report soon, but in the mean time I will comment you what happened when I added the setting for over weaving...

Setting -Xset:overWeaving=true was worst, now every time that I save the file that is aspected I get this message from Eclipse in a popup: "Hot code replace failed - Scheme change not implemented" and now the changes are never reflected, neither in the first save nor in the second save.

I noted some others changes in the debug log. With -Xset:overWeaving=true every time that I save the file the next log is printed on console:

INFO: (Enh120375): AspectJ attempting reweave of 'test/weaved/Test'
[AppClassLoader@2bbd86] debug weaving 'test.weaved.Test'
[AppClassLoader@2bbd86] info processing reweavable type test.weaved.Test: test\weaved\Test.java

But prints this lines without it (in the case that the changes are not reflected in the behavior) (in bold the diff lines):

INFO: (Enh120375): AspectJ attempting reweave of 'test/weaved/Test'
[AppClassLoader@2bbd86] debug weaving 'test.weaved.Test'
[AppClassLoader@2bbd86] info processing reweavable type test.weaved.Test: test\weaved\Test.java
[AppClassLoader@2bbd86] info successfully verified type test.aspects.TestAspect exists. Originates from test\aspects\TestAspect.java
[AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:16) advised by before advice from 'test.aspects.TestAspect' (TestAspect.java)
[AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:16) advised by after advice from 'test.aspects.TestAspect' (TestAspect.java)



Next is the new console log (lines with #### are my comments of actions realized and expected behavior):

[AppClassLoader@2bbd86] info AspectJ Weaver Version 1.6.9.M2 built on Thursday May 13, 2010 at 23:38:39 GMT
[AppClassLoader@2bbd86] info register classloader sun.misc.Launcher$AppClassLoader@2bbd86
[AppClassLoader@2bbd86] info using configuration /C:/development/eclipse/workspace/aspectj-test/bin/META-INF/aop.xml
[AppClassLoader@2bbd86] info register aspect test.aspects.TestAspect
[AppClassLoader@2bbd86] info weaver operating in reweavable mode. Need to verify any required types exist.
[AppClassLoader@2bbd86] debug not weaving 'test.Main'
[AppClassLoader@2bbd86] debug weaving 'test.weaved.Test'
[AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:16) advised by before advice from 'test.aspects.TestAspect' (TestAspect.java)
[AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:16) advised by after advice from 'test.aspects.TestAspect' (TestAspect.java)
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.Signature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.Factory'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.SourceLocation'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.MethodSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.MethodSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.CodeSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.MemberSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.CodeSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.MemberSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.SignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.ConstructorSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.ConstructorSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.JoinPoint$StaticPart'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.UnlockSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.UnlockSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.LockSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.LockSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.AdviceSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.AdviceSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.InitializerSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.InitializerSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.CatchClauseSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.CatchClauseSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.FieldSignatureImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.reflect.FieldSignature'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.JoinPoint'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.JoinPoint$EnclosingStaticPart'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.SignatureImpl$Cache'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.JoinPointImpl$StaticPartImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.SourceLocationImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.runtime.reflect.JoinPointImpl'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.ProceedingJoinPoint'
[AppClassLoader@2bbd86] debug weaving 'test.aspects.TestAspect'
[AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.NoAspectBoundException'

>>> Before Aspect executed on: Mon May 24 11:33:38 GMT-03:00 2010
Test
INFO: Source file modified on: Mon May 24 11:33:35 GMT-03:00 2010
INFO: Class file modified on: Mon May 24 11:33:35 GMT-03:00 2010
>>> After Aspect executed on: Mon May 24 11:33:38 GMT-03:00 2010

###### Added the text "1st Change" and saved the file

INFO: (Enh120375): AspectJ attempting reweave of 'test/weaved/Test'
[AppClassLoader@2bbd86] debug weaving 'test.weaved.Test'
[AppClassLoader@2bbd86] info processing reweavable type test.weaved.Test: test\weaved\Test.java

>>> Before Aspect executed on: Mon May 24 11:33:43 GMT-03:00 2010
Test    ###### Should have been printed Test - 1st Change
INFO: Source file modified on: Mon May 24 11:33:40 GMT-03:00 2010
INFO: Class file modified on: Mon May 24 11:33:40 GMT-03:00 2010
>>> After Aspect executed on: Mon May 24 11:33:43 GMT-03:00 2010


On Fri, May 21, 2010 at 6:15 PM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
I'd raise a bugzilla for this, then you can attach the code there.
Hotswap with load-time reweaving is still experimental, I'm not
surprised if there is a glitch here.

You could try overweaving to see if it makes a difference.  Modify
your aop.xml and in the weaver options section specify
-Xset:overWeaving=true

Andy

On 21 May 2010 12:38, Full Inet <fullinet@xxxxxxxxx> wrote:
> Hi,
> I have a problem with LTW and reweaving...
> While debugging if I change the content of a method (ex. the text of a
> System.out) and save the file, it wouldn't reflected. But if I save the save
> file again, this time the changes are reflected. And it repeats on cycles of
> two saves.
> The rare is that when I save and the changes are not reflected, in log
> appears the next two lines and when I save the file and changes are
> reflected this lines are not showed :
> [AppClassLoader@2bbd86] info processing reweavable type test.weaved.Test:
> test\weaved\Test.java
> [AppClassLoader@2bbd86] info successfully verified type
> test.aspects.TestAspect exists.  Originates from
> test\aspects\TestAspect.java
> This lines comes from the method processReweavableStateIfPresent(String,
> BcelObjectType) on the class org.aspectj.weaver.bcel.BcelWeaver
> My environment is:
> Windows XP SP3 32 bits
> Sun Java 1.6.0 Update 19 JDK
> Eclipse 3.5.1
> AspectJ 1.6.9 M2 (the same occurs with 1.6.8)
> Project: A clean new basis java project that only has this test and AspectJ
> If a test project is needed, please let me know (is possible to attach files
> to mails of this mail list ?)
>
> Next is the console log (lines with #### are my comments of actions realized
> and expected behavior):
> [AppClassLoader@2bbd86] info AspectJ Weaver Version 1.6.9.M2 built on
> Thursday May 13, 2010 at 23:38:39 GMT
> [AppClassLoader@2bbd86] info register classloader
> sun.misc.Launcher$AppClassLoader@2bbd86
> [AppClassLoader@2bbd86] info using configuration
> /C:/development/eclipse/workspace/aspectj-test/bin/META-INF/aop.xml
> [AppClassLoader@2bbd86] info register aspect test.aspects.TestAspect
> [AppClassLoader@2bbd86] info weaver operating in reweavable mode.  Need to
> verify any required types exist.
> [AppClassLoader@2bbd86] debug not weaving 'test.Main'
> [AppClassLoader@2bbd86] debug weaving 'test.weaved.Test'
> [AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void
> test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:16) advised
> by before advice from 'test.aspects.TestAspect' (TestAspect.java)
> [AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void
> test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:16) advised
> by after advice from 'test.aspects.TestAspect' (TestAspect.java)
> [AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.Signature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.Factory'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.SourceLocation'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.MethodSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.MethodSignature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.CodeSignature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.MemberSignature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.CodeSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.MemberSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.SignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.ConstructorSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.ConstructorSignature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.JoinPoint$StaticPart'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.UnlockSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.UnlockSignature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.LockSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.LockSignature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.AdviceSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.AdviceSignature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.InitializerSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.InitializerSignature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.CatchClauseSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.CatchClauseSignature'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.FieldSignatureImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.reflect.FieldSignature'
> [AppClassLoader@2bbd86] debug cannot weave 'org.aspectj.lang.JoinPoint'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.JoinPoint$EnclosingStaticPart'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.SignatureImpl$Cache'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.JoinPointImpl$StaticPartImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.SourceLocationImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.runtime.reflect.JoinPointImpl'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.ProceedingJoinPoint'
> [AppClassLoader@2bbd86] debug weaving 'test.aspects.TestAspect'
> [AppClassLoader@2bbd86] debug cannot weave
> 'org.aspectj.lang.NoAspectBoundException'
>>>> Before Aspect executed on: Fri May 21 15:25:22 GMT-03:00 2010
> Test
>   INFO: Source file modified on: Fri May 21 15:25:20 GMT-03:00 2010
>   INFO: Class file modified on: Fri May 21 15:25:20 GMT-03:00 2010
>>>> After Aspect executed on: Fri May 21 15:25:22 GMT-03:00 2010
> ###### Added the text "1st Change" and saved the file
> INFO: (Enh120375):  AspectJ attempting reweave of 'test/weaved/Test'
> [AppClassLoader@2bbd86] debug weaving 'test.weaved.Test'
> [AppClassLoader@2bbd86] info processing reweavable type test.weaved.Test:
> test\weaved\Test.java
> [AppClassLoader@2bbd86] info successfully verified type
> test.aspects.TestAspect exists.  Originates from
> test\aspects\TestAspect.java
> [AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void
> test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:16) advised
> by before advice from 'test.aspects.TestAspect' (TestAspect.java)
> [AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void
> test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:16) advised
> by after advice from 'test.aspects.TestAspect' (TestAspect.java)
>>>> Before Aspect executed on: Fri May 21 15:25:27 GMT-03:00 2010
> Test               ###### Should have been printed
> Test-1stChange-1274463600156
>   INFO: Source file modified on: Fri May 21 15:25:24 GMT-03:00 2010
>   INFO: Class file modified on: Fri May 21 15:25:24 GMT-03:00 2010
>>>> After Aspect executed on: Fri May 21 15:25:27 GMT-03:00 2010
> ###### Added the text "2nd Change" and saved the file
> INFO: (Enh120375):  AspectJ attempting reweave of 'test/weaved/Test'
> [AppClassLoader@2bbd86] debug weaving 'test.weaved.Test'
> [AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void
> test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:18) advised
> by before advice from 'test.aspects.TestAspect' (TestAspect.java)
> [AppClassLoader@2bbd86] weaveinfo Join point 'method-execution(void
> test.weaved.Test.test())' in Type 'test.weaved.Test' (Test.java:18) advised
> by after advice from 'test.aspects.TestAspect' (TestAspect.java)
>>>> Before Aspect executed on: Fri May 21 15:25:32 GMT-03:00 2010
> Test - 2nd Change
>   INFO: Source file modified on: Fri May 21 15:25:29 GMT-03:00 2010
>   INFO: Class file modified on: Fri May 21 15:25:29 GMT-03:00 2010
>>>> After Aspect executed on: Fri May 21 15:25:32 GMT-03:00 2010
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top