[
http://jira.jboss.com/jira/browse/JBSEAM-279?page=comments#action_12341561 ]
German de la Cruz commented on JBSEAM-279:
------------------------------------------
yes, I've done that already, but it didn't work
I think I've found the problem. My bean, speciesBean, is an Event Scope SFSB. Inside
it, I've a propery called specieItems tagged as DataBinder (using a @SelectItems
provided by the excellent library provided by Jim Hazen that is in the wiki) This
DataBinder has a Page scope.
In the middle of the request (I don't know why, but probably is a specfication issue)
Seam call to destroy all the event Beans. There, my specieFinder is destroy. Inmediatly
after this, It's opened anothe request. In point of the code, my specieItem is called.
then, the bean is called. BUT. It has been destroy, then, the reference in the HTTP
request is invalid. Then, the exception.
I think the bug is the http-request mut be cleanup the the event scope is cleaned, since
it's used to recover the values and some of them (The components) have been detroyed.
This is the log
21:31:54,308 DEBUG [Lifecycle] >>> Begin web request
21:31:54,309 DEBUG [Component] seam component not found:
org.jboss.seam.security.authenticator
21:31:54,332 DEBUG [RepositoryClassLoader] setRepository,
repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@5aa4bd97,
cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@633f4aeb{ url=null
,addedOrder=0}
21:31:54,339 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.manager
21:31:54,340 DEBUG [Component] initializing new instance of: or
....
21:32:12,008 DEBUG [SeamVariableResolver] resolved name to Seam component
21:32:12,009 DEBUG [Manager] Storing conversation state: 8
21:32:12,009 DEBUG [Lifecycle] flushing page context
21:32:12,031 DEBUG [Lifecycle] After render response, destroying contexts
21:32:12,031 DEBUG [Component] seam component not found:
org.jboss.seam.security.authenticator
21:32:12,031 DEBUG [Lifecycle] destroying event context
21:32:12,031 DEBUG [Contexts] destroying: org.jboss.seam.core.manager
21:32:12,031 DEBUG [Contexts] destroying: class
org.apache.myfaces.shared_tomahawk.renderkit.html.util.JavascriptUtils.OLD_VIEW_ID
21:32:12,031 DEBUG [Contexts] destroying:
org.apache.myfaces.SCROLL_HIDDEN_INPUT_searchForm
21:32:12,031 DEBUG [Contexts] destroying: msgs
21:32:12,031 DEBUG [Contexts] destroying: breedFinder
21:32:12,031 DEBUG [ExtendedPersistenceContextPropagationInterceptor] ++++
LongLivedSessionPropagationInterceptor
21:32:12,031 DEBUG [Contexts] destroying:
javax.faces.component.UIForm.org.apache.myfaces.HIDDEN_COMMAND_INPUTS_SET_dataTableForm
21:32:12,032 DEBUG [Contexts] destroying:
javax.faces.component.UIForm.org.apache.myfaces.HIDDEN_COMMAND_INPUTS_SET__id50:dynamicForm
21:32:12,032 DEBUG [Contexts] destroying:
org.apache.myfaces.custom.navmenu.htmlnavmenu.HtmlPanelNavigationMenu.PREVIOUS_VIEW_ROOT
21:32:12,032 DEBUG [Contexts] destroying:
org.apache.myfaces.application.jsp.JspStateManagerImpl.RESTORED_SERIALIZED_VIEW
21:32:12,032 DEBUG [Contexts] destroying: specieFinder
21:32:12,032 DEBUG [ExtendedPersistenceContextPropagationInterceptor] ++++
LongLivedSessionPropagationInterceptor
21:32:12,032 DEBUG [Contexts] destroying:
org.apache.myfaces.renderkit.html.util.DummyFormUtils.DUMMY_FORM_INFO
21:32:12,032 DEBUG [Contexts] destroying:
org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW
21:32:12,032 DEBUG [Contexts] destroying:
org.apache.myfaces.SCROLL_HIDDEN_INPUT__id50:dynamicForm
21:32:12,032 DEBUG [Contexts] destroying:
org.apache.myfaces.AddResourceFactory.CACHE_MAP_KEY
21:32:12,032 DEBUG [Contexts] destroying:
javax.faces.component.UIForm.org.apache.myfaces.HIDDEN_COMMAND_INPUTS_SET_searchForm
21:32:12,032 DEBUG [Contexts] destroying:
org.apache.myfaces.component.html.util.ExtensionFilter.doFilterCalled
21:32:12,032 DEBUG [Contexts] destroying: facelets.Encoding
21:32:12,032 DEBUG [Contexts] destroying:
org.apache.myfaces.SCROLL_HIDDEN_INPUT_dataTableForm
21:32:12,032 DEBUG [Contexts] destroying: jsf_sequence
21:32:12,032 DEBUG [Contexts] destroying: com.sun.facelets.legacy.ELCONTEXT
21:32:12,032 DEBUG [Lifecycle] flushing server-side conversation context
21:32:12,032 DEBUG [Lifecycle] <<< End web request
you can see, it is destroy... "21:32:12,032 DEBUG [Contexts] destroying:
specieFinder"
continuing in the same request....
21:32:12,033 DEBUG [AbstractSeamPhaseListener] No active conversation context
21:32:22,178 DEBUG [Lifecycle] >>> Begin web request
21:32:22,179 DEBUG [Component] seam component not found:
org.jboss.seam.security.authenticator
21:32:22,185 DEBUG [RepositoryClassLoader] setRepository,
repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@5aa4bd97,
cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@5b757c3a{ url=null
,addedOrder=0}
21:32:22,207 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.manager
21:32:22,207 DEBUG [Component] initializing new instance of: org.jboss.seam.core.manager
21:32:22,208 DEBUG [Manager] Restoring conversation with id: 8
21:32:22,208 DEBUG [AbstractSeamPhaseListener] After restoring conversation context:
ConversationContext(8)
21:32:22,209 DEBUG [SeamVariableResolver] resolving name: breedEditor
21:32:22,809 DEBUG [Contexts] found in conversation context: breedEditor
21:32:22,809 DEBUG [SeamVariableResolver] resolved name to Seam component
21:32:22,809 DEBUG [ExtendedPersistenceContextPropagationInterceptor] ++++
LongLivedSessionPropagationInterceptor
21:32:22,810 DEBUG [Component] instantiating Seam component: b
....
21:32:47,317 DEBUG [Contexts] destroying: msgs
21:32:47,317 DEBUG [Contexts] destroying:
javax.faces.component.UIForm.org.apache.myfaces.HIDDEN_COMMAND_INPUTS_SET_dataTableForm
21:32:47,317 DEBUG [Contexts] destroying:
org.apache.myfaces.renderkit.html.util.DummyFormUtils.DUMMY_FORM_INFO
21:32:47,317 DEBUG [Contexts] destroying: specieFinder
21:32:47,317 DEBUG [StatefulSessionFilePersistenceManager] Attempting to activate;
id=3j001-esf1np-er5g8vyf-1-er5jna97-39
21:32:47,317 DEBUG [StatefulSessionFilePersistenceManager] Reading session state from:
/tmp/jboss4/default/tmp/sessions/SpecieFinderBean-er5jiad8-2p/3j001-esf1np-er5g8vyf-1-er5jna97-39.ser
21:32:47,318 ERROR [STDERR] javax.ejb.EJBNoSuchObjectException: Could not find Stateful
bean: 3j001-esf1np-er5g8vyf-1-er5jna97-39
21:32:47,318 ERROR [STDERR] at
org.jboss.ejb3.cache.simple.SimpleStatefulCache.get(SimpleStatefulCache.java:266)
21:32:47,318 ERROR [STDERR] at
org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:59)
21:32:47,318 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
21:32:47,318 ERROR [STDERR] at
org.jboss.ejb3.stateful.StatefulRemoveInterceptor.invoke(StatefulRemoveInterceptor.java:81)
21:32:47,318 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
21:32:47,318 ERROR [STDERR] at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:78)
21:32:47,318 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
21:32:47,318 ERROR [STDERR] at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
21:32:47,318 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
21:32:47,319 ERROR [STDERR] at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
21:32:47,319 ERROR [STDERR] at
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
21:32:47,319 ERROR [STDERR] at
org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:188)
21:32:47,319 ERROR [STDERR] at
org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
21:32:47,319 ERROR [STDERR] at $Proxy309.destroy(Unknown Source)
21:32:47,319 ERROR [STDERR] at
manchot.actions.SpecieFinder$$FastClassByCGLIB$$7265d8d8.invoke(<generated>)
21:32:47,319 ERROR [STDERR] at
net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
21:32:47,319 ERROR [STDERR] at
org.jboss.seam.interceptors.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:73)
21:32:47,319 ERROR [STDERR] at
org.jboss.seam.ejb.SeamInterceptor.invokeInContexts(SeamInterceptor.java:177)
21:32:47,319 ERROR [STDERR] at
org.jboss.seam.ejb.SeamInterceptor.invoke(SeamInterceptor.java:143)
21:32:47,319 ERROR [STDERR] at
org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:130)
21:32:47,319 ERROR [STDERR] at
org.jboss.seam.interceptors.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:44)
21:32:47,319 ERROR [STDERR] at
org.jboss.seam.interceptors.ClientSideInterceptor.intercept(ClientSideInterceptor.java:38)
21:32:47,319 ERROR [STDERR] at
manchot.actions.SpecieFinder$$EnhancerByCGLIB$$a4767741.destroy(<generated>)
21:32:47,319 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
21:32:47,319 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
21:32:47,319 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
21:32:47,319 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:585)
21:32:47,319 ERROR [STDERR] at
org.jboss.seam.util.Reflections.invoke(Reflections.java:17)
21:32:47,347 ERROR [STDERR] at
org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:82)
21:32:47,347 ERROR [STDERR] at
org.jboss.seam.Component.callComponentMethod(Component.java:1476)
21:32:47,347 ERROR [STDERR] at
org.jboss.seam.Component.callDestroyMethod(Component.java:1464)
21:32:47,347 ERROR [STDERR] at
org.jboss.seam.contexts.Contexts.destroy(Contexts.java:189)
21:32:47,347 ERROR [STDERR] at
org.jboss.seam.contexts.Lifecycle.flushAndDestroyContexts(Lifecycle.java:638)
21:32:47,347 ERROR [STDERR] at
org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:492)
21:32:47,347 ERROR [STDERR] at
org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:112)
21:32:47,347 ERROR [STDERR] at
org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:89)
21:32:47,347 ERROR [STDERR] at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:391)
21:32:47,347 ERROR [STDERR] at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
21:32:47,347 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
21:32:47,347 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
21:32:47,347 ERROR [STDERR] at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
21:32:47,347 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
21:32:47,348 ERROR [STDERR] at
org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:30)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
21:32:47,348 ERROR [STDERR] at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
21:32:47,348 ERROR [STDERR] at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
21:32:47,348 ERROR [STDERR] at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
21:32:47,348 ERROR [STDERR] at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
21:32:47,348 ERROR [STDERR] at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
21:32:47,348 ERROR [STDERR] at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
21:32:47,348 ERROR [STDERR] at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
21:32:47,348 ERROR [STDERR] at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
21:32:47,348 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
21:32:47,348 WARN [Contexts] Could not destroy component: specieFinder
The difference in time is dued to I was debbuging... :D
thanks!
Component lifetimes not guaranteed for SFSB backed components.
--------------------------------------------------------------
Key: JBSEAM-279
URL:
http://jira.jboss.com/jira/browse/JBSEAM-279
Project: JBoss Seam
Issue Type: Bug
Components: Core
Affects Versions: 1.0.1
Reporter: ryan dewell
Seam does not guarantee component lifecycles for SFSB backed components.
The container controls when SFSB's are removed / timed out. When Seam accesses an
SFSB that has been removed by the container, it results in an EJBNoSuchObjectException.
The JBoss specific workaround for Session scoped components is to use the @CacheConfig
annotation, setting the idle timeout to match the HttpSession timeout. Similar changes
would have to be made to any Conversation scoped component that uses a timeout greater
than the default SFSB timeout of 5 minutes (which just happens to be the default timeout
for Seam conversations).
There is no workaround for Application scoped components. Once removed by the container,
EJBNoSuchObjectException's will continue to be thrown as Seam tries to access them.
Seam's context model needs to somehow guarantee that its SFSB instances aren't
removed by the container before Seam is finished with them. And/or, it needs to recover
from EJBNoSuchObjectException's more gracefully, especially with regards to
Application scoped components for which there is no workaround.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira