[jboss-user] [EJB 3.0] - Could not find stateful bean (Seam2 & ICEfaces: Uploading a
Newlukai
do-not-reply at jboss.com
Tue Apr 8 05:03:14 EDT 2008
Hi there,
I've a problem with my application (it uses Seam and ICEfaces) in a special use case:
There is the possibility to attach files for an entity. Those files are stored on disk. The file upload is realized using a component (ice:inputFile) from ICEfaces. This component renders an iframe that contains a form. This iframe is rendered in the form that is used to display (and to change) the entity. So the page contains an "outer" and an "inner" form. Hitting "upload" this inner form is submitted and handled by a special Servlet by ICEfaces. It invokes a method in a manager bean, passing over a object that contains information about the uploaded file. The file is stored by my application.
This works fine. The page is rerendered and the list, that shows all attached files, shows the new file. The problem now is that I can click any button or link (whether it navigates to a new page or invokes an action), I get this exception in the server.log:
anonymous wrote : 2008-04-08 08:43:30,796 DEBUG [org.jboss.seam.contexts.FacesLifecycle] >>> Begin JSF request for /ares/showTestactionForDeveloper.seam
| 2008-04-08 08:43:30,796 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2008-04-08 08:43:30,796 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2008-04-08 08:43:30,796 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] beginning transaction prior to phase: RESTORE_VIEW 1
| 2008-04-08 08:43:30,796 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
| 2008-04-08 08:43:30,796 DEBUG [org.jboss.seam.transaction.UTTransaction] beginning JTA transaction
| 2008-04-08 08:43:30,796 DEBUG [org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager] Attempting to activate; id=4sub52-itsjob-fes2xwof-1-fes3w0kg-2g
| 2008-04-08 08:43:30,796 ERROR [org.jboss.seam.jsf.SeamPhaseListener] uncaught exception
| java.lang.IllegalStateException: Could not start transaction
| at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:581)
| at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:312)
| at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:140)
| at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:114)
| at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
| at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
| at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
| at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.renderCyclePartial(ReceiveSendUpdates.java:64)
| at com.icesoft.faces.webapp.http.core.ReceiveSendUpdates.service(ReceiveSendUpdates.java:40)
| at com.icesoft.faces.webapp.http.core.ViewBoundServer.service(ViewBoundServer.java:65)
| at com.icesoft.faces.webapp.http.core.RequestVerifier.service(RequestVerifier.java:44)
| at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer$Matcher.serviceOnMatch(PathDispatcherServer.java:50)
| at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:19)
| at com.icesoft.faces.webapp.http.servlet.ThreadBlockingAdaptingServlet.service(ThreadBlockingAdaptingServlet.java:19)
| at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:29)
| at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:106)
| at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:35)
| at com.icesoft.faces.webapp.http.servlet.PathDispatcher$Matcher.serviceOnMatch(PathDispatcher.java:52)
| at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:29)
| at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:79)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:654)
| at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:445)
| at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:343)
| at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:292)
| at com.icesoft.faces.webapp.xmlhttp.BlockingServlet.service(BlockingServlet.java:54)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
| at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.ejb.NoSuchEJBException: Could not find stateful bean: 4sub52-itsjob-fes2xwof-1-fes3w0kg-2g
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:390)
| at org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:375)
| at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:61)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:110)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:206)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:119)
| at $Proxy208.afterTransactionBegin(Unknown Source)
| at sun.reflect.GeneratedMethodAccessor629.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
| at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
| at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:76)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
| at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:54)
| at org.javassist.tmp.java.lang.Object_$$_javassist_0.afterTransactionBegin(Object_$$_javassist_0.java)
| at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:40)
| at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:576)
| ... 56 more
| 2008-04-08 08:43:30,796 DEBUG [org.jboss.seam.faces.Navigator] redirecting to: /error.xhtml
Almost directly after the beginning of the new LifeCycle, a stateful bean can't be found. And I don't know why. I assume that it has to do something with this upload because all page actions work fine until I upload a file.
I'm pretty sure that I've done a mistake in my application since it worked before. So I think I've done something to cause this exception. But I can't remember of a change in my application that could cause this.
Perhaps somebody knows or sees a correlation between the upload request and the (empty) StatefulCache? BTW: Does somebody know how to find out the name of the bean that should be activated? I can't find any information about this bean's id in the log.
Thanks in advance
Newlukai
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142291#4142291
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142291
More information about the jboss-user
mailing list