9 Replies Latest reply on Mar 15, 2007 9:37 AM by kurtstam

    OutOfMemoryError

    joshsmith

      Im currently making a program which, at the moment, is very similar to the Fun CBR example, however, i am getting the following error (when running ant run):

      
      run:
       [echo] Routing: make sure to also run receiveServerA, receiveServerB, receiveServerC
       [java] +----------------------------------------------------------+
       [java] | |
       [java] | Starting JBossESB... |
       [java] | |
       [java] +----------------------------------------------------------+
       [java] Reading config from /home/josh/jboss/jbossesb-4.0.5.GA/samples/routing/jbossesb.xml
       [java] java.lang.reflect.InvocationTargetException
       [java] at org.apache.ws.scout.transport.RMITransport.send(RMITransport.java:91)
       [java] at org.apache.ws.scout.registry.RegistryImpl.execute(RegistryImpl.java:273)
       [java] at org.apache.ws.scout.registry.RegistryImpl.getBusinessDetail(RegistryImpl.java:870)
       [java] at org.apache.ws.scout.registry.RegistryImpl.getBusinessDetail(RegistryImpl.java:850)
       [java] at org.apache.ws.scout.registry.BusinessQueryManagerImpl.getRegistryObject(BusinessQueryManagerImpl.java:707)
       [java] at org.apache.ws.scout.registry.BusinessQueryManagerImpl.getServiceFromBusinessService(BusinessQueryManagerImpl.java:775)
       [java] at org.apache.ws.scout.registry.BusinessQueryManagerImpl.getRegistryObject(BusinessQueryManagerImpl.java:739)
       [java] at org.apache.ws.scout.registry.BusinessQueryManagerImpl.findServiceBindings(BusinessQueryManagerImpl.java:584)
       [java] at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findServiceBindings(JAXRRegistryImpl.java:657)
       [java] at org.jboss.internal.soa.esb.services.registry.JAXRRegistryImpl.findEPRs(JAXRRegistryImpl.java:322)
       [java] at org.jboss.soa.esb.listeners.RegistryUtil.getEprs(RegistryUtil.java:212)
       [java] at org.jboss.soa.esb.listeners.gateway.JmsGatewayListener.doInitialise(JmsGatewayListener.java:92)
       [java] at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.initialise(AbstractManagedLifecycle.java:120)
       [java] at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.initialiseInstances(ManagedLifecycleController.java:78)
       [java] at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:35)
       [java] at org.jboss.soa.esb.listeners.config.ConfigurationController.processConfiguration(ConfigurationController.java:314)
       [java] at org.jboss.soa.esb.listeners.config.ConfigurationController.<init>(ConfigurationController.java:120)
       [java] at org.jboss.soa.esb.listeners.StandAloneBootStrapper.initiateController(StandAloneBootStrapper.java:191)
       [java] at org.jboss.soa.esb.listeners.StandAloneBootStrapper.<init>(StandAloneBootStrapper.java:126)
       [java] at org.jboss.soa.esb.listeners.StandAloneBootStrapper.<init>(StandAloneBootStrapper.java:103)
       [java] at org.jboss.soa.esb.listeners.StandAloneBootStrapper.main(StandAloneBootStrapper.java:80)
       [java] Caused by: java.lang.reflect.InvocationTargetException
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [java] at java.lang.reflect.Method.invoke(Method.java:585)
       [java] at org.apache.ws.scout.transport.RMITransport.send(RMITransport.java:86)
       [java] ... 20 more
       [java] Caused by: java.lang.OutOfMemoryError: Java heap space
       [java] Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
      
      BUILD FAILED
      /home/josh/jboss/jbossesb-4.0.5.GA/samples/routing/build.xml:70: Java returned: 1
      
      



      build.xml:70 is:

      <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
      


      I thought it was something to do with an error in my jbossesb.xml, however I reverted to an earlier version when this error wasnt present, but it is still happening. Any suggestions?

      My jbossesb.xml can be found here:

      http://www.students.ncl.ac.uk/j.f.hepworth-smith/jbossesb.xml



        • 1. Re: OutOfMemoryError
          marklittle

          Can we assume the Fun CBR example works fine in your installation?

          • 2. Re: OutOfMemoryError
            kurtstam

            Can you start up with a bit more memory then the default?

            thx,

            --Kurt

            • 3. Re: OutOfMemoryError
              joshsmith

              I thought the fun cbr was still working, however it too crashes with the OutOfMemory exception, but after executing the 'ant runtest' command (it is still the 'ant run' window which reports the error).

              How do I start up with more memory?

              • 4. Re: OutOfMemoryError
                kurtstam

                it's VMArgument. you'd need to modify the ant target. Are you using the trunk or 4.0.GA? I'm pretty sure GA worked as is.

                • 5. Re: OutOfMemoryError
                  joshsmith

                  Im using the 4.0.GA and have had the fun cbr working fine before. I know its a vm argument, but how do you specify that argument in the build.xml?

                  • 6. Re: OutOfMemoryError
                    kurtstam

                    http://ant.apache.org/manual/CoreTasks/java.html

                    Do something like:

                     <target name="run" depends="jars">
                     <echo>Basic JMS Gateway and Listener with Actions</echo>
                     <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true">
                     <arg value="${esb-config}"/>
                     <jvmargs value="-Xmx128Mb"/>
                     <classpath refid="classpath"/>
                     </java>
                     </target>
                    


                    I think this may work too:

                     <target name="run" depends="jars">
                     <echo>Basic JMS Gateway and Listener with Actions</echo>
                     <java fork="yes" classname="org.jboss.soa.esb.listeners.StandAloneBootStrapper" failonerror="true" maxmemory="128m">
                     <arg value="${esb-config}"/>
                     <classpath refid="classpath"/>
                     </java>
                     </target>
                    


                    --Kurt

                    • 7. Re: OutOfMemoryError
                      joshsmith

                      Cheers kurt.

                      The first one doesnt work, jvmargs is not an accepted nested element of , but the second one works a treat.

                      • 8. Re: OutOfMemoryError
                        joshsmith

                        OK, well that worked fine for a couple of runs, and then I got the same error again, so I had to increased the maxmemory to 256m.

                        Does anyone know why this could be happening? I never had this problem previously.

                        • 9. Re: OutOfMemoryError
                          kurtstam

                          Sorry to see this John. I have been fixing some memory and thread leaks which will go into MP1 due out next week, but nothing as big as you describe ("a few runs").. Is what you are running pretty much the funCBR as-is? I can run it under some load next week. Maybe until then you can give it some more memory.. You can try to look at jconsole, to see if you can find anything interesting, which may help to fix this.

                          --Kurt