3 Replies Latest reply on Apr 25, 2006 11:08 AM by bdecoste

    SFSB breaks - moving from 4.0.4RC1 to 4.0.4CR2

      I'm not sure what went wrong here...I didn't see any indication of change in the behavior or lookup of SFSB in CR2 compared to RC1...but my app definitely breaks....and it ran flawlessly in RC1.

      My app is a simple shopping cart with a single SFSB called "ShoppingCartBean".

      I look it up like so:

      InitialContext ctx = new InitialContext();
      ShoppingCart cart = (ShoppingCart)ctx.lookup("MyEAR/ShoppingCartBean/local");
      


      I create the cart stub like that, then store it in an HttpSession to hang onto it.

      In RC1, this SFSB is found and functions exactly as expected and has been for the past couple of weeks...I built the entire application around this EJB.

      Now, when I run this same app on RC2 I get this exception:

      javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: 4snf2b-c1giqr-em9ava3w-1-em9awccr-7 at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:251) at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:59) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98) at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:199) at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
      


      ...not sure why that is??

      The EJB was definitely found by the server upon deploy:

      INFO [EJBContainer] STARTED EJB: com.myapp.ShoppingCartBean ejbName: ShoppingCartBean
      


      It looks like it's *creating* it but not finding the same instance?

      I'm sure I just missed something in the changes from RC1 to CR2. Can someone help me out?

      Thanks!

        • 1. Re: SFSB breaks - moving from 4.0.4RC1 to 4.0.4CR2
          ejb3workshop

          I had similar problems and found that a prior exception caused the bean reference un-usable. Sorry I don't have more details, but I would check if there were any earlier exceptions.

          • 2. Re: SFSB breaks - moving from 4.0.4RC1 to 4.0.4CR2
            henkomannen

            This happens to me as well after an exception has been raised.

            16:01:40,759 ERROR [Login] Could not find Stateful bean: 5c4og5m-cflx7q-emg9yzh7-1-emga1xta-8
            16:01:40,777 ERROR [STDERR] javax.ejb.EJBNoSuchObjectException: Could not find Stateful bean: 5c4og5m-cflx7q-emg9yzh7-1-emga1xta-8
            16:01:40,778 ERROR [STDERR] at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:251)
            16:01:40,778 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:59)
            16:01:40,778 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
            16:01:40,778 ERROR [STDERR] at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
            16:01:40,779 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
            16:01:40,779 ERROR [STDERR] at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
            16:01:40,779 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
            16:01:40,779 ERROR [STDERR] at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
            16:01:40,779 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:98)
            16:01:40,779 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:199)
            16:01:40,780 ERROR [STDERR] at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
            16:01:40,780 ERROR [STDERR] at $Proxy103.getPortalUser(Unknown Source)
            


            Somewhat critical. :)

            • 3. Re: SFSB breaks - moving from 4.0.4RC1 to 4.0.4CR2
              bdecoste

              Could you please send the source to me at bdecoste@jboss.com and I will investigate?