0 Replies Latest reply on Nov 10, 2011 7:56 AM by blep

    AS7.0.1: Spring Webflow and JCA issue

    blep Newbie

      Hi,

       

      I'm trying to execute a Spring Webflow JSF webapp in AS7. The webapp uses flow managed persistence feature.

       

      The problem I'm facing is the following:

       

      {code} java.io.IOException: This method is not supported org.jboss.jca.core.connectionmanager.AbstractConnectionManager.writeObject(AbstractConnectionManager.java:718) {code}

       

      On request processing, webflow serializes the flow execution, and the EntityManager as well.

       

      So the org.hibernate.ejb.EntityManagerImpl is serialized, embedding the org.hibernate.internal.SessionImpl which embeds himself jdbcConnectionAccess as a *transient* member. The JdbcConnectionAccess counts  the AbstractConnectionManager under the connectionProvider/dataSource/cm as a org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl. The other references to AbstractConnectionManager instances I found were accessible from transient members (but may be I did not find all of them!).

       

      So the only workaround I found is to disable the snapshotting, but it means this feature is not available under AS7, which is not currently acceptable for most projects we're managing. The same application works fine with AS5.1.

       

      Regards

       

      Full stack:

       

      {code} javax.servlet.ServletException: org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.webflow.execution.repository.snapshot.SnapshotCreationException: IOException thrown serializing flow execution -- this should not happen!           net.sf.ehcache.constructs.web.filter.Filter.logThrowable(Filter.java:153)           net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:98) cause mère     org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.webflow.execution.repository.snapshot.SnapshotCreationException: IOException thrown serializing flow execution -- this should not happen!           org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:656)           org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)           javax.servlet.http.HttpServlet.service(HttpServlet.java:734)           javax.servlet.http.HttpServlet.service(HttpServlet.java:847)           fr.bdf.center.poc.jboss.vs.tomcat.web.filter.FlowTimerFilter.doFilter(FlowTimerFilter.java:50)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)           org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)           org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)           org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)           org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)           org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)           org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:58)           org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)           net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:79)           net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:93) cause mère     org.springframework.webflow.execution.repository.snapshot.SnapshotCreationException: IOException thrown serializing flow execution -- this should not happen!           org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.<init>(SerializedFlowExecutionSnapshot.java:78)           org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshotFactory.createSnapshot(SerializedFlowExecutionSnapshotFactory.java:70)           org.springframework.webflow.execution.repository.snapshot.AbstractSnapshottingFlowExecutionRepository.snapshot(AbstractSnapshottingFlowExecutionRepository.java:75)           org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.putFlowExecution(DefaultFlowExecutionRepository.java:126)           org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:145)           org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)           org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)           org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)           org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)           org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)           org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)           javax.servlet.http.HttpServlet.service(HttpServlet.java:734)           javax.servlet.http.HttpServlet.service(HttpServlet.java:847)           fr.bdf.center.poc.jboss.vs.tomcat.web.filter.FlowTimerFilter.doFilter(FlowTimerFilter.java:50)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)           org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)           org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)           org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)           org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)           org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)           org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:58)           org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)           net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:79)           net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:93) cause mère     java.io.IOException: This method is not supported           org.jboss.jca.core.connectionmanager.AbstractConnectionManager.writeObject(AbstractConnectionManager.java:718)           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)           sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)           java.lang.reflect.Method.invoke(Method.java:597)           java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)           java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)           java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)           java.util.HashMap.writeObject(HashMap.java:1001)           sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)           java.lang.reflect.Method.invoke(Method.java:597)           java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)           java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)           java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)           java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)           java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)           org.hibernate.ejb.AbstractEntityManagerImpl.writeObject(AbstractEntityManagerImpl.java:1233)           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)           sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)           java.lang.reflect.Method.invoke(Method.java:597)           java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)           java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)           java.util.HashMap.writeObject(HashMap.java:1001)           sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)           java.lang.reflect.Method.invoke(Method.java:597)           java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)           java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)           java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:416)           org.springframework.webflow.core.collection.LocalAttributeMap.writeObject(LocalAttributeMap.java:327)           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)           sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)           java.lang.reflect.Method.invoke(Method.java:597)           java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)           java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)           org.springframework.webflow.engine.impl.FlowSessionImpl.writeExternal(FlowSessionImpl.java:154)           java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)           java.util.LinkedList.writeObject(LinkedList.java:943)           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)           sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)           sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)           java.lang.reflect.Method.invoke(Method.java:597)           java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)           java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)           org.springframework.webflow.engine.impl.FlowExecutionImpl.writeExternal(FlowExecutionImpl.java:312)           java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)           java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)           java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)           java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)           org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.serialize(SerializedFlowExecutionSnapshot.java:173)           org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.<init>(SerializedFlowExecutionSnapshot.java:70)           org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshotFactory.createSnapshot(SerializedFlowExecutionSnapshotFactory.java:70)           org.springframework.webflow.execution.repository.snapshot.AbstractSnapshottingFlowExecutionRepository.snapshot(AbstractSnapshottingFlowExecutionRepository.java:75)           org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository.putFlowExecution(DefaultFlowExecutionRepository.java:126)           org.springframework.webflow.executor.FlowExecutorImpl.launchExecution(FlowExecutorImpl.java:145)           org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:193)           org.springframework.faces.webflow.JsfFlowHandlerAdapter.handle(JsfFlowHandlerAdapter.java:48)           org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)           org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)           org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)           org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)           javax.servlet.http.HttpServlet.service(HttpServlet.java:734)           javax.servlet.http.HttpServlet.service(HttpServlet.java:847)           fr.bdf.center.poc.jboss.vs.tomcat.web.filter.FlowTimerFilter.doFilter(FlowTimerFilter.java:50)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368)           org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)           org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)           org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380)           org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169)           org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)           org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)           org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)           org.springframework.web.filter.ShallowEtagHeaderFilter.doFilterInternal(ShallowEtagHeaderFilter.java:58)           org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)           net.sf.ehcache.constructs.web.filter.GzipFilter.doFilter(GzipFilter.java:79)           net.sf.ehcache.constructs.web.filter.Filter.doFilter(Filter.java:93) note La trace complète de la cause mère de cette erreur est disponible dans les fichiers journaux de JBoss Web/7.0.1.Final.     JBoss Web/7.0.1.Final {code}