Build continues despite OutOfMemoryError
----------------------------------------

                 Key: MNG-3419
                 URL: http://jira.codehaus.org/browse/MNG-3419
             Project: Maven 2
          Issue Type: Bug
          Components: Plugins and Lifecycle
    Affects Versions: 2.0.7
            Reporter: Sanjeeb Sahoo


[I have already sent this question to users forum twice, but no response, so I 
am filing this issue]

I am seeing something very strange. We have our own plugin(it's basically an 
annotation processor) that gets invoked as part of compile phase. It appears 
that the JVM gets OutOfMemoryError when this plugin is executed, yet the build 
continues to the next phase instead of aborting. I ran with -X option and it 
shows that the plugin is invoked in process. I have looked at our plugin code 
and we do not catch Throwable or Error in our code. So, it appears to be a bug 
in Maven. Given below is some selected output that I think should give an idea 
of what's going on...

[INFO] 
----------------------------------------------------------------------------
[INFO] Building Web Container for GlassFish
[INFO]    task-segment: [install]
[INFO] 
----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
...
[DEBUG] Configuring mojo 
'com.sun.enterprise:hk2-maven-plugin:0.2-SNAPSHOT:hk2-compile' -->
...
[DEBUG]   (f) fork = false
...
[INFO] [hk2:hk2-compile]
[DEBUG] Using compiler 'hk2-apt'.
[DEBUG] Source directories: [/space/ss141213/WS/gf/v3/web/webtier/src/main/java]
[DEBUG] Classpath: [/space/ss141213/WS/gf/v3/web/webtier/target/classes...
[INFO] Compiling 660 source files to 
/space/ss141213/WS/gf/v3/web/webtier/target/classes
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: Java heap space
       at 
java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:99)
       at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:393)
       at java.lang.StringBuilder.append(StringBuilder.java:120)
       at com.sun.tools.javac.jvm.ClassReader.list(ClassReader.java:1756)
       at com.sun.tools.javac.jvm.ClassReader.listAll(ClassReader.java:1882)
       at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1901)
       at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1538)
       at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
       at 
com.sun.tools.javac.jvm.ClassReader.completeOwners(ClassReader.java:1547)
       at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1534)
       at com.sun.tools.javac.code.Symbol.complete(Symbol.java:355)
       at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:612)
       at com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:550)
       at 
com.sun.tools.javac.code.Types$AsSuperFcn.visitClassType(Types.java:1440)
       at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:482)
       at com.sun.tools.javac.code.Types$AsSuperFcn.asSuper(Types.java:1417)
       at 
com.sun.tools.javac.code.Types$AsSuperFcn.visitClassType(Types.java:1434)
       at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:482)
       at com.sun.tools.javac.code.Types$AsSuperFcn.asSuper(Types.java:1417)
       at com.sun.tools.javac.code.Types.asSuper(Types.java:1407)
       at 
com.sun.tools.javac.code.Types$IsSubTypeFcn.visitClassType(Types.java:429)
       at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:482)
       at com.sun.tools.javac.code.Types$IsSubTypeFcn.isSubType(Types.java:353)
       at com.sun.tools.javac.code.Types.isSubType(Types.java:331)
       at com.sun.tools.javac.code.Types.isSubTypeUnchecked(Types.java:311)
       at com.sun.tools.javac.code.Types.isConvertible(Types.java:278)
       at com.sun.tools.javac.code.Types.isAssignable(Types.java:1630)
       at com.sun.tools.javac.comp.Check.checkType(Check.java:325)
       at com.sun.tools.javac.comp.Annotate.enterAnnotation(Annotate.java:122)
       at 
com.sun.tools.javac.comp.MemberEnter.enterAnnotations(MemberEnter.java:705)
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
...

Thanks,
Sahoo 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to