2 Replies Latest reply on May 1, 2002 10:15 AM by Nikolaj G.

    OutOfMemoryError with 99 entity beans

    Nikolaj G. Newbie

      Hi, hope you can help me here. Im getting "OutOfMemoryError" during deployment; the jar file is about 1Mb. I can force the error making 3 deployments right after each other. Im using 2.4.4.
      Two examples of error output:

      ***********
      1:

      [INFO,ContainerFactory] Undeployed application: file:/C:/Java/JBoss/JBoss/tmp/deploy/Default/videlityentity.jar/
      [INFO,J2eeDeployer] Destroying application videlityentity.jar
      [INFO,J2eeDeployer] Report of undeployment of J2EE application: file:/C:/Java/JBoss/JBoss/deploy/videlityentity.jar could not be reported.
      [INFO,J2eeDeployer] Deploy J2EE application: file:/C:/Java/JBoss/JBoss/deploy/videlityentity.jar
      [INFO,J2eeDeployer] Create application videlityentity.jar
      [INFO,J2eeDeployer] install EJB module videlityentity.jar
      [INFO,ContainerFactory] Deploying:file:/C:/Java/JBoss/JBoss/tmp/deploy/Default/videlityentity.jar/
      [ERROR,J2eeDeployer] Starting videlityentity.jar failed!
      [ERROR,Default] java.lang.OutOfMemoryError
      [ERROR,Default] <<no stack trace available>>
      [ERROR,Default]
      [INFO,J2eeDeployer] Module videlityentity.jar is not running
      [INFO,J2eeDeployer] Destroying application videlityentity.jar
      [ERROR,AutoDeployer] DeploymentInfo failed:file:/C:/Java/JBoss/JBoss/deploy/videlityentity.jar
      org.jboss.deployment.J2eeDeploymentException: Error while starting videlityentity.jar: null, Cause: java.lang.OutOfMemoryError
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:524)
      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:459)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
      at java.lang.Thread.run(Unknown Source)


      ***********
      2:

      [ERROR,AutoDeployer] DeploymentInfo failed:file:/C:/Java/JBoss/JBoss/deploy/vide
      lityentity.jar
      org.jboss.deployment.J2eeDeploymentException: Error while starting videlityentit
      y.jar: null, Cause: java.lang.OutOfMemoryError
      at org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:524)

      at org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:
      459)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:190)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:16
      28)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:15
      23)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
      at java.lang.Thread.run(Thread.java:484)


      Next

        • 1. Re: OutOfMemoryError with 99 entity beans
          Handerson Gomes Newbie

          Put more memory to JVM, propably this resolve your problem.

          Change the run.sh/run.bat:
          =============================================
          # Add the XML parser jars and set the JAXP factory names
          # Crimson parser JAXP setup(default)
          JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/crimson.jar
          JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.DocumentBuilderFactoryImpl
          JAXP="$JAXP -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryImpl"

          echo JBOSS_CLASSPATH=$JBOSS_CLASSPATH
          java $HOTSPOT $JAXP -Xms128m -Xmx256m -classpath $JBOSS_CLASSPATH org.jboss.Main $@

          =======================================
          where:
          -Xms set initial Java heap size
          -Xmx set maximum Java heap size

          Good Luck.

          Handerson Gomes
          Summa Technologies

          • 2. Re: OutOfMemoryError with 99 entity beans
            Nikolaj G. Newbie

            Hi Handerson,

            Thanx, it works. Problem was solved with 2.4.5 but got some errors making "remove" on a entity bean -> back to 2.4.4 (ps using MvcSoft)

            /nikolaj