1

我正在为 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、项目特定的 JAVA_OPTS 以及 Sonar 的包装文件中设置了足够的 Xmx 和 Xms,但仍然遇到相同的错误。

提前致谢...

4

1 回答 1

1

我使用的JDK“版本”似乎有问题。使用JDK 1.7解决了这个问题。

于 2012-02-09T10:39:08.373 回答