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

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