3 Replies Latest reply on Dec 19, 2007 2:51 PM by ssilvert

    migration from jboss-4.0.5.GA to jboss-4.2.1.GA

    chris.katsuo

      Hello everybody,

      We have to migrate an application written with Seam 1.1.0.CR1 on
      jboss-4.0.5.GA ( at this time MyFaces was the built-in JSF implementation) to Seam 2.0.0.GA on jboss-4.2.1.GA.

      After a while, we have finally been able to port everything using default configuration (so SUN RI JSF 1.2 built-in JSF implementation).
      Actually, we have created from scratch a Seam application using Seam generator and integrate piece by piece our old application.

      Unfortunately, one of the third-party component we are using is fckeditor / fck-faces which is built-in on top of MyFaces :(

      So reading several posts on the forum and reading blog on internet, we tried to enable MyFaces in our application.
      We went through
      http://wiki.jboss.org/wiki/Wiki.jsp?page=JBoss5AndMyFaces
      but nothing helped us :(

      We are totally blocked about this issue and we really need help.
      Is there a place with a sample of EAR file using MyFaces in JBoss 4.2.1GA please ?

      We would really need a sample of an application with MyFaces bundled in it.

      We put



      <context-param>
      <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
      <param-value>true</param-value>
      </context-param>

      in faces-config.xml


      we copied the lib myfaces-impl-1.1.5.jar and myfaces-api-1.1.5.jar ( and dependencies) in WEB-INF\lib but we got digester error :

      ERROR [org.apache.commons.digester.Digester] Parse Error at line 2 column 14: Document is invalid: no grammar found.
      org.xml.sax.SAXParseException: Document is invalid: no grammar found.


      I guess because our faces-config.xml has been created with Seam generator targeted for JSF 1.2

      we does the same with myfaces-api-1.2.0.jar and myfaces-impl-1.2.0.jar
      but


      ERROR [org.apache.myfaces.webapp.DefaultFacesInitializer] Error initializing MyFaces: Class org.jboss.seam.jsf.SeamApplicationFactory is no javax.faces.application.ApplicationFactory
      java.lang.IllegalArgumentException: Class org.jboss.seam.jsf.SeamApplicationFactory is no javax.faces.application.ApplicationFactory
      at javax.faces.FactoryFinder.newFactoryInstance(FactoryFinder.java:128)
      at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:107)
      at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:499)
      at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:190)
      at org.apache.myfaces.webapp.DefaultFacesInitializer.initFaces(DefaultFacesInitializer.java:112)
      at


      I'm sure we missed some steps or configurations specifying that we use MyFaces in place of Sun RI.

      This context parameter and the copy of the libraries can't be sufficient.
      Please let us know what is missing.

      a small sample of an EAR file using MyFaces in place of Sun RI would be extremely helpful.

      or is there a guide as seam2migration.txt explaining what we shouldn't remove if we want to keep using MyFaces ?
      There is no instructions for this scenario.

      Thanks in avance
      Christophe Laumond

        • 1. Re: migration from jboss-4.0.5.GA to jboss-4.2.1.GA
          chris.katsuo

          hi everybody,

          I forgot one line in the error caused by the digester :


          2007-12-19 10:57:36,171 INFO [org.apache.myfaces.config.FacesConfigurator] Reading standard config org/apache/myfaces/resource/standard-faces-config.xml
          2007-12-19 10:57:36,234 INFO [org.apache.myfaces.config.FacesConfigurator] Reading config jar:file:/C:/Seam/jboss-4.2.1.GA/server/default/deploy/aewa-ear.ear/jboss-seam.jar!/META-INF/faces-config.xml
          2007-12-19 10:57:36,312 ERROR [org.apache.commons.digester.Digester] Parse Error at line 2 column 14: Document is invalid: no grammar found.
          org.xml.sax.SAXParseException: Document is invalid: no grammar found.


          So it looks like it is due to faces-config.xml in jboss-seam.jar :( jboss-seam.jar!/META-INF/faces-config.xml

          Any help would be welcome.
          Please let me know if I need to post in Seam forum rather that this forum.

          A standard sample of EAR file using MyFaces (even without) is always welcome and relevant to this forum I think.

          Thanks in advance,
          Best regards,
          Christophe Laumond

          • 2. Re: migration from jboss-4.0.5.GA to jboss-4.2.1.GA
            mcollin

            i have the same error...

            • 3. Re: migration from jboss-4.0.5.GA to jboss-4.2.1.GA
              ssilvert

              Seam 2.0 requires JSF 1.2. So that's why you get the "no grammar found" error with JSF 1.1. The faces-config.xml in Seam 2.0 is using http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd, which JSF 1.1 does not understand.

              I don't know if Seam 2.0 is known to work with MyFaces 1.2 or not. You should check the Seam forum for that.

              As for fckeditor / fck-faces, I'd suggest that you get rid of that as soon as possible. Whoever wrote it used direct dependencies on MyFaces 1.1 implementation code (very bad idea). It probably doesn't even work with MyFaces 1.2.

              Stan