5 Replies Latest reply on Jul 17, 2002 4:55 PM by Dain Sundstrom

    IllegalStateException using CMP and DataSource from SessionB

    Febbraro Newbie

      Using JBoss 3.0.0 with Tomcat 4.0.3.

      I have narrowed down this problem to a StatelessSessionBean that uses both a CMP EJB and a DataSource to execute SQL.

      If I call interface methods on my EJB before getting a Connection (ds.getConnection()) all works fine

      If I get a Connection (ds.getConnection()) before I call an interface method on my EJB I get the following exception

      (I also tried making a separate DataSource for the SQL and the CMP Beans, same error)

      java.rmi.ServerException: removing bean lock and it has tx set!; nested exception is:
      java.lang.IllegalStateException: removing bean lock and it has tx set!
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:119)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
      at org.jboss.ejb.Container.invoke(Container.java:705)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      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:73)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:76)
      at org.jboss.proxy.ejb.EntityInterceptor.invoke(EntityInterceptor.java:116)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy536.getCompanyid(Unknown Source)
      at se.vitea.etriage.ejb.session.FacadeRightsBean.getRootCompaniesForUser(FacadeRightsBean.java:1313)


      Please help, thank you....