1 2 Previous Next 28 Replies Latest reply on May 25, 2006 6:25 AM by Gavin King

    SeamExtendedManagedPersistencePhaseListener

    Giampaolo Tomassoni Newbie

      I'm having a bad time with it. I'm developing a webapp in which I have conversations (and plan to use jBPM) and some custom servlet for handling images.

      The problem is that, sometime, my image servlet throws an exception by which I'm told that a UserTransaction is already active.

      The image servlet has to access the db (by its own means: no seam or whatever), so it obtains a UserTransaction, and EntityManager and begins a transaction. Using SeamPhaseListener everything was fine, but with SeamExtendedManagedPersistencePhaseListener it seems that transactions are now not committed/rolled-back once opened when a conversation is started.

      Now, I know that a transaction as well as an EntityManager or Hibernate Session object is something tied to a thread, so I suppose that when my image servlet fails it is because the thread it is running into is the very same hosting a previous seam request. Well, I'm not really shure this is the right seam behaviour, anyway: UserTransaction, EntityManager and Session instances should be closed or (somehow) detached from the thread at the end of a request, isn't it?

      Did I find something wrong in seam, or it's (again) just me?

      How I'm supposed to mitigate the two needs (transactions with seam conversations and servlet decoupling)?

      Regards.

        • 1. Re: SeamExtendedManagedPersistencePhaseListener
          Gavin King Master

          There was a bug like what you described, and one day I spent hours trying to track it down and concluded that it was not a bug in Seam, but rather a problem that only occurred after hot redeployment. I have always managed to make it go away by restarting JBoss.

          However, I have not seen it recently, and think it might be fixed in Seam CVS / JBoss 4.0.4.CR2.

          • 2. Re: SeamExtendedManagedPersistencePhaseListener
            Giampaolo Tomassoni Newbie

            You're right: cold-deploying the app I don't get anymore an IllegalWhatever exception due to an already-started transaction from the non-seam servlet.

            But now I get the following when accessing a parametrized page (eg.: thepage.jsf?c=3) from the very same page but different parameter (eg: from thepage.jsf?c=1) AND the switch happens in the very same HTTP connection (ie: the browser and tomcat are using an "http persistent connection").

            type Exception report
            
            message
            
            description The server encountered an internal error () that prevented it from fulfilling this request.
            
            exception
            
            javax.servlet.ServletException: could not register synchronization with JTA TransactionManager
             org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:52)
             org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            
            
            root cause
            
            javax.servlet.ServletException: could not register synchronization with JTA TransactionManager
             javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
             it.edlui.confesercenti.web.filter.ClientCacheDisableFilter.doFilter(ClientCacheDisableFilter.java:43)
             org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
             org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
             org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
            
            
            root cause
            
            org.hibernate.TransactionException: could not register synchronization with JTA TransactionManager
             org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:174)
             org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:1824)
             org.hibernate.impl.SessionImpl.getSessionFactory(SessionImpl.java:1669)
             org.hibernate.ejb.AbstractEntityManagerImpl.markAsRollback(AbstractEntityManagerImpl.java:388)
             org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:540)
             org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:562)
             org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:513)
             org.hibernate.ejb.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:71)
             org.hibernate.ejb.EntityManagerImpl.<init>(EntityManagerImpl.java:35)
             org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:37)
             org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:32)
             org.jboss.ejb3.entity.InjectedEntityManagerFactory.createEntityManager(InjectedEntityManagerFactory.java:76)
             org.jboss.seam.core.ManagedPersistenceContext.create(ManagedPersistenceContext.java:53)
             sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)
             sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             java.lang.reflect.Method.invoke(Method.java:585)
             org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
             org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
             org.jboss.seam.Component.callComponentMethod(Component.java:1166)
             org.jboss.seam.Component.callCreateMethod(Component.java:1151)
             org.jboss.seam.Component.newInstance(Component.java:1140)
             org.jboss.seam.Component.getInstance(Component.java:1088)
             org.jboss.seam.Component.getInstance(Component.java:1071)
             org.jboss.seam.Component.getInstanceToInject(Component.java:1195)
             org.jboss.seam.Component.injectFields(Component.java:879)
             org.jboss.seam.Component.inject(Component.java:686)
             org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:30)
             sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
             sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             java.lang.reflect.Method.invoke(Method.java:585)
             org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
             org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
             org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
             org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:68)
             sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
             sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             java.lang.reflect.Method.invoke(Method.java:585)
             org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
             org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
             org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
             org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:60)
             sun.reflect.GeneratedMethodAccessor110.invoke(Unknown Source)
             sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             java.lang.reflect.Method.invoke(Method.java:585)
             org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
             org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
             org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
             org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
             sun.reflect.GeneratedMethodAccessor109.invoke(Unknown Source)
             sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
             java.lang.reflect.Method.invoke(Method.java:585)
             org.jboss.seam.util.Reflections.invoke(Reflections.java:13)
             org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
             org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
             org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
             org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
             org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51)
             org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39)
             it.myown.seam.ThisIsAComponentWithEntityManagerInjection$$EnhancerByCGLIB$$e6ba7c40.getRootCategories(<generated>)
            


            Donno how Tomcat handles http persistent connections, but it may be that more requests are run in the very same thread (request -> suspend for I/O -> request etc. etc.).

            If I copy the link heading toward thepage.jsf?c=3 from thepage.jsf?c=1, paste it to the browsers' address field and press "go", the exception isn't thrown (and images look fine, too).

            Also, when the exception is thrown, reloading the page works (maybe tomcat closes the http conn on exceptions).

            Again, after a while an exception had been thrown, I get this nice other stuff in the server logfile:

            02:36:28,468 ERROR [Naming] Could not obtain initial context
            javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org/jnp/interfaces/NamingContextFactory]
             at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
             at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
             at javax.naming.InitialContext.init(InitialContext.java:223)
             at javax.naming.InitialContext.<init>(InitialContext.java:197)
             at org.jboss.seam.util.Naming.getInitialContext(Naming.java:26)
             at org.jboss.seam.util.Naming.getInitialContext(Naming.java:37)
             at org.jboss.seam.core.ManagedPersistenceContext.getEntityManagerFactory(ManagedPersistenceContext.java:83)
             at org.jboss.seam.core.ManagedPersistenceContext.create(ManagedPersistenceContext.java:53)
             at sun.reflect.GeneratedMethodAccessor256.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:13)
             at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
             at org.jboss.seam.Component.callComponentMethod(Component.java:1166)
             at org.jboss.seam.Component.callCreateMethod(Component.java:1151)
             at org.jboss.seam.Component.newInstance(Component.java:1140)
             at org.jboss.seam.Component.getInstance(Component.java:1088)
             at org.jboss.seam.Component.getInstance(Component.java:1071)
             at org.jboss.seam.Component.getInstanceToInject(Component.java:1195)
             at org.jboss.seam.Component.injectFields(Component.java:879)
             at org.jboss.seam.Component.inject(Component.java:686)
             at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:30)
             at sun.reflect.GeneratedMethodAccessor112.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:13)
             at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
             at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
             at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:68)
             at sun.reflect.GeneratedMethodAccessor111.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:13)
             at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
             at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
             at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:60)
             at sun.reflect.GeneratedMethodAccessor110.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:13)
             at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
             at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
             at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
             at sun.reflect.GeneratedMethodAccessor109.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:13)
             at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
             at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
             at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
             at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:55)
             at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51)
             at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39)
             at it.myown.seam.ThisIsAnotherComponentWithEntityManagerInjection$$EnhancerByCGLIB$$43b3d843.finalize(<generated>)
             at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
             at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
             at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
             at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
            Caused by: java.lang.ClassNotFoundException: org/jnp/interfaces/NamingContextFactory
             at java.lang.Class.forName0(Native Method)
             at java.lang.Class.forName(Class.java:242)
             at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
             at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
             ... 57 more
            


            Seems something related to finalizing a component, but it is not the same from which I got the previous exception.

            Seems tough, uh?

            Better, seams tough... :)

            • 3. Re: SeamExtendedManagedPersistencePhaseListener
              Giampaolo Tomassoni Newbie

              Oh, by the way: I'm now using JBoss-4.0.4-CR2 and jboss-seam-CVS20060423.

              • 4. Re: SeamExtendedManagedPersistencePhaseListener
                Gavin King Master

                How about fixing this to begin with:

                Caused by: java.lang.ClassNotFoundException: org/jnp/interfaces/NamingContextFactory



                Looks like you have JNDI problems.



                • 5. Re: SeamExtendedManagedPersistencePhaseListener
                  Giampaolo Tomassoni Newbie

                  Well, it may be. But why it happens on finalizing a component and not when injecting EMs?

                  Also, if it is a classpath problem, I would expect to see it everytime, not in few, exact conditions.

                  Isn't that there is a classloader problem somewhere? Like, say, the tomcat's thread pool is grown from a different classloader then the one that creates the initial pool. (NOTE NOTE: just guessing).

                  Or... I have this in jboss-app.xml:

                  <jboss-app>
                   <loader-repository>seam.jboss.org:loader=mywebapp</loader-repository>
                   <module><service>login-service.xml</service></module>
                  </jboss-app>
                  


                  Is it this the problem? I faithfully copied this on suggestion. I don't even know what's supposed to do...


                  • 6. Re: SeamExtendedManagedPersistencePhaseListener
                    Giampaolo Tomassoni Newbie

                    What about the following? After restarting jboss and the app and accessing this page from the main one, the page is correctly shown but the request ends with a RollbackException, which mean someone marked rollback-only the transaction.

                    Please note that no place in the involved application code deals with marking the transaction rollback-only. The only place in which I could eventually do it is in the ImageServlet, but the two pages (the main one and the one for which I'm reporting this log) does not actually make use of it.

                    2006-04-26 13:39:21,687 DEBUG [it.mycomp.myapp.web.filter.ClientCacheDisableFilter] Added cache-control attributes in response to "http://localhost:8080/myapp/catalog.jsf"
                    2006-04-26 13:39:21,687 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}
                    2006-04-26 13:39:21,687 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
                    2006-04-26 13:39:21,687 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}
                    2006-04-26 13:39:21,687 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.manager
                    2006-04-26 13:39:21,687 DEBUG [org.jboss.seam.core.Manager] No stored conversation
                    2006-04-26 13:39:21,687 DEBUG [org.jboss.seam.contexts.Contexts] found in application context: org.jboss.seam.core.init
                    2006-04-26 13:39:21,687 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] After restore view, conversation context: ConversationContext(2)
                    2006-04-26 13:39:21,687 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}
                    2006-04-26 13:39:21,687 DEBUG [org.jboss.seam.Component] instantiating Seam component: facesMessages
                    2006-04-26 13:39:21,812 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: localizer
                    2006-04-26 13:39:21,812 DEBUG [org.jboss.seam.Component] instantiating Seam component: localizer
                    2006-04-26 13:39:21,812 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolving name: localizer
                    2006-04-26 13:39:21,812 DEBUG [org.jboss.seam.contexts.Contexts] found in event context: localizer
                    2006-04-26 13:39:21,812 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
                    2006-04-26 13:39:21,812 DEBUG [org.jboss.seam.jsf.SeamVariableResolver] resolved name to seam component
                    2006-04-26 13:39:21,828 DEBUG [org.jboss.seam.Component] instantiating Seam component: myDatabase
                    2006-04-26 13:39:21,828 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}
                    2006-04-26 13:39:21,828 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
                    2006-04-26 13:39:21,828 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4694227197247488
                    2006-04-26 13:39:21,828 DEBUG [org.hibernate.jdbc.JDBCContext] TransactionFactory reported no active transaction; Synchronization not registered
                    2006-04-26 13:39:21,828 DEBUG [org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA transaction to join
                    2006-04-26 13:39:21,843 ERROR [STDERR] org.hibernate.TransactionException: could not register synchronization with JTA TransactionManager
                     at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:174)
                     at org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:1824)
                     at org.hibernate.impl.SessionImpl.getSessionFactory(SessionImpl.java:1669)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.markAsRollback(AbstractEntityManagerImpl.java:388)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:540)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:562)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:513)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:71)
                     at org.hibernate.ejb.EntityManagerImpl.<init>(EntityManagerImpl.java:35)
                     at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:37)
                     at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:32)
                     at org.jboss.ejb3.entity.InjectedEntityManagerFactory.createEntityManager(InjectedEntityManagerFactory.java:76)
                     at org.jboss.seam.core.ManagedPersistenceContext.create(ManagedPersistenceContext.java:53)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     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:13)
                     at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
                     at org.jboss.seam.Component.callComponentMethod(Component.java:1166)
                     at org.jboss.seam.Component.callCreateMethod(Component.java:1151)
                     at org.jboss.seam.Component.newInstance(Component.java:1140)
                     at org.jboss.seam.Component.getInstance(Component.java:1088)
                     at org.jboss.seam.Component.getInstance(Component.java:1071)
                     at org.jboss.seam.Component.getInstanceToInject(Component.java:1195)
                     at org.jboss.seam.Component.injectFields(Component.java:879)
                     at org.jboss.seam.Component.inject(Component.java:686)
                     at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:30)
                     at sun.reflect.GeneratedMethodAccessor141.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:13)
                     at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
                     at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
                     at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:68)
                     at sun.reflect.GeneratedMethodAccessor140.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:13)
                     at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
                     at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
                     at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:60)
                     at sun.reflect.GeneratedMethodAccessor139.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:13)
                     at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
                     at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
                     at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
                     at sun.reflect.GeneratedMethodAccessor138.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:13)
                     at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
                     at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
                     at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
                     at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
                     at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51)
                     at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39)
                     at it.mycomp.myapp.seam.Localizer$$EnhancerByCGLIB$$554d57b5.getPreferredLocale(<generated>)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:585)
                     at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
                     at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
                     at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
                     at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
                     at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
                     at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                     at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:233)
                     at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:166)
                     at com.sun.facelets.tag.jsf.ComponentSupport.getLocale(ComponentSupport.java:144)
                     at com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:80)
                     at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                     at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
                     at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
                     at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
                     at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
                     at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
                     at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
                     at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                     at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
                     at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:481)
                     at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:523)
                     at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
                     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                     at it.mycomp.myapp.web.filter.ClientCacheDisableFilter.doFilter(ClientCacheDisableFilter.java:43)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                     at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilt
                    2006-04-26 13:39:21,843 ERROR [STDERR] er.java:23)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                     at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                     at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
                     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
                     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                     at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                     at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                     at java.lang.Thread.run(Thread.java:595)
                    Caused by: javax.transaction.RollbackException: Already marked for rollback TransactionImpl:XidImpl[FormatId=257, GlobalId=fammiglio/19, BranchQual=, localId=19]
                     at org.jboss.tm.TransactionImpl.registerSynchronization(TransactionImpl.java:632)
                     at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:164)
                     ... 118 more
                    2006-04-26 13:39:22,000 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url null
                    2006-04-26 13:39:22,000 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@10ddb86, cl=org.jboss.mx.loading.HeirarchicalLoaderRepository3$CacheClassLoader@1b5a4ca{ url=null ,addedOrder=0}
                    2006-04-26 13:39:22,000 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url null
                    2006-04-26 13:39:22,000 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@10ddb86, cl=org.jboss.mx.loading.UnifiedClassLoader3@55e552{ url=null ,addedOrder=0}
                    2006-04-26 13:39:22,015 ERROR [STDERR] 26-apr-2006 13.39.22 com.sun.facelets.FaceletViewHandler handleRenderException
                    GRAVE: Error Rendering View[/catalog.xhtml]
                    com.sun.facelets.tag.TagAttributeException: /include/header.xhtml @10,2 locale="#{localizer.preferredLocale}" /include/header.xhtml @10,2 locale="#{localizer.preferredLocale}": Exception getting value of property preferredLocale of base of type : it.mycomp.myapp.seam.Localizer$$EnhancerByCGLIB$$554d57b5
                     at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:235)
                     at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:166)
                     at com.sun.facelets.tag.jsf.ComponentSupport.getLocale(ComponentSupport.java:144)
                     at com.sun.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:80)
                     at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                     at com.sun.facelets.tag.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:47)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
                     at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
                     at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
                     at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:248)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:294)
                     at com.sun.facelets.impl.DefaultFacelet.include(DefaultFacelet.java:273)
                     at com.sun.facelets.impl.DefaultFaceletContext.includeFacelet(DefaultFaceletContext.java:140)
                     at com.sun.facelets.tag.ui.CompositionHandler.apply(CompositionHandler.java:113)
                     at com.sun.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:49)
                     at com.sun.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:95)
                     at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:481)
                     at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:523)
                     at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
                     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                     at it.mycomp.myapp.web.filter.ClientCacheDisableFilter.doFilter(ClientCacheDisableFilter.java:43)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                     at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                     at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                     at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
                     at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
                     at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                     at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                     at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                     at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                     at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                     at java.lang.Thread.run(Thread.java:595)
                    Caused by: javax.el.ELException: /include/header.xhtml @10,2 locale="#{localizer.preferredLocale}": Exception getting value of property preferredLocale of base of type : it.mycomp.myapp.seam.Localizer$$EnhancerByCGLIB$$554d57b5
                     at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
                     at com.sun.facelets.tag.TagAttribute.getObject(TagAttribute.java:233)
                     ... 48 more
                    Caused by: javax.faces.el.EvaluationException: Bean: it.mycomp.myapp.seam.Localizer$$EnhancerByCGLIB$$554d57b5, property: preferredLocale
                     at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:442)
                     at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
                     at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:141)
                     at com.sun.el.parser.AstValue.getValue(AstValue.java:96)
                     at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:183)
                     at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:71)
                     ... 49 more
                    Caused by: java.lang.reflect.InvocationTargetException
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                     at java.lang.reflect.Method.invoke(Method.java:585)
                     at org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:438)
                     ... 54 more
                    Caused by: org.hibernate.TransactionException: could not register synchronization with JTA TransactionManager
                     at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:174)
                     at org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:1824)
                     at org.hibernate.impl.SessionImpl.getSessionFactory(SessionImpl.java:1669)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.markAsRollback(AbstractEntityManagerImpl.java:388)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:540)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:562)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:513)
                     at org.hibernate.ejb.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:71)
                     at org.hibernate.ejb.EntityManagerImpl.<init>(EntityManagerImpl.java:35)
                     at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:37)
                     at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:32)
                     at org.jboss.ejb3.entity.InjectedEntityManagerFactory.createEntityManager(InjectedEntityManagerFactory.java:76)
                     at org.jboss.seam.core.ManagedPersistenceContext.create(ManagedPersistenceContext.java:53)
                     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                     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:13)
                     at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:32)
                     at org.jboss.seam.Component.callComponentMethod(Component.java:1166)
                     at org.jboss.seam.Component.callCreateMethod(Component.java:1151)
                     at org.jboss.seam.Component.newInstance(Component.java:1140)
                     at org.jboss.seam.Component.getInstance(Component.ja
                    2006-04-26 13:39:22,015 ERROR [STDERR] va:1088)
                     at org.jboss.seam.Component.getInstance(Component.java:1071)
                     at org.jboss.seam.Component.getInstanceToInject(Component.java:1195)
                     at org.jboss.seam.Component.injectFields(Component.java:879)
                     at org.jboss.seam.Component.inject(Component.java:686)
                     at org.jboss.seam.interceptors.BijectionInterceptor.bijectTargetComponent(BijectionInterceptor.java:30)
                     at sun.reflect.GeneratedMethodAccessor141.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:13)
                     at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
                     at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
                     at org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:68)
                     at sun.reflect.GeneratedMethodAccessor140.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:13)
                     at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
                     at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
                     at org.jboss.seam.interceptors.BusinessProcessInterceptor.manageBusinessProcessContext(BusinessProcessInterceptor.java:60)
                     at sun.reflect.GeneratedMethodAccessor139.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:13)
                     at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
                     at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
                     at org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:39)
                     at sun.reflect.GeneratedMethodAccessor138.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:13)
                     at org.jboss.seam.interceptors.Interceptor.aroundInvoke(Interceptor.java:87)
                     at org.jboss.seam.interceptors.SeamInvocationContext.proceed(SeamInvocationContext.java:60)
                     at org.jboss.seam.ejb.SeamInterceptor.aroundInvokeInContexts(SeamInterceptor.java:73)
                     at org.jboss.seam.ejb.SeamInterceptor.aroundInvoke(SeamInterceptor.java:45)
                     at org.jboss.seam.interceptors.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:51)
                     at org.jboss.seam.interceptors.JavaBeanInterceptor.intercept(JavaBeanInterceptor.java:39)
                     at it.mycomp.myapp.seam.Localizer$$EnhancerByCGLIB$$554d57b5.getPreferredLocale(<generated>)
                     ... 59 more
                    Caused by: javax.transaction.RollbackException: Already marked for rollback TransactionImpl:XidImpl[FormatId=257, GlobalId=fammiglio/19, BranchQual=, localId=19]
                     at org.jboss.tm.TransactionImpl.registerSynchronization(TransactionImpl.java:632)
                     at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:164)
                     ... 118 more
                    2006-04-26 13:39:22,093 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}
                    2006-04-26 13:39:22,093 DEBUG [org.jboss.seam.contexts.Lifecycle] After render response, destroying contexts
                    2006-04-26 13:39:22,093 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
                    2006-04-26 13:39:22,093 DEBUG [org.jboss.seam.contexts.Contexts] destroying: org.jboss.seam.core.manager
                    2006-04-26 13:39:22,093 DEBUG [org.jboss.seam.contexts.Contexts] destroying: localizer
                    2006-04-26 13:39:22,093 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying conversation context
                    2006-04-26 13:39:22,109 DEBUG [org.jboss.seam.contexts.Contexts] destroying: facesMessages
                    2006-04-26 13:39:22,109 DEBUG [org.jboss.seam.contexts.Lifecycle] flushing server-side conversation context
                    2006-04-26 13:39:22,109 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
                    2006-04-26 13:39:35,921 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
                    


                    • 7. Re: SeamExtendedManagedPersistencePhaseListener
                      Gavin King Master

                      Sure, Seam components will often mark the transaction rollbackonly when an exception propagates out of them.

                      For JavaBean components, it happens whenever *any* exception is thrown. For EJB session beans it happens according to the spec rules.

                      However, there is a bug in Hibernate here (that causes your stacktrace) that we are in the process of fixing:

                      http://jira.jboss.com/jira/browse/EJBTHREE-540

                      • 8. Re: SeamExtendedManagedPersistencePhaseListener
                        ryan dewell Novice

                        g.tomassoni, did you ever find a solution to your problem of:

                        "could not register synchronization with JTA TransactionManager"

                        We are experiencing this after upgrading Seam/Jboss/EJB3 and are unable to find the source. Similar to your description, the first request works fine, and then the second request throws this.

                        Thanks,

                        Ryan

                        • 9. Re: SeamExtendedManagedPersistencePhaseListener
                          Gavin King Master

                          First step is to figure out why the txn is getting rolled back ;-)

                          • 10. Re: SeamExtendedManagedPersistencePhaseListener
                            Giampaolo Tomassoni Newbie

                            I found a (very) temporary workaround to the transaction-still-there: don't use the SeamExtendedManagedPersistencePhaseListener.

                            I had somewhere a servlet filter adding transactional behaviour to http requests. It basicly wraps a transaction begin/commit around an http request, rolling the transaction back on exceptions. I just put this servlet on top of the SeamServlet and used SeamPhaseListener instead of the extended one. It works more or less (didn't try with jBPM), but please don't ask me exactly why.

                            Gavin, I see there is a SeamTransactionManagedPersistencePhaseListener, which sounds close the the temporary kludge I applied. I would like to give it a try, but it seems to me that's not referenced in any doc. Defining it as a PhaseListener in my app, I got this:

                            2006-04-28 15:57:25,921 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}
                            2006-04-28 15:57:25,937 DEBUG [org.jboss.seam.jsf.SeamTransactionManagedPersistencePhaseListener] Starting transaction prior to RESTORE_VIEW phase
                            2006-04-28 15:57:25,937 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}
                            2006-04-28 15:57:25,953 DEBUG [org.jboss.seam.contexts.Lifecycle] >>> Begin web request
                            2006-04-28 15:57:25,968 DEBUG [org.jboss.seam.contexts.Lifecycle] Session started
                            2006-04-28 15:57:26,046 DEBUG [org.jboss.seam.Component] instantiating Seam component: localeSelector
                            2006-04-28 15:57:26,046 DEBUG [org.jboss.seam.jsf.SeamTransactionManagedPersistencePhaseListener] Flushing persistence contexts after INVOKE_APPLICATION phase
                            2006-04-28 15:57:26,062 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}
                            2006-04-28 15:57:26,109 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception handled by Seam
                            javax.servlet.ServletException: Could not flush to database
                             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at it.mycomp.myapp.web.filter.ClientCacheDisableFilter.doFilter(ClientCacheDisableFilter.java:43)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                             at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
                             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
                             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                             at java.lang.Thread.run(Thread.java:595)
                            2006-04-28 15:57:26,281 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}
                            2006-04-28 15:57:26,296 INFO [org.jboss.seam.servlet.SeamExceptionFilter] killing transaction
                            2006-04-28 15:57:26,296 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}
                            2006-04-28 15:57:26,312 DEBUG [org.jboss.seam.contexts.Lifecycle] After request, destroying contexts
                            2006-04-28 15:57:26,328 DEBUG [org.jboss.seam.contexts.Lifecycle] destroying event context
                            2006-04-28 15:57:26,328 DEBUG [org.jboss.seam.contexts.Lifecycle] <<< End web request
                            2006-04-28 15:57:26,328 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/e-sercenti].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
                            java.lang.IllegalStateException: Could not flush to database
                             at org.jboss.seam.jsf.SeamTransactionManagedPersistencePhaseListener.flush(SeamTransactionManagedPersistencePhaseListener.java:130)
                             at org.jboss.seam.jsf.SeamTransactionManagedPersistencePhaseListener.afterPhase(SeamTransactionManagedPersistencePhaseListener.java:61)
                             at org.apache.myfaces.lifecycle.LifecycleImpl.informPhaseListenersAfter(LifecycleImpl.java:519)
                             at org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.java:178)
                             at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:64)
                             at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at it.mycomp.myapp.web.filter.ClientCacheDisableFilter.doFilter(ClientCacheDisableFilter.java:43)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:23)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:45)
                             at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
                             at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
                             at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
                             at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
                             at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
                             at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:174)
                             at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
                             at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
                             at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
                             at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
                             at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
                             at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
                             at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
                             at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
                             at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
                             at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
                             at java.lang.Thread.run(Thread.java:595)
                            Caused by: java.lang.NullPointerException
                             at org.jboss.seam.jsf.SeamTransactionManagedPersistencePhaseListener.flushEntityManager(SeamTransactionManagedPersistencePhaseListener.java:137)
                             at org.jboss.seam.jsf.SeamTransactionManagedPersistencePhaseListener.flush(SeamTransactionManagedPersistencePhaseListener.java:115)
                             ... 31 more
                            


                            And no page shown.

                            The problem seems to be related to the fact that Contexts.getConversationContext() yields a null value.

                            Is SeamTransactionManagedPersistencePhaseListener a residual of early seam's development phases or is supposed to be used? If this is the case, how are we supposed to?

                            Thanks,

                            • 11. Re: SeamExtendedManagedPersistencePhaseListener
                              Gavin King Master

                               

                              I had somewhere a servlet filter adding transactional behaviour to http requests. It basicly wraps a transaction begin/commit around an http request, rolling the transaction back on exceptions.


                              If you try to mix your own tx management with Seam tx management, you will break stuff. No wonder you have been having problems.

                              You are meant to use SEMPPL together with SeamServletFilter, and you will get all the tx management you will need. Don't add other stuff on top.

                              STMPPL is frankly not recommended, since SEMPPL is better. (And it is not currently being tested anywhere, and I don't guarantee it will be there forever.) However, I think I've fixed the NPE you encountered.

                              • 12. Re: SeamExtendedManagedPersistencePhaseListener
                                ryan dewell Novice

                                He's not using SEMPPL + his own TX management. He's using his own TX management despite SEMPPL.

                                He only moved away from SEMPPL to his own TX management when he could not resolve the exception previously mentioned in this thread: "could not register synchronization with JTA TransactionManager", caused by "Already marked for rollback TransactionImpl".

                                We've got code that's been running fine for 6 months on Seam beta 1 + JBoss 4.0.3. Now with the upgrade we're hitting this exception. I wish whatever code was marking the transaction as rolledback would throw an exception as it's rolling it back. I've been working at this for days without making any progress. Going back to Seam beta 1 and Jboss 4.0.3 hardly seems like a solution.




                                • 13. Re: SeamExtendedManagedPersistencePhaseListener
                                  Gavin King Master

                                  Right, but SEMPPL does tx management. In fact, that is *all* it does. If you want to do your own tx management, you don't need it.

                                  I wish whatever code was marking the transaction as rolledback would throw an exception as it's rolling it back


                                  The only things that call setRollbackOnly are the EJB container (as defined by the spec), the EM (as defined by the spec) and the RollbackInterceptor (for JavaBean components).

                                  This only happens as an exception is propagating out of one of them, so there is no way that setRollbackOnly() is ever called w/o an exception propagation. So unless either the application or JSF is swallowing exceptions, there _is_ an exception.

                                  The only problem here is the known bug where EJB3 and Hibernate try to register synchronizations on a tx marked for rollback.


                                  • 14. Re: SeamExtendedManagedPersistencePhaseListener
                                    Giampaolo Tomassoni Newbie

                                     

                                    If you try to mix your own tx management with Seam tx management, you will break stuff. No wonder you have been having problems.


                                    Somehow, I'd the feeling you would reply this way... :)

                                    Gavin, I added the transactional filter to the request chain to use the SeamServletFilter, not the SeamExtendedManagedPersistenceWhatever. And this happened yesterday, too.

                                    I'm in need to keep going with development, you know.


                                    However, I think I've fixed the NPE you encountered.


                                    This is really good. Will it be in today's snapshot?


                                    You are meant to use SEMPPL together with SeamServletFilter


                                    SeamServletFilter? Do you mean SeamExceptionFilter? Or do I have to use SeamServletFilter for my non-seam ImageServlet (which doesn't uses sessions, conversations and seam at all)?

                                    I mean -just to know- in the case you meant SeamServletFilter, servlets transactions are not anymore decoupled with SEMPPL?

                                    1 2 Previous Next