0 Replies Latest reply on Nov 30, 2012 6:06 AM by kapfi

    Arquillian stress test undeploy EJB

    kapfi Newbie

      Hi

       

      I have a problem and cannot find any answer.

       

      Im working on load tests for my project and i want to store heaps of data into the database.

      The problem is that the container obviously destroys my bean during usage after persisting around 35000 to 40000 entities with one 1:n relation. Im running this test in a loop of 10 iterations persisting 5000 entities a run.

      Im using a MySQL database but it doesnt look like Im running out of connections since i set the max_connections to 500 and the max pool size of the container to 450.

      The database status says max usage of connections 93. So i guess the connection to the database cannot be the problem.

       

      A mehtod annotated with the @PreDestroy writes a system output right before the exception. So obviously it destroys the bean at this time.

       

      WHY??? ANY HELP APPRECIATED !!!

       

       

      The Exception:

      11:14:51,018 INFO  [realtf.itest.server.core.bpu.load.LocationBPULoadTest] (pool-4-thread-1) 2000 entities persisted

      11:14:52,008 INFO  [realtf.itest.server.core.bpu.load.LocationBPULoadTest] (pool-4-thread-1) 3000 entities persisted

      11:14:53,178 INFO  [realtf.itest.server.core.bpu.load.LocationBPULoadTest] (pool-4-thread-1) 4000 entities persisted

      11:14:54,397 INFO  [realtf.itest.server.core.bpu.load.LocationBPULoadTest] (pool-4-thread-1) 5000 entities persisted

      11:14:54,397 INFO  [realtf.itest.server.core.bpu.load.LocationBPULoadTest] (pool-4-thread-1) Rounds: 7

      11:14:55,652 INFO  [realtf.itest.server.core.bpu.load.LocationBPULoadTest] (pool-4-thread-1) 1000 entities persisted

      11:14:56,848 INFO  [realtf.itest.server.core.bpu.load.LocationBPULoadTest] (pool-4-thread-1) 2000 entities persisted

      11:14:57,967 INFO  [stdout] (MSC service thread 1-2) !!!IN PREDESTROY OF BEAN!!!IN PREDESTROY OF BEAN!!!IN PREDESTROY OF BEAN!!!IN PREDESTROY OF BEAN!!!IN PREDESTROY OF BEAN!!!

      11:14:58,008 INFO  [org.jboss.weld.deployer] (MSC service thread 1-3) JBAS016009: Stopping weld service for deployment f11878ea-9959-467d-a7b5-8f4836b3a619.jar

      11:14:57,981 ERROR [org.jboss.ejb3.invocation] (pool-4-thread-1) JBAS014134: EJB Invocation failed on component LocationBPU for method public abstract realtf.data.Location realtf.server.core.bpu.interfaces.ILocationBPU.persist(realtf.data.Location) throws realtf.commons.exception.PersistenceException: javax.ejb.EJBException: java.lang.IllegalStateException: JBAS011049: Component is stopped

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:166) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:328) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:192) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:32) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:173) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

          at realtf.server.core.bpu.interfaces.ILocationBPU$$$view10.persist(Unknown Source) [f11878ea-9959-467d-a7b5-8f4836b3a619.jar:]

          at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source) [:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

          at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:111) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:105) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

          at realtf.server.core.bpu.ILocationBPU$1795848013$Proxy$_$$_Weld$Proxy$.persist(ILocationBPU$1795848013$Proxy$_$$_Weld$Proxy$.java) [f11878ea-9959-467d-a7b5-8f4836b3a619.jar:]

          at realtf.itest.server.core.bpu.load.LocationBPULoadTest.DataLoadTest(LocationBPULoadTest.java:97) [f11878ea-9959-467d-a7b5-8f4836b3a619.jar:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

          at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) [arquillian-service:]

          at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) [arquillian-service:]

          at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270) [arquillian-service:]

          at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60) [arquillian-service:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]

          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135) [arquillian-service:]

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115) [arquillian-service:]

          at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67) [arquillian-service:]

          at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38) [arquillian-service:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]

          at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99) [arquillian-service:]

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81) [arquillian-service:]

          at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89) [arquillian-service:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]

          at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75) [arquillian-service:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]

          at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60) [arquillian-service:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

          at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90) [arquillian-service:]

          at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88) [arquillian-service:]

          at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135) [arquillian-service:]

          at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240) [arquillian-service:]

          at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79) [arquillian-service:]

          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71) [arquillian-service:]

          at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) [arquillian-service:]

          at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) [arquillian-service:]

          at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) [arquillian-service:]

          at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) [arquillian-service:]

          at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) [arquillian-service:]

          at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199) [arquillian-service:]

          at org.junit.runners.ParentRunner.run(ParentRunner.java:236) [arquillian-service:]

          at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147) [arquillian-service:]

          at org.junit.runner.JUnitCore.run(JUnitCore.java:157) [arquillian-service:]

          at org.junit.runner.JUnitCore.run(JUnitCore.java:136) [arquillian-service:]

          at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65) [arquillian-service:]

          at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128) [arquillian-service:]

          at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107) [arquillian-service:]

          at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:226) [arquillian-service:]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_24]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.6.0_24]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.6.0_24]

          at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_24]

          at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:111) [rt.jar:1.6.0_24]

          at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:45) [rt.jar:1.6.0_24]

          at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:226) [rt.jar:1.6.0_24]

          at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [rt.jar:1.6.0_24]

          at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:251) [rt.jar:1.6.0_24]

          at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:857) [rt.jar:1.6.0_24]

          at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:795) [rt.jar:1.6.0_24]

          at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:498)

          at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:246)

          at org.jboss.remotingjmx.protocol.v1.ServerProxy$InvokeHandler.handle(ServerProxy.java:1034)

          at org.jboss.remotingjmx.protocol.v1.ServerProxy$MessageReciever$1.run(ServerProxy.java:215)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_24]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_24]

          at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_24]

      Caused by: java.lang.IllegalStateException: JBAS011049: Component is stopped

          at org.jboss.as.ee.component.BasicComponent.waitForComponentStart(BasicComponent.java:104) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:127) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:85) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.component.stateless.StatelessSessionComponent$1.create(StatelessSessionComponent.java:66) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.component.stateless.StatelessSessionComponent$1.create(StatelessSessionComponent.java:63) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.pool.AbstractPool.create(AbstractPool.java:60) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.pool.strictmax.StrictMaxPool.get(StrictMaxPool.java:123) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:47) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288) [jboss-invocation-1.1.1.Final.jar:1.1.1.Final]

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:228) [jboss-as-ejb3-7.1.1.Final.jar:7.1.1.Final]

          ... 125 more