3 Replies Latest reply on Dec 8, 2010 11:00 PM by andrewwheeler

    Seam Faces and Seam Persistence not playing well together?

    sunfire

      I created a very simple war project running on AS6 CR1. Now I managed to get it working when I use only either Seam Faces 3.0.0-SNAPSHOT or Seam Persistence 3.0.0.Beta1. BUT as soon as I want to add both modules to the project I get an Exception when opening the JSF page:


      java.lang.IllegalStateException: Could not start transaction
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:144)
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:129)
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.handleTransactionsBeforePhase(TransactionPhaseListener.java:106)
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.beforePhase(TransactionPhaseListener.java:82)
           at org.jboss.seam.faces.event.DelegatingPhaseListener.beforePhase(DelegatingPhaseListener.java:56)
           at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:224)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:95)
           at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
           at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
           at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
           at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.NullPointerException
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:136)
           ... 31 more


      Any ideas what is going wrong?

        • 1. Re: Seam Faces and Seam Persistence not playing well together?
          andrewwheeler

          Well I've got the same issue. I was running seam3 faces beta1 and added seam3 persistence beta1 and I got the following error:


          java.lang.NullPointerException
               at org.jboss.seam.faces.viewdata.ViewDataStoreImpl.getDataForCurrentViewId(ViewDataStoreImpl.java:97)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          



          I saw that this was fixed in SNAPSHOT so I changed my maven version to SNAPSHOT. Now there is a class conflict with weld extensions for seam faces and persistence. It looks like seam faces snapshot wants weld extension alpha1 and seam persistence wants weld extension beta1. I tried forcing an exclusion so the new version wins, but they are not backward compatible so I get a class not found exception:


          java.lang.ClassNotFoundException: org.jboss.weld.extensions.annotated.AnnotatedTypeBuilder
          



          I can't see a way forward other than excluding one of the modules from my project.

          • 2. Re: Seam Faces and Seam Persistence not playing well together?
            lfryc

            Hi guys, this seems to be similar to my issue ( SEAMFACES-62 ).

            • 3. Re: Seam Faces and Seam Persistence not playing well together?
              andrewwheeler

              Well if I get desperate I'll try that solution. What I'd really, really like is for the SNAPSHOT version of each sub-project to use the same dependency versions.