Re: [aspectj-users] Memory problem when using aspectj
Hi Andy, Thank you very much for your help. Your last suggestion was the key that I needed. All is well now, that I am not using the binary weaving. Also the generated aspects were very large. I reduced the size and created more aspects instead and it works like magic. Thanks a bunch. Aryenne -- View this message in context: http://aspectj.2085585.n4.nabble.com/Memory-problem-when-using-aspectj-tp4650733p4650753.html Sent from the AspectJ - users mailing list archive at Nabble.com. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Memory problem when using aspectj
Hi, ok. Out of interest, are your generated aspects big (lots of advice, lots of ITDs)? AspectJ actually uses a different compile strategy (to use less memory) when doing full source compilation, which it does not use when binary weaving (it should do the same thing for binary weaving but I haven't had the time to implement it). Your step (3) is binary weaving. What you could try is that instead of passing the already compiled binaries in, pass the sources in again at step (3) - it is perhaps counter-intuitive, but this will allow the better compilation strategy to kick in. Having said that, we can successfully weave jars like the JVM system jars (rt.jar/classes.jar) without running out of heap so I'm not quite sure what you are doing that is using it all up. If generating the aspects you could try generating less into them and see if you can work out the construct that blows it up. Andy On 22 January 2013 13:30, aryenneb wrote: > Hi Andy, > Sorry, I should have said that the memory parameter changes were made to > ajc.bat. Thanks for the correction. > > Ok, my project is an Aspectj project being run in Eclipse Juno(with Java > 1.7, aspectj 1.7.1). > 1. First I build the source using an ant build > 2. Then I run my main java file (Let's call it test.java) using ajc. >This run generates some java files and aspectj files (Let's call > them > b.java, c.java, Driver.java, b.aj, c.aj) > 3. Then compile Driver.java using ajc. > This requires the source that has already been compiled, plus the set > of generated .java and .aj files. > 4. The next step should be to run driver but I cannot get to that point > since it runs out of memory during the compilation. > > Hope this makes it a bit clearer. > Thanks > Aryenne > > > > -- > View this message in context: > http://aspectj.2085585.n4.nabble.com/Memory-problem-when-using-aspectj-tp4650733p4650742.html > Sent from the AspectJ - users mailing list archive at Nabble.com. > ___ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Memory problem when using aspectj
Hi Andy, Sorry, I should have said that the memory parameter changes were made to ajc.bat. Thanks for the correction. Ok, my project is an Aspectj project being run in Eclipse Juno(with Java 1.7, aspectj 1.7.1). 1. First I build the source using an ant build 2. Then I run my main java file (Let's call it test.java) using ajc. This run generates some java files and aspectj files (Let's call them b.java, c.java, Driver.java, b.aj, c.aj) 3. Then compile Driver.java using ajc. This requires the source that has already been compiled, plus the set of generated .java and .aj files. 4. The next step should be to run driver but I cannot get to that point since it runs out of memory during the compilation. Hope this makes it a bit clearer. Thanks Aryenne -- View this message in context: http://aspectj.2085585.n4.nabble.com/Memory-problem-when-using-aspectj-tp4650733p4650742.html Sent from the AspectJ - users mailing list archive at Nabble.com. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Memory problem when using aspectj
Hi, > I changed the Xmx in the C:\aspectj1.7\bin\ajc.txt I presume you mean ajc.bat ? When you say: > Everything compiles correctly. However, when I try to run the project this is the error message (and there is no error log): >[error] AspectJ 1.7.1 ran out of memory during compilation: So everything doesn't compile correctly? I'm trying to understand your build - are you doing a javac build of your code and all is well, then a binary weave with aspectj and that fails? Or are you compiling everything all together from sources? (java and aspects) Once I know which I can probably advise you further. cheers, Andy On 22 January 2013 10:54, aryenneb wrote: > Hi, > I changed the Xmx in the C:\aspectj1.7\bin\ajc.txt > I changed line 10 in that file from: > > "$JAVA_HOME/bin/java" -classpath > "$ASPECTJ_HOME/lib/aspectjtools.jar;$JAVA_HOME/lib/tools.jar;$CLASSPATH" > *-Xmx64M *org.aspectj.tools.ajc.Main "$@" > > > to: > > "$JAVA_HOME/bin/java" -classpath > "$ASPECTJ_HOME/lib/aspectjtools.jar;$JAVA_HOME/lib/tools.jar;$CLASSPATH" > *-Xmx1024M *org.aspectj.tools.ajc.Main "$@" > > Thanks for any help > Aryenne > > > > -- > View this message in context: > http://aspectj.2085585.n4.nabble.com/Memory-problem-when-using-aspectj-tp4650733p4650738.html > Sent from the AspectJ - users mailing list archive at Nabble.com. > ___ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Memory problem when using aspectj
Hi, I changed the Xmx in the C:\aspectj1.7\bin\ajc.txt I changed line 10 in that file from: "$JAVA_HOME/bin/java" -classpath "$ASPECTJ_HOME/lib/aspectjtools.jar;$JAVA_HOME/lib/tools.jar;$CLASSPATH" *-Xmx64M *org.aspectj.tools.ajc.Main "$@" to: "$JAVA_HOME/bin/java" -classpath "$ASPECTJ_HOME/lib/aspectjtools.jar;$JAVA_HOME/lib/tools.jar;$CLASSPATH" *-Xmx1024M *org.aspectj.tools.ajc.Main "$@" Thanks for any help Aryenne -- View this message in context: http://aspectj.2085585.n4.nabble.com/Memory-problem-when-using-aspectj-tp4650733p4650738.html Sent from the AspectJ - users mailing list archive at Nabble.com. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Memory problem when using aspectj
Hello, Where did you set ( in which file) the Xmx, PermSize parameters ? Cordialement / Best regards Jean-Louis Pasturel -Message d'origine- De : aspectj-users-boun...@eclipse.org [mailto:aspectj-users-boun...@eclipse.org] De la part de aryenneb Envoyé : mardi 22 janvier 2013 01:04 À : aspectj-users@eclipse.org Objet : Re: [aspectj-users] Memory problem when using aspectj Hi, Thanks Brett, for your suggestion. I tried that but still get the same error. -- View this message in context: http://aspectj.2085585.n4.nabble.com/Memory-problem-when-using-aspectj-tp465 0733p4650735.html Sent from the AspectJ - users mailing list archive at Nabble.com. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users _ Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration, France Telecom - Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci. This message and its attachments may contain confidential or privileged information that may be protected by law; they should not be distributed, used or copied without authorisation. If you have received this email in error, please notify the sender and delete this message and its attachments. As emails may be altered, France Telecom - Orange is not liable for messages that have been modified, changed or falsified. Thank you. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Memory problem when using aspectj
Hi, Thanks Brett, for your suggestion. I tried that but still get the same error. -- View this message in context: http://aspectj.2085585.n4.nabble.com/Memory-problem-when-using-aspectj-tp4650733p4650735.html Sent from the AspectJ - users mailing list archive at Nabble.com. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users
Re: [aspectj-users] Memory problem when using aspectj
Might be worth a quick test with increased perm gen space, in case you are running out: -XX:MaxPermSize=512m Best Brett On 22 January 2013 10:25, Aryenne Bradshaw wrote: > Hi Users, > This is my first time to the forum. I am really desperate for some help. I > have a project running on Java 1.7 and ajc 1.7.1 on a windows 7 machine 64 > bit. > Everything compiles correctly. However, when I try to run the project this > is the error message (and there is no error log): > > [error] AspectJ 1.7.1 ran out of memory during compilation: > > Please increase the memory available to ajc by editing the ajc script > > found in your AspectJ installation directory. The -Xmx parameter value > > should be increased from 64M (default) to 128M or even 256M. > > See the AspectJ FAQ available from the documentation link > > on the AspectJ home page at http://www.eclipse.org/aspectj > SUGGESTED SOLUTIONS ALREADY TRIED: > 1. i have increased the value of the ajc Xmx parameter from 64M to 1024M > (and even 4096M) > 2. I have set -Xset:minimalModel=true -Xset:typeDemotion=true > > The problem exits even if I run the project in eclipse or on the command > prompt I get the same error. The project runs with small test files but if > I try to use larger test files I get the error above. Any help will be > greatly appreciated. I am now at my witts end. > Thank you. > > ___ > aspectj-users mailing list > aspectj-users@eclipse.org > https://dev.eclipse.org/mailman/listinfo/aspectj-users > ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users
[aspectj-users] Memory problem when using aspectj
Hi Users,This is my first time to the forum. I am really desperate for some help. I have a project running on Java 1.7 and ajc 1.7.1 on a windows 7 machine 64 bit.Everything compiles correctly. However, when I try to run the project this is the error message (and there is no error log): [error] AspectJ 1.7.1 ran out of memory during compilation: Please increase the memory available to ajc by editing the ajc script found in your AspectJ installation directory. The -Xmx parameter value should be increased from 64M (default) to 128M or even 256M. See the AspectJ FAQ available from the documentation link on the AspectJ home page at http://www.eclipse.org/aspectjSUGGESTED SOLUTIONS ALREADY TRIED:1. i have increased the value of the ajc Xmx parameter from 64M to 1024M (and even 4096M)2. I have set -Xset:minimalModel=true -Xset:typeDemotion=true The problem exits even if I run the project in eclipse or on the command prompt I get the same error. The project runs with small test files but if I try to use larger test files I get the error above. Any help will be greatly appreciated. I am now at my witts end.Thank you. ___ aspectj-users mailing list aspectj-users@eclipse.org https://dev.eclipse.org/mailman/listinfo/aspectj-users