6 Replies Latest reply on May 3, 2007 5:29 PM by stephen.friedrich

    Trinidad 1.0.0, Seam and JBoss 4.0.5

    stephen.friedrich Novice

      Is there any way to make this work?
      After twiddling with project setup for several hours and googling for solutions I am pretty much frustrated.
      I am deploying as an ear. Where should I put myfaces and trinidad jars?
      Seems I can only pick which exception I'd like to get:

      only trinidad jars in WEB-INF/lib - myfaces jars deployed from default location in JBoss server's jbossweb-tomcat55.sar
      or trinidad and myfaces in the ear, referenced via manifest from web module
      ======================================================================================================

      00:51:31,296 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
      org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsf/html cannot be resolved in either web.xml or the jar files deployed with this application
       at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50)
       at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
       at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:114)
       at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:316)
       at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:147)
      


      Both trinidad and myfaces jars in WEB-INF/lib:
      ==============================================
      00:40:51,046 ERROR [[/texas]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
      


      Both myfaces and trinidad jars in WEB-INF/lib, myfaces also deployed in JBoss server's jbossweb-tomcat55.sar
      ============================================================================================================
      01:05:44,203 ERROR [StartupServletContextListener] Error initializing ServletContext
      java.lang.IllegalArgumentException: Class org.jboss.seam.jsf.SeamApplicationFactory is no javax.faces.application.ApplicationFactory
       at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:132)
       at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:107)
       at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:439)
      


      Both trinidad and myfaces deployed in in JBoss server's jbossweb-tomcat55.sar
      ==============================================================================
      01:22:27,953 ERROR [[/texas]] Error configuring application listener of class org.apache.myfaces.trinidadinternal.webapp.TrinidadListenerImpl
      java.lang.ClassNotFoundException: org.apache.myfaces.trinidadinternal.webapp.TrinidadListenerImpl
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3711)
      


      I am trying to clean up a JSF/Seam application that was some developers first try at using JSF at all.
      So I figured I start by upgrading components of it to current releases.
      Seam update from 1.0.1 to 1.2.1 was very easy:
      The app was running fine after that with ADF Faces.
      Now I am trying to update from ADF Faces to Trinidad. Adjusting all the changed tags and attributes was a little tedious, but straightforward.

      Right now I am absolutely stuck. I'd be immensely grateful for any help!

        • 1. Re: Trinidad 1.0.0, Seam and JBoss 4.0.5
          Pete Muir Master

          If you are happy to use Seam CVS (which runs on JBoss 4.2.0.CR2 rather than 4.0.5.GA and uses JSF 1.2) - there should be a 1.3 beta fairly soon - then there is an example there which uses Trinidad 1.0.0, Ajax4jsf, Richfaces and Seam (seamdiscs) - the example also takes you through where to place the jars and how to alter your configuration files.

          • 2. Re: Trinidad 1.0.0, Seam and JBoss 4.0.5
            Dejan Krsmanovic Newbie

            Is it possible to run seamdisc on Jboss 4.0.5 and Seam 1.2.1? I have looked at seamdiscs example and modified my application which runs on Jboss 4.0.5/Seam 1.2.1 but I am getting some exception from ajax4jsf:

            Resource not registered : org.richfaces.renderkit.html.GradientA...


            Are there some code changes in Seam 1.3 related to Trinidad support?



            • 3. Re: Trinidad 1.0.0, Seam and JBoss 4.0.5
              Pete Muir Master

              No - you won't get jboss-seam-trinidad.jar working on 1.2.1.

              Apart from that, the major changes are to Seam itself - it runs on AS 4.2 which uses JSF 1.2 RI and it uses jboss-el rather than el-ri (you would want to use jboss el).

              The configuration instructions should be the same though.

              • 4. Re: Trinidad 1.0.0, Seam and JBoss 4.0.5
                stephen.friedrich Novice

                Thanks a million, Pete.
                Maybe I will just update JBoss and JSF versions at the same time as switching from ADF Faces to Trinidad.
                Seemed like a good idea to take the smallest step possible and update one after the other and check that nothing gets broken along the way.

                I noticed that seamdiscs puts the myfaces api jar in the ear and only the impl jar in the web module. That's a combination I have not yet tried. Will check if that works this evening.

                I don't (yet) need jboss-seam-trinidad.jar if I don't need the special handling of Trinidad's data model, right?

                • 5. Re: Trinidad 1.0.0, Seam and JBoss 4.0.5
                  Pete Muir Master

                   

                  "stephen.friedrich" wrote:
                  Thanks a million, Pete.
                  Maybe I will just update JBoss and JSF versions at the same time as switching from ADF Faces to Trinidad.
                  Seemed like a good idea to take the smallest step possible and update one after the other and check that nothing gets broken along the way.


                  It's probably worth it if you can - you will need to if you want to remain current with releases of Seam, as to run Seam 1.3 (and later) on JBoss 4.0.5.GA would need significant work! Generally the JSF 1.2 RI seems "better" than myfaces (partly as its a newer spec!) e.g. better reporting of errors.

                  I noticed that seamdiscs puts the myfaces api jar in the ear and only the impl jar in the web module. That's a combination I have not yet tried. Will check if that works this evening.


                  I take it you mean trinidad? Thats needed so that you can get at the trinidad model classes (such as TreeModel) from your business layer)

                  I don't (yet) need jboss-seam-trinidad.jar if I don't need the special handling of Trinidad's data model, right?


                  Exactly. It will only ever be optional - containing enhancements and possibly making configuration easier.


                  • 6. Re: Trinidad 1.0.0, Seam and JBoss 4.0.5
                    stephen.friedrich Novice

                     

                    "petemuir" wrote:

                    I noticed that seamdiscs puts the myfaces api jar in the ear and only the impl jar in the web module. That's a combination I have not yet tried. Will check if that works this evening.


                    I take it you mean trinidad? Thats needed so that you can get at the trinidad model classes (such as TreeModel) from your business layer)


                    Doh - of course I meant trinidad.

                    Even better: This approach also works for 4.0.5: myfaces completely in server's default location and trinidad impl in WEB-INF/lib and the api jar in the ear. Doh.
                    So for the record: Seam and trinidad do work with myfaces on JBoss 4.0.5.

                    Well, now there are lots of other smaller issues that I have to deal with one by one, like trinidad components no longer accepting br tags (wrapped in verbatim) - that were ugly hacks anyway ("expected UIXCommand but found another type of component instead").
                    Plus all our styles seem to be lost so the app is quite ugly currently.