4 Replies Latest reply on Mar 2, 2012 1:01 PM by lightguard

    Seam 3.1 NPE in TransactionServletListener on Websphere 8

    tmanning

      I've been struggling trying to get SeamFaces 3.x working on Websphere 8.0.0.1.  I ran into two problems with SeamFaces 3.0 related to the OWB implementation included in WAS and I've received patches from IBM to fix the problem, but I was getting some more exceptions and decided to upgrade to SeamFaces 3.1.0.Final and see what I could see.

       

      It turns out everything breaks, and the stack trace suggests that the issue SEAMTRANSACTION-15 is the culprit - apparently in WAS (and also in Tomcat) you cannot @Inject into a ServletListener?

       

      {code}

      E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[ServletNameNotFound]: java.lang.NullPointerException

                at org.jboss.seam.transaction.TransactionServletListener.requestInitialized(TransactionServletListener.java:106)

                at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletRequestCreated(WebApp.java:1812)

                at com.ibm.wsspi.webcontainer.collaborator.CollaboratorHelper.preInvokeCollaborators(CollaboratorHelper.java:477)

      {code}

       

      Does anyone else have any experience with WAS/OWB and SeamFaces 3.1 (or even 3.0)?

       

      I ran across this post: https://community.jboss.org/thread/178664 which describes disabling seam-managed transactions completely (which would be nice) but I was unable to get it working.

        • 1. Re: Seam 3.1 NPE in TransactionServletListener on Websphere 8
          lightguard

          If you cannot inject into ServletListeners, that's a bug in WAS, as I'm pretty sure with Servlet 3.0 you can.

           

          As for the other stuff, we know there are problems with OWB.

          • 2. Re: Seam 3.1 NPE in TransactionServletListener on Websphere 8
            chkal

            Jason is right. It seems like WAS isn't injecting into servlet listeners. It's actually exactly the same issue Tomcat users are currently running into:

             

            https://issues.jboss.org/browse/SEAMTRANSACTION-15

             

            Perhaps it's worth thinking about if it's possible to add some kind off fallback behaviour to that class for situations in which the injection doesn't work correctly. I'm just thinking loud about this because currently Seam Tranaction is completely unusable on Tomcat and WAS.

             

            Could you try to add this to your web.xml:

             

             <context-param>
                <param-name>org.jboss.seam.transaction.disableListener</param-name>
                <param-value>true</param-value>
             </context-param>
            

             

            Christian

            • 3. Re: Seam 3.1 NPE in TransactionServletListener on Websphere 8
              tmanning

              That worked! Thanks so much - spent way too much time on that one.

               

              Jason, would you happen to know if there's a way to filter for known issues affecting Seam on OWB? When I encounter these it's sometimes difficult to determine whether they're issues with Seam or issues with OWB.

               

              Being unable to inject into ServletListeners seems like a significant issue if it's indeed part of the spec (I haven't researched this).

              • 4. Re: Seam 3.1 NPE in TransactionServletListener on Websphere 8
                lightguard

                That part was in the docs

                 

                WRT to the OWB issues, to my knowledge we have had very few people using Seam 3 with OWB, so there probably isn't a label or anything in JIRA to use. This would be a good time to start a label though.

                 

                Also, as work on Seam 3 is slowing down, DeltaSpike will be the place to go for truely portable extensions. We have people from Apache, Red Hat, Oracle and others in the community. Anything produced from DeltaSpike will truely be portable.