4 Replies Latest reply on Sep 22, 2010 10:31 AM by Aslak Knutsen

    Java heap space on hudson with arquillian

    Ken Gullaksen Novice

      Hi.

      I'm seeing a memory issue on hudson build with arquillian.

       

      I'm struggling a bit with figuring out how to increase the heap of glassfish embedded.

      Any takers?

       

      http://gist.github.com/591615

       

       

      {noformat}
      SEVERE: Exception while loading the app
      org.glassfish.deployment.common.DeploymentException: Java heap space
           at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:169)
           at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
           at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
           at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
           at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
           at org.jboss.arquillian.container.glassfish.embedded_3.GlassFishEmbeddedContainer.deploy(GlassFishEmbeddedContainer.java:163)
           at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:62)
           at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:50)
           at org.jboss.arquillian.impl.event.MapEventManager.fire(MapEventManager.java:63)
           at org.jboss.arquillian.impl.context.AbstractEventContext.fire(AbstractEventContext.java:115)
           at org.jboss.arquillian.impl.EventTestRunnerAdaptor.beforeClass(EventTestRunnerAdaptor.java:78)
           at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:162)
           at org.jboss.arquillian.junit.Arquillian$3$1.evaluate(Arquillian.java:186)
           at org.jboss.arquillian.junit.Arquillian$MultiStatementExecutor.execute(Arquillian.java:297)
           at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:182)
           at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
           at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:127)
           at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
           at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
           at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
           at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
           at org.apache.maven.surefire.booter.SurefireBooter.run(SurefireBooter.java:241)
           at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:537)
           at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
           at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
           at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
           at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
           at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
           at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:597)
           at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
           at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
           at hudson.maven.agent.Main.launch(Main.java:165)
           at hudson.maven.MavenBuilder.call(MavenBuilder.java:165)
           at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:681)
           at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:625)
           at hudson.remoting.UserRequest.perform(UserRequest.java:114)
           at hudson.remoting.UserRequest.perform(UserRequest.java:48)
           at hudson.remoting.Request$2.run(Request.java:270)
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
           at java.util.concurrent.FutureTask.run(FutureTask.java:138)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.OutOfMemoryError: Java heap space
           at java.lang.Class.getDeclaredConstructors0(Native Method)
           at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
           at java.lang.Class.getConstructor0(Class.java:2699)
           at java.lang.Class.getDeclaredConstructor(Class.java:1985)
           at org.jboss.weld.util.Reflections.getDeclaredConstructor(Reflections.java:427)
           at org.jboss.weld.util.Proxies.isClassProxyable(Proxies.java:212)
           at org.jboss.weld.util.Proxies.isTypeProxyable(Proxies.java:168)
           at org.jboss.weld.util.Proxies.isTypesProxyable(Proxies.java:196)
           at org.jboss.weld.introspector.jlr.AbstractWeldAnnotated.(AbstractWeldAnnotated.java:100)
           at org.jboss.weld.introspector.jlr.WeldParameterImpl.(WeldParameterImpl.java:76)
           at org.jboss.weld.introspector.jlr.WeldParameterImpl.of(WeldParameterImpl.java:60)
           at org.jboss.weld.introspector.jlr.WeldMethodImpl.(WeldMethodImpl.java:155)
           at org.jboss.weld.introspector.jlr.WeldMethodImpl.of(WeldMethodImpl.java:81)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.(WeldClassImpl.java:405)
           at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:133)
           at org.jboss.weld.resources.ClassTransformer$2.call(ClassTransformer.java:72)
           at org.jboss.weld.resources.ClassTransformer$2.call(ClassTransformer.java:68)
           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
           at java.util.concurrent.FutureTask.run(FutureTask.java:138)
           at org.jboss.weld.util.collections.ConcurrentCache.putIfAbsent(ConcurrentCache.java:125)
           at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:67)
           at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:59)
           at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:86)
           at org.jboss.weld.bootstrap.BeanDeployment.deployBeans(BeanDeployment.java:134)
           at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:367)
           at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:167)
           at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125)
           at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224)
           at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338)
           at org.glassfish.kernel.embedded.EmbeddedDeployerImpl.deploy(EmbeddedDeployerImpl.java:214)
           at org.jboss.arquillian.container.glassfish.embedded_3.GlassFishEmbeddedContainer.deploy(GlassFishEmbeddedContainer.java:163)
           at org.jboss.arquillian.impl.handler.ContainerDeployer.callback(ContainerDeployer.java:62)
      classLoader = WebappClassLoader (delegate=true; repositories=WEB-INF/classes/)
      SharedSecrets.getJavaNetAccess()=java.net.URLClassLoader$7@12343d4
      Sep 22, 2010 1:59:43 PM org.glassfish.api.ActionReport failure
      SEVERE: Application test not registered
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 29.152 sec <<< FAILURE!
      Running no.knowit.yellowrate.calc.MainCalculationRatingTestCaseArquillian
      [HUDSON] Recording test results
      [HUDSON] Archiving /home/hudson/.hudson/jobs/YellowRate-integration-test/workspace/pom.xml to /home/hudson/.hudson/jobs/YellowRate-integration-test/modules/AllService$AllService/builds/2010-09-22_13-58-19/archive/AllService/AllService/1.0/pom.xml
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Java heap space
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.OutOfMemoryError: Java heap space
           at com.sun.org.apache.xerces.internal.util.XMLStringBuffer.append(XMLStringBuffer.java:205)
           at com.sun.org.apache.xerces.internal.util.XMLStringBuffer.append(XMLStringBuffer.java:223)
           at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanAttributeValue(XMLScanner.java:983)
           at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanAttribute(XMLNSDocumentScannerImpl.java:460)
           at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:277)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
           at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
           at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
           at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
           at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
           at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
           at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
           at org.dom4j.io.SAXReader.read(SAXReader.java:465)
           at org.dom4j.io.SAXReader.read(SAXReader.java:264)
           at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:99)
           at hudson.tasks.junit.TestResult.parse(TestResult.java:193)
           at hudson.tasks.junit.TestResult.parse(TestResult.java:149)
           at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:108)
           at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:759)
           at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:300)
           at hudson.maven.agent.PluginManagerInterceptor$1MojoIntercepterImpl.callPost(PluginManagerInterceptor.java:170)
           at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:185)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
           at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
           at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
           at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2 minutes 39 seconds
      [INFO] Finished at: Wed Sep 22 14:01:01 CEST 2010
      [INFO] Final Memory: 63M/63M
      {noformat}