Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] iajc ant task - out of memory

Andy, thanks for that great reply. I should have posted something on
this message board a long time ago. 

We have two different periodic compiler problems that show up as memory
problems, neither of them are with permgen. The first one is the
is more likely an iajc compiler issue. This is the one that all the 
developers have run into, and I didn't see anything like it in the bug
list (this is with 1.5.3):

java.lang.StackOverflowError
        at java.util.WeakHashMap.expungeStaleEntries(WeakHashMap.java:269)
        at java.util.WeakHashMap.getTable(WeakHashMap.java:297)
        at java.util.WeakHashMap.get(WeakHashMap.java:341)
        at org.aspectj.weaver.World$TypeMap.get(World.java:967)
        at org.aspectj.weaver.World.resolve(World.java:250)
        at org.aspectj.weaver.World.resolve(World.java:191)
        at org.aspectj.weaver.UnresolvedType.resolve(UnresolvedType.java:662)
        at org.aspectj.weaver.ReferenceType.getRawType(ReferenceType.java:550)
        at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:292)
        at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:276)
        at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:292)
        at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:276)
        at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:292)
        at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:276)
        at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:292)
        at org.aspectj.weaver.ReferenceType.isAssignableFrom(ReferenceType.java:276)
etc...

the second issue, is (I think) a known *nix JVM issue (and is not likely related to iacj):

java.lang.OutOfMemoryError
        at java.util.zip.ZipFile.open(Native Method)
        at java.util.zip.ZipFile.<init>(ZipFile.java:203)
        at java.util.zip.ZipFile.<init>(ZipFile.java:234)
        at org.aspectj.org.eclipse.jdt.internal.compiler.batch.ClasspathJar.initialize(ClasspathJar.java:92)
        at org.aspectj.org.eclipse.jdt.internal.compiler.batch.FileSystem.<init>(FileSystem.java:71)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.getLibraryAccess(AjBuildManager.java:823)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:887)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:260)
        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:176)
        at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
        at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
        at org.aspectj.tools.ajc.Main.run(Main.java:378)
        at org.aspectj.tools.ajc.Main.runMain(Main.java:253)
        at org.aspectj.tools.ajc.Main.main(Main.java:88)


>I recently helped someone having issues in AJDT with a system
>containing 7500 source files (~10000 classes) get going with iajc.
> Is your project much larger than that? 
We currently have about 5000 java source files, and numerous 3rd party jars.

>I presume you are just doing straight compiles rather than using iajc
>in its incremental compilation mode?  Are you building entirely from
>source, or are you building source then using iajc as a binary weaving
>step in the build?
We don't use incremental. This is our ant call:
<iajc destdir="@{destination}" source="1.5" failonerror="true" fork="true"
            Xlint="none" maxmem="${iajc.maxmem}" sourceRootCopyFilter="**/*.java">
            <sourceroots refid="@{source}"/>

> Are you able to break the weaving into multiple separate iajc calls
> that apply the aspects to a subset of your code each time?
Well, have it broken down into about 15 different sub-projects that get compiled
one at time.

Thanks again for your help. Maybe we shouldn't give up on AspectJ just yet. 

-Lachlan

-- 
10 Great Gift Ideas- Take a Look!
http://mail.shopping.com/?linkin_id=8033174



Back to the top