1 Reply Latest reply on Mar 28, 2011 10:34 AM by xasx

    Occassional NPE in JBoss (5.1.0GA) interceptor chain under heavy load

    Bernhard D Newbie

      Hi

       

      We run an application under JBoss 5.1.0GA/EJB3 1.0.19, requests (come over a proprietary protocol) are are served via a JBossNetty based resource adapter. A netty channel then acts as EJB client: It looks up a SFSB instance and then calls the appropriate business function

      Under heavy load (1000 clients, each client issues a request every 5 seconds), we occassionally experience NPEs in the JBoss interceptor chain when invoking a SFSB (here: Method processFCD) for the first time. As a consequence, subsequent calls to the EJB fail with NoSuchEJBException, although we seem to have a valid EJB handle. The only solution is to acquire a new SFSB instance.

      Has anyone experienced a similar problem and is there anything we as app programmers could do to prevent this?

      Maybe someone from the development team knows advice?

      Any help is greatly appreciated.

       

      regards,

      Bernhard

       

      PS: see the relevant stacktraces below.

       

       

      {code}

      2011-02-03 13:21:03,196 ERROR [org.amv.trafficsoft.connector.internal.handler.V2IHandler] (Gateway Worker 43) [id: 0x275d7b6b, /172.21.193.101:49413 => /172.21.200.25:25001] Unexpected exception in V2IHandler!

      javax.ejb.EJBException: java.lang.NullPointerException

          at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:77)

          at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)

          at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:182)

          at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:240)

          at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)

          at $Proxy350.processFCD(Unknown Source)

          at org.amv.trafficsoft.connector.internal.handler.V2IHandler.handleFCD(V2IHandler.java:199)

          at org.amv.trafficsoft.connector.internal.AbstractV2IHandler.messageReceived(AbstractV2IHandler.java:86)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)

          at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:76)

          at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)

          at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

          at java.lang.Thread.run(Unknown Source) Caused by: java.lang.NullPointerException

          at org.jboss.aop.InstanceAdvisorDelegate.getJoinpointAspect(InstanceAdvisorDelegate.java:263)

          at org.jboss.aop.InstanceAdvisorDelegate.getPerInstanceJoinpointAspect(InstanceAdvisorDelegate.java:215)

          at org.jboss.ejb3.interceptors.container.ManagedObjectAdvisor.getPerInstanceJoinpointAspect(ManagedObjectAdvisor.java:288)

          at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:158)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)

          at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_325579916.invoke(InvocationContextInterceptor_z_fillMethod_325579916.java)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)

          at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_325579916.invoke(InvocationContextInterceptor_z_setup_325579916.java)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:60)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:81)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)

          ... 31 more

       

      ................

      .............

      .........

       

       

      2011-02-03 13:26:03,678 ERROR [org.amv.trafficsoft.connector.internal.handler.V2IHandler] (Gateway Worker 45) [id: 0x275d7b6b, /172.21.193.101:49413 => /172.21.200.25:25001] Unexpected exception in V2IHandler!

      javax.ejb.NoSuchEJBException: Could not find stateful bean: 4sl5d32-weq67x-gj6baznr-1-gj6bfqtp-po

          at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:479)

          at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:430)

          at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:59)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)

          at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorv2.invoke(RoleBasedAuthorizationInterceptorv2.java:201)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:186)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)

          at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)

          at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:182)

          at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:240)

          at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:188)

          at $Proxy350.processFCD(Unknown Source)

          at org.amv.trafficsoft.connector.internal.V2IHandler.handleFCD(V2IHandler.java:316)

          at org.amv.trafficsoft.connector.internal.AbstractV2IHandler.messageReceived(AbstractV2IHandler.java:79)

          at org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:302)

          at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:76)

          at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:69)

          at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:316)

          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)

      {code}