6 Replies Latest reply on Apr 18, 2007 12:02 PM by supernovasoftware.com

    Migrate to jboss 4.2.0 CR

    lcoetzee

      Hi,

      This post with reference to:
      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=106625


      I want to migrate my application to use the latest Seam cvs (to test a fix which has been submitted) which requires jboss 4.2.0CR. It seems that jb4.2.0 uses the JSF1.2 RI and not the myfaces jsf as earlier.

      This is quite troublesome as I make use of quite a large number of tomahawk components.

      1. Is it possible to use tomahawk with the JSF 1.2 RI ?
      1.1. If so, how do I configure my web.xml/faces-config.xml ?

      by adding the tomahawk jar I get the following error:

      Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener


      1.2 If not, will it be possible to downgrade from JSF 1.2 RI to myfaces 1.1 (both JBoss and Seam) ? Alternatively will I be forced to remove all tomahawk dependencies from my application (a major piece of work) ?


      Regards

      Louis



        • 1. Re: Migrate to jboss 4.2.0 CR
          christian.bauer

          Maybe ask on the Tomahawk user list.

          • 2. Re: Migrate to jboss 4.2.0 CR
            lcoetzee

            Based on the following:
            http://wiki.jboss.org/wiki/Wiki.jsp?page=JBoss5AndMyFaces I am encouraged to dig a bit more. I have resolved the

            Error configuring application listener of class org.apache.myfaces.webapp.StartupServletContextListener
            error (still had a myfaces listener configured in my web. xml!)

            Currently I am getting the following error:

            2007-04-18 16:14:20,388 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/portal]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
            javax.faces.FacesException: java.lang.RuntimeException: java.lang.NoSuchMethodException: com.sun.faces.application.ApplicationImpl.addELResolver(javax.el.ELResolver)
             at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:408)
             at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:60)
             at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
             at org.apache.catalina.core.StandardContext.start(StandardContext.java:4361)
             at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
             at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
             at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            


            I have changed my application ear to use the jboss-el-api.jar and jboss-el.jar.

            Obviously my configuration is still incorrect.

            Any ideas ?

            L

            • 3. Re: Migrate to jboss 4.2.0 CR

              I am about to migrate my application. So please post your fix here if you find one.

              • 4. Re: Migrate to jboss 4.2.0 CR
                lcoetzee

                I am making slow progress.

                The fix for

                com.sun.faces.application.ApplicationImpl.addELResolver(javax.el.ELResolver)
                error is the following (points 1 and 2):

                1. in application.xml I only have
                <module>
                 <java>jboss-seam.jar</java>
                 </module>
                 <module>
                 <java>jboss-el.jar</java>
                 </module>
                

                not jboss-el-api.jar (initially I also had this jar referenced there). This created a problem.

                2. Only package jboss-el.jar in your ear, not jboss-el-api.jar

                3. I have added the following to faces-config.xml

                <faces-config version="1.2"
                 xmlns="http://java.sun.com/xml/ns/javaee"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">
                
                .
                .
                .
                
                <!-- this for jsf-ri 1.2 -->
                <application>
                 <el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver>
                 </application>
                 <application>
                 <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
                 </application>
                


                4. I have removed the following from web.xml
                <listener>
                <listener-class>org.apache.myfaces.webapp.StartupServletContextListener </listener-class></listener>
                <context-param>
                <param-name>org.apache.myfaces.ALLOW_JAVASCRIPT</param-name>
                 <param-value>true</param-value>
                 </context-param>
                



                5. I have added the following to web.xml
                !-- This for sun's jsf-ri 1.2 -->
                 <listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener>
                


                Points 3,4 and 5 as described in the Seam documentation.



                This has allowed me to get the basic app running. Unfortunately I get a lot of other errors:

                XML Parsing Error: not well-formed
                in my xhtml pages. Very weird.

                Hope it helps.

                L


                • 5. Re: Migrate to jboss 4.2.0 CR
                  pmuir

                  It looks to me like Tomahawk runs fine on 1.2

                  http://weblogs.java.net/blog/edburns/archive/2006/01/glassfish_jsf_1_1.html

                  It really really should - they would have had to break something pretty badly for it not to!

                  • 6. Re: Migrate to jboss 4.2.0 CR

                    I have read this in several places as well.

                    I am going to start with the latest seam gen project and compare it to mine.

                    Hopefully this will go smoothly.