felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stuart McCulloch <mccu...@gmail.com>
Subject Re: OOM error while building latest trunk
Date Thu, 16 Apr 2009 15:37:51 GMT
2009/4/16 Sahoo <Sahoo@sun.com>

> I consistently faced the following error while building latest trunk and to
> work around, I had to set MAVEN_OPTS=-Xmx512m in my environment. Is it
> because there are just a lot of things getting built in the same reactor
> requiring more memory?
>

I'd say that's very likely, also note that an OOM in PermGen means the JVM
has exhausted
its allocated space for class instances (ie. too many classes and/or proxy
classes loaded).

There's also an issue wrt. the default maximum heap - depending on which JDK
release you
use (and even the OS) this can vary from being ~64mb to being half of the
physical memory.

So setting your MAVEN_OPTS to a reasonably large maximum sounds reasonable
to me
if you want to build the whole project tree at once.

Thanks,
> Sahoo
>    [exec] [INFO]
> ------------------------------------------------------------------------
>    [exec] [INFO] Building Apache Felix MOSGi JMX MBean for obr interaction
>    [exec] [INFO]    task-segment: [clean, install]
>    [exec] [INFO]
> ------------------------------------------------------------------------
>    [exec] [INFO] [clean:clean]
>    [exec] [INFO] Deleting directory
> /space/ss141213/WS/felix/trunk/mosgi/managedelements.obrprobe/target
>    [exec] [INFO] [resources:resources]
>    [exec] [INFO] Using default encoding to copy filtered resources.
>    [exec] [INFO] [compiler:compile]
>    [exec] [INFO] Compiling 2 source files to
> /space/ss141213/WS/felix/trunk/mosgi/managedelements.obrprobe/target/classes
>    [exec] [INFO]
> ------------------------------------------------------------------------
>    [exec] [ERROR] BUILD FAILURE
>    [exec] [INFO]
> ------------------------------------------------------------------------
>    [exec] [INFO] Compilation failure
>    [exec] Failure executing javac, but could not parse the error:
>    [exec]
>    [exec]
>    [exec] The system is out of resources.
>    [exec] Consult the following stack trace for details.
>    [exec] java.lang.OutOfMemoryError: PermGen space
>    [exec]     at com.sun.tools.javac.comp.Annotate.<init>(Annotate.java:52)
>    [exec]     at
> com.sun.tools.javac.comp.Annotate.instance(Annotate.java:36)
>    [exec]     at
> com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:215)
>    [exec]     at
> com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:168)
>    [exec]     at
> com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:293)
>    [exec]     at
> com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:72)
>    [exec]     at com.sun.tools.javac.main.Main.compile(Main.java:340)
>    [exec]     at com.sun.tools.javac.main.Main.compile(Main.java:279)
>    [exec]     at com.sun.tools.javac.main.Main.compile(Main.java:270)
>    [exec]     at com.sun.tools.javac.Main.compile(Main.java:87)
>    [exec]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>    [exec]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    [exec]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    [exec]     at java.lang.reflect.Method.invoke(Method.java:597)
>    [exec]     at
> org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420)
>    [exec]     at
> org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
>    [exec]     at
> org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
>    [exec]     at
> org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
>    [exec]     at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
>    [exec]     at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
>    [exec]     at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
>    [exec]     at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
>    [exec]     at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
>    [exec]     at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
>    [exec]     at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
>    [exec]     at
> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
>    [exec]     at
> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
>    [exec]     at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
>    [exec]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
>    [exec]     at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>    [exec]     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>    [exec]     at java.lang.reflect.Method.invoke(Method.java:597)
>    [exec]
>    [exec]
>    [exec]
>    [exec] Failure executing javac, but could not parse the error:
>    [exec]
>    [exec]
>
>


-- 
Cheers, Stuart

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message