10 Replies Latest reply on Jul 18, 2005 11:42 PM by Gray

    java.lang.ClassCircularityError on JBoss 3.0.6

    Robert Caranica Newbie


      Hello,


      First of all, the JBoss version I'm working with is 3.0.6

      I'm having the following problem:

      In an EAR I have:
      - a couple of Stateless Session Beans and
      - a loaded-on-startup servlet (in a WAR inside the EAR)

      On the servlet's init(), I look-up those EJBs and start another thread which, at its discretion makes calls on the lookup()'ed EJBs.

      The problem is that sometimes I get java.lang.ClassCircularityError(s) like the ones below:

      java.lang.ClassCircularityError:org/jboss/ejb/StatelessSessionEnterpriseContext$SessionContextImpl
      at org.jboss.ejb.StatelessSessionEnterpriseContext.(StatelessSessionEnterpriseContext.java:45)
      at org.jboss.ejb.plugins.StatelessSessionInstancePool.create(StatelessSessionInstancePool.java:61)
      at org.jboss.ejb.plugins.AbstractInstancePool.get(AbstractInstancePool.java:184)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:63)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:712)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)


      or:

      java.lang.ClassCircularityError: org/jboss/resource/connectionmanager/CachedConnectionManager$IdentityWrapper
      java.lang.ClassCircularityError: org/jboss/resource/connectionmanager/CachedConnectionManager$IdentityWrapper
      at org.jboss.resource.connectionmanager.CachedConnectionManager.pushMetaAwareObject(CachedConnectionManager.java:137)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:183)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:107)
      at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144)
      at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:62)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:77)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:130)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:204)
      at org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:313)
      at org.jboss.ejb.Container.invoke(Container.java:712)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:111)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)

      It may happen and indeed it does happen that the call on the EJBs runs _before_ the "successfully deployed" message from JBoss for that EAR.

      Looking at that specific line where the exception(s) are generated, I noticed that it happens on the line where the inner class is instatiated (org/jboss/ejb/StatelessSessionEnterpriseContext$SessionContextImpl or CachedConnectionManager$IdentityWrapper).

      Has anyone seen such behavior ? Is it normal ? If not, has it been resolved in the newer JBoss versions ?

      Robert