4 Replies Latest reply on Feb 18, 2010 2:18 PM by coenos

    How much heap space needed for Embedded AS?

    coenos

      Hi, I tried the new Embedded AS to test my EJB's using JUnit. I followed the examples on the community

       

      However, when starting Embedded AS, I always get a outOfMemory Error, although my heap space is set to 1500MB.

       

      11:29:03,409 ERROR [ProfileDeployAction] Failed to add deployment: httpha-invoker.sar
      org.jboss.deployers.spi.DeploymentException: Error determining deployment structure for vfsfile:/C:/Apps/jboss-6.0.0.M1/server/all/deploy/httpha-invoker.sar/
              at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.determineDeploymentContext(MainDeployerImpl.java:458)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:387)
              at org.jboss.deployers.plugins.main.MainDeployerImpl.addDeployment(MainDeployerImpl.java:297)
              at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.addDeployment(MainDeployerAdapter.java:86)
              at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:61)
              at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
              at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
              at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
              at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
              at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:775)
              at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
              at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:258)
              at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:97)
              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:860)
              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:441)
              at java.lang.Thread.run(Thread.java:619)
      Caused by: java.lang.OutOfMemoryError: Java heap space
              at java.util.Arrays.copyOf(Arrays.java:2882)
              at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
              at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:597)
              at java.lang.StringBuilder.append(StringBuilder.java:212)

       

      Thanks for any suggestions,

      Coen

        • 1. Re: How much heap space needed for Embedded AS?
          jaikiran

          coenos wrote:

           

          Hi, I tried the new Embedded AS to test my EJB's using JUnit. I followed the examples on the community

           

          However, when starting Embedded AS, I always get a outOfMemory Error, although my heap space is set to 1500MB.

           

          11:29:03,409 ERROR [ProfileDeployAction] Failed to add deployment: httpha-invoker.sar

          How and where are you adding the heap size param?

          • 2. Re: How much heap space needed for Embedded AS?
            coenos

            Hi Jaikiran,

             

            I set it in my maven configuration.

             

            I run "mvn test" from my Seam EJB maven module.

             

            C:\Workspaces\SeamWorkspace\seamdemo-parent\seamdemo-ejb>mvn test
            C:\Workspaces\SeamWorkspace\seamdemo-parent\seamdemo-ejb>set MAVEN_OPTS=-Xmx1400m -Xms1024m

             

            Do I need to set something in the Embedded AS config?

             

            Thanks,

            Coenos

            • 3. Re: How much heap space needed for Embedded AS?
              jaikiran

              coenos wrote:

               


               

              C:\Workspaces\SeamWorkspace\seamdemo-parent\seamdemo-ejb>mvn test
              C:\Workspaces\SeamWorkspace\seamdemo-parent\seamdemo-ejb>set MAVEN_OPTS=-Xmx1400m -Xms1024m

               

              That won't work. Follow this instead http://community.jboss.org/message/68421#68421

              • 4. Re: How much heap space needed for Embedded AS?
                coenos

                Cool it works, I already had set it but in the integration-test lifecycle phase and these settings weren't picked up.

                 

                But now I get another stackTrace. I tested the standalone distro and that starts up fine.

                 

                19:54:39,421 ERROR [ScopedProfileServiceController] Error installing to Create: name=ProfileKey@1179c1c[domain=default, server=default, name=farm] state=Configu
                red mode=On Demand requiredState=Installed
                java.lang.reflect.InvocationTargetException
                        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.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:97)
                        at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.invoke(AbstractProfileLifeCycleAction.java:77)
                        at org.jboss.system.server.profileservice.repository.AbstractProfileLifeCycleAction.install(AbstractProfileLifeCycleAction.java:49)
                        at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
                        at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:403)
                        at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1633)
                        at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:935)
                        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1083)
                        at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:985)
                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:775)
                        at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
                        at org.jboss.system.server.profileservice.repository.AbstractProfileService.registerProfile(AbstractProfileService.java:308)
                        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:258)
                        at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:97)
                        at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:860)
                        at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:441)
                        at java.lang.Thread.run(Thread.java:619)
                Caused by: java.lang.IllegalStateException: Must register RepositoryClusteringHandler before calling create()
                        at org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepository.create(ClusteredDeploymentRepository.java:198)
                        at org.jboss.system.server.profileservice.repository.clustered.ClusteredDeploymentRepository.load(ClusteredDeploymentRepository.java:226)
                        at org.jboss.system.server.profile.repository.AbstractProfile.create(AbstractProfile.java:158)
                        ... 22 more
                19:54:39,421 INFO  [ProfileServiceBootstrap] Loading profile: ProfileKey@13e596e[domain=default, server=default, name=all]
                Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 62.062 sec <<< FAILURE!