SFSB breaks - moving from 4.0.4RC1 to 4.0.4CR2
tsar_bomba Apr 20, 2006 12:25 PMI'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!