4 Replies Latest reply on Nov 28, 2011 5:09 AM by Sueleyman Vurucu

    Statefull beans in 7.1 Beta1

    Sueleyman Vurucu Expert

      Hi @ all,

      if I try to access to a simple stateful session bean from a remote java client then I get an Exception shown below:

       

      Exception in thread "main" javax.ejb.EJBException: java.lang.IllegalStateException: JBAS014366: Session id hasn't been set for stateful component: SingletonTest

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.handleExceptionInOurTx(CMTTxInterceptor.java:166)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:232)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:307)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:201)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

          at org.jboss.as.ejb3.remote.EJBRemoteTransactionPropogatingInterceptor.processInvocation(EJBRemoteTransactionPropogatingInterceptor.java:86)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

          at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

          at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:44)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

          at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:55)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

          at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)

          at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)

          at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.invokeMethod(MethodInvocationMessageHandler.java:256)

          at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler.access$200(MethodInvocationMessageHandler.java:56)

          at org.jboss.as.ejb3.remote.protocol.versionone.MethodInvocationMessageHandler$1.run(MethodInvocationMessageHandler.java:177)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)

          at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

          at java.util.concurrent.FutureTask.run(FutureTask.java:138)

          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:662)

          at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: java.lang.IllegalStateException: JBAS014366: Session id hasn't been set for stateful component: SingletonTest

          at org.jboss.as.ejb3.component.stateful.StatefulComponentInstanceInterceptor.processInvocation(StatefulComponentInstanceInterceptor.java:60)

          at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)

          at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:230)

          ... 23 more

       

      The same code EJB works fine in JBOSS 6.1.0