2011-01-27 5 views
2

findbugs-받는다는 - 플러그인, Windows 시스템이findbugs-받는다는 - 플러그인은 OutOfMemoryError를

java.lang.OutOfMemoryError: Java heap space 
     at org.apache.bcel.classfile.Constant.readConstant(Constant.java:14 
2) 
     at org.apache.bcel.classfile.ConstantPool.<init>(ConstantPool.java: 
67) 
     at org.apache.bcel.classfile.ClassParser.readConstantPool(ClassPars 
er.java:225) 
     at org.apache.bcel.classfile.ClassParser.parse(ClassParser.java:136 
) 
     at edu.umd.cs.findbugs.classfile.engine.bcel.JavaClassAnalysisEngin 
e.analyze(JavaClassAnalysisEngine.java:55) 
     at edu.umd.cs.findbugs.classfile.engine.bcel.JavaClassAnalysisEngin 
e.analyze(JavaClassAnalysisEngine.java:43) 
     at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysi 
s(AnalysisCache.java:213) 
     at edu.umd.cs.findbugs.classfile.engine.bcel.ClassContextClassAnaly 
sisEngine.analyze(ClassContextClassAnalysisEngine.java:46) 
     at edu.umd.cs.findbugs.classfile.engine.bcel.ClassContextClassAnaly 
sisEngine.analyze(ClassContextClassAnalysisEngine.java:38) 
     at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysi 
s(AnalysisCache.java:213) 
     at edu.umd.cs.findbugs.ba.AnalysisContext.isTooBig(AnalysisContext. 
java:385) 
     at edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java: 
949) 
     at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:222) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor 
Impl.java:39) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod 
AccessorImpl.java:25) 
     at java.lang.reflect.Method.invoke(Method.java:597) 
     at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod. 
java:86) 
     at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230) 
     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912) 
     at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:756) 
     at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(Invok 
erHelper.java:778) 
     at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHe 
lper.java:758) 
     at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(
ScriptBytecodeAdapter.java:170) 
     at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethod0(
ScriptBytecodeAdapter.java:198) 
     at org.codehaus.mojo.findbugs.FindBugsMojo.executeReport(FindBugsMo 
jo.groovy:792) 
     at org.apache.maven.reporting.AbstractMavenReport.generate(Abstract 
MavenReport.java:101) 
     at org.apache.maven.reporting.AbstractMavenReport.execute(AbstractM 
avenReport.java:66) 
     at org.apache.maven.plugin.DefaultPluginManager.executeMojo(Default 
PluginManager.java:490) 
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals 
(DefaultLifecycleExecutor.java:694) 
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStand 
aloneGoal(DefaultLifecycleExecutor.java:569) 
     at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java:539) 

답변

2

를 해결하는 방법, 다음 명령은 메이븐에 사용할 수있는 최대 메모리 양을 증가하면 OutOfMemoryError가 발생합니다 (힙 발생 및 permGen 각각) :

set MAVEN_OPTS=-Xmx1024m -XX:MaxPermSize=512m 
1

는 또한 -maxHeap

와 FindBugs에 힙 크기를 전달할 수 있습니다