Upgrading to Seam 2.0.1 JBoss 4.2.2 GA
toni Feb 26, 2008 11:09 PMHi,
I'm trying to move my webapplication from Seam 1.2.1 / JBoss 4.0.5 to Seam 2.0.1 / JBoss 4.2.2, but I'm experiencing great trouble with seam's managed persistence context (SMPC).
If I try to inject the EntityManager
into my SFSBs and if their scope is CONVERSATION scope, then I always get an EJBTransactionRolledbackException for no apparent reason.
If I remove the following two lines from my SFSB, then the EJBTransactionRolledbackException is not raised anymore, but of course that does not help much:
@In(create = true) EntityManager entityManager
That's why I know that it's a problem with injecting seam's managed persistence context into the SFSBs. Unfortuanetly the Exception itself gives no further clues.
What is interesting is, that I can inject the EnityManager, if I set the scope of the SFSB to SESSION. Then I can inject the EntityManager without any problems and use it, too.
For example, the following code works fine:
@Name("simpleAction") @Stateful // SESSION SCOPE IS OK! WHY CAN'T I USE CONVERSATION SCOPE? @Scope(ScopeType.SESSION) public class SimpleAction implements BasicSimpleAction { @In(create = true) EntityManager entityManager; ...
I really have no clue why this gives me trouble in Seam 2.0.1. I have checked all the configuration files many times today, and went through all the examples until I discovered that it's those two simple lines causing the woe.
I appreciate any advice, because I really dont't know what to do anymore. I have scanned the server.log for errors and warnings and got this, which however, does not really help me either:
2008-02-27 00:04:39,774 WARN [javax.enterprise.resource.webcontainer.jsf.config] Unable to process deployment descriptor for context 'null' 2008-02-27 00:04:40,774 WARN [javax.enterprise.resource.webcontainer.jsf.config] Unable to process deployment descriptor for context 'null' 2008-02-27 00:04:40,888 WARN [javax.enterprise.resource.webcontainer.jsf.config] Unable to process deployment descriptor for context 'null' 2008-02-27 00:04:41,037 WARN [javax.enterprise.resource.webcontainer.jsf.config] Unable to process deployment descriptor for context 'null' 2008-02-27 00:04:41,148 WARN [javax.enterprise.resource.webcontainer.jsf.config] Unable to process deployment descriptor for context 'null' 2008-02-27 00:04:41,249 WARN [javax.enterprise.resource.webcontainer.jsf.config] Unable to process deployment descriptor for context 'null' 2008-02-27 00:04:41,408 WARN [javax.enterprise.resource.webcontainer.jsf.config] Unable to process deployment descriptor for context 'null' 2008-02-27 00:04:50,568 WARN [org.hibernate.ejb.Ejb3Configuration] Defining hibernate.transaction.flush_before_completion=true ignored in HEM 2008-02-27 00:04:54,389 WARN [org.hibernate.impl.SessionFactoryObjectFactory] InitialContext did not implement EventContext 2008-02-27 00:05:06,259 WARN [org.jboss.seam.init.Initialization] Did not install PojoCache due to NoClassDefFoundError: org/jgroups/MembershipListener 2008-02-27 00:05:50,356 ERROR [org.jboss.seam.jsf.SeamPhaseListener] uncaught exception 2008-02-27 00:05:51,128 ERROR [STDERR] Feb 27, 2008 12:05:51 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit 2008-02-27 00:05:51,154 ERROR [STDERR] Feb 27, 2008 12:05:51 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit 2008-02-27 00:05:51,161 ERROR [STDERR] Feb 27, 2008 12:05:51 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit 2008-02-27 00:05:51,175 ERROR [STDERR] Feb 27, 2008 12:05:51 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit 2008-02-27 00:05:51,189 ERROR [STDERR] Feb 27, 2008 12:05:51 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit 2008-02-27 00:05:51,217 ERROR [STDERR] Feb 27, 2008 12:05:51 AM com.sun.facelets.compiler.TagLibraryConfig loadImplicit