2 Replies Latest reply on May 17, 2005 10:10 AM by Nikolay Tsankov

    Strange exception java.lang.NoClassDefFoundError: javax/ejb/

    Nikolay Tsankov Newbie

      While migrating to JBoss 4 (3.2.6 -> 4.0.2), one of the components threw this exception:

      14:22:52,422 [ERROR] [LogInterceptor] TransactionRolledbackException in method: public abstract com.my.StatelessSBean com.my.StatelessSBeanHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException, causedBy: org.jboss.ejb.plugins.LogInterceptor main
      java.lang.reflect.UndeclaredThrowableException
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:178)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:78)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:116)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:613)
      at org.jboss.ejb.Container.invoke(Container.java:894)
      at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
      at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(LocalInvoker.java:155)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)
      at org.jboss.invocation.InvokerInterceptor.invokeLocal(InvokerInterceptor.java:179)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:165)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
      at $Proxy390.create(Unknown Source)
      ...
      Caused by: java.lang.NoClassDefFoundError: javax/ejb/TransactionRolledbackLocalException
      at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:226)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:125)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
      at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:613)
      at org.jboss.ejb.Container.invoke(Container.java:894)
      at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
      at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
      at $Proxy382.create(Unknown Source)
      at com.my.AnotherSSEJB.ejbCreate(SQueueHandlingEJB.java:333)


      Any idea how this happens?

        • 1. Re: Strange exception java.lang.NoClassDefFoundError: javax/
          Nikolay Tsankov Newbie

          Some more info - tried to debug it with JBossIDE and got this:


          Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at PC=0x8090106
          Function=JVM_FindSignal+0x3041
          Library=C:\j2sdk1.4.2\jre\bin\client\jvm.dll

          Current Java thread:
          at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:178)
          at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:78)
          at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:109)
          at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
          at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:146)
          at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:116)
          at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:121)
          at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)
          at org.jboss.ejb.SessionContainer.internalInvokeHome(SessionContainer.java:613)
          at org.jboss.ejb.Container.invoke(Container.java:894)
          at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:342)
          at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:118)
          at $Proxy382.create(Unknown Source)
          at com.foo.MySessionEJB.ejbCreate(MySessionEJB.java:333)


          Any idea?

          • 2. Re: Strange exception java.lang.NoClassDefFoundError: javax/
            Nikolay Tsankov Newbie

            things got clear after reading the source - 2 EJBs (both are stateless session); EJB1 in it's ejbCreate() method calls EJB2Home.create and EJB2 does the same for EJB1. This mutual recursion was the reason behind those strange results. One would expect a stack overflow in this case, maybe it's really a bug of java 1.4.2.
            If anyone could enlighten me why this wasn't happening with JBoss 3.2.6, would really appreciate it