我正在为Hudson 2.2.0使用SONAR 2.13.1插件。 以下是在OOM错误上生成的堆栈跟踪:
[INFO] [16:32:44.689] Execute decorators...
[INFO] ---------------- [ERROR] FATAL ERROR [INFO] ------------------ [INFO] Java heap space [INFO] ------------------------- [INFO] Trace java.lang.OutOfMemoryError:
enter code here`Java heap space at java.util.ArrayList.<init>(ArrayList.java:112) at java.util.ArrayList.<init>(ArrayList.java:119) at org.hibernate.hql.ast.ParameterTranslationsImpl$1NamedParamTempHolder.
<init>(ParameterTranslationsImpl.java:104) at org.hibernate.hql.ast.ParameterTranslationsImpl.
<init>(ParameterTranslationsImpl.java:120) at org.hibernate.hql.ast.QueryTranslatorImpl.getParameterTranslations(QueryTranslatorImpl.java:567) at org.hibernate.engine.query.HQLQueryPlan.
<init>(HQLQueryPlan.java:121) at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:94) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1141) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:67) at org.sonar.batch.DefaultTimeMachine.execute(DefaultTimeMachine.java:133) at org.sonar.batch.DefaultTimeMachine.getMeasuresFields(DefaultTimeMachine.java:68) at org.sonar.plugins.core.timemachine.TendencyDecorator.decorate(TendencyDecorator.java:100) at org.sonar.batch.phases.DecoratorsExecutor.executeDecorator(DecoratorsExecutor.java:79) at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:70) at org.sonar.batch.phases.DecoratorsExecutor.decorateResource(DecoratorsExecutor.java:63) at org.sonar.batch.phases.DecoratorsExecutor.execute(DecoratorsExecutor.java:55) at org.sonar.batch.phases.Phases.execute(Phases.java:94) at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:111) at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:102) at org.sonar.batch.bootstrap.Module.start(Module.java:83) at org.sonar.batch.Batch.execute(Batch.java:100) at org.sonar.maven.SonarMojo.executeBatch(SonarMojo.java:152) at org.sonar.maven.SonarMojo.execute(SonarMojo.java:142) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:98)
我已经在hudson的MAVEN_OPTS中设置了足够的Xmx和Xms,在hudson和Sonar的包装文件中设置了特定于项目的JAVA_OPTS,但仍然遇到了相同的错误。
提前致谢...
答案 0 :(得分:1)
似乎我使用的JDK“版本”存在问题。使用JDK 1.7解决了这个问题。