5 Replies Latest reply on Sep 17, 2006 5:14 PM by alain_fr

    MyFaces 1.1.2 Portal 2.4

    kosmi

      Hello,
      i run in trouble while porting my jsf applications from
      portal 2.2 to 2.4.

      The exception:
      [FacesConfigurator] failed to configure class com.sun.facelets.component.RepeatRenderer
      java.lang.ClassCastException: com.sun.facelets.component.RepeatRenderer
      at org.apache.myfaces.config.FacesConfigurator.configureRenderKits(FacesConfigurator.java:625)
      at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:142)
      at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:69)
      at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:52)

      The Application uses :
      myfaces-api-1.1.4-SNAPSHOT.jar
      myfaces-impl-1.1.4-SNAPSHOT.jar
      tomahawk-1.1.2.jar
      in myApp.war/web-inf/lib


      I'm using
      JBoss [Zion] 4.0.4.GA
      JVM 1.5.0_07-b03
      jboss-portal-2.4.0

      Any Ideas?
      Thanks Daniel

        • 1. Re: MyFaces 1.1.2 Portal 2.4
          alain_fr

          i've got the same problem, i have an application that use jsf, spring whic is working well bu when i want to put it into a portlet, i've got that error

          • 2. Re: MyFaces 1.1.2 Portal 2.4
            kosmi

            Hello Alain,
            its a classloader problem. I solved it by deleting the myfaces.jars
            from the projects lib folder.
            Another myfaces.jar is located under
            C:\appservers\bsp\jboss\server\bsp\deploy\jbossweb-tomcat55.sar\jsf-libs
            its used for the tomcat administration and contains a faces config which
            declares the RepeatRenderer. i changed these jars to the myfaces 1.1.4 snapshot jars.

            hope this helps
            Daniel

            • 3. Re: MyFaces 1.1.2 Portal 2.4
              alain_fr

              well, what you tell me solve my error but i have another one.

              2006-09-12 18:47:18,828 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/helloworldportlet]] Exception sending context initialized event to listener instance of class de.mindmatters.faces.spring.config.ConfigLoaderListener
              java.lang.IllegalStateException: No Factories configured for this Application - typically this is because a context listener is not setup in your web.xml.
              A typical config looks like this;
              <listener>
               <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
              </listener>
              
               at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:84)
               at de.mindmatters.faces.spring.AbstractContextLoader.validateFacesConfiguration(AbstractContextLoader.java:106)
               at de.mindmatters.faces.spring.AbstractContextLoader.initWebApplicationContext(AbstractContextLoader.java:71)
               at de.mindmatters.faces.spring.AbstractContextLoaderListener.contextInitialized(AbstractContextLoaderListener.java:52)
               at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
               at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
               at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
               at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)



              i don't know what it is, i have no idea, i'm using jsf-spring.jar



              • 4. Re: MyFaces 1.1.2 Portal 2.4
                alain_fr

                maybe it can help
                my web.xml

                <?xml version="1.0"?>
                <!DOCTYPE web-app PUBLIC
                 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
                 "http://java.sun.com/dtd/web-app_2_3.dtd">
                
                <web-app>
                
                 <context-param>
                 <param-name>javax.faces.CONFIG_FILES</param-name>
                 <param-value>
                 /WEB-INF/faces-config.xml
                 </param-value>
                 </context-param>
                
                
                 <listener>
                 <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
                 </listener>
                
                 <listener>
                 <listener-class>de.mindmatters.faces.spring.config.ConfigLoaderListener</listener-class>
                 </listener>
                
                 <listener>
                 <listener-class>de.mindmatters.faces.spring.context.ContextLoaderListener</listener-class>
                 </listener>
                
                 <servlet>
                 <servlet-name>dispatcher</servlet-name>
                 <servlet-class>de.mindmatters.faces.spring.context.servlet.DispatcherServlet</servlet-class>
                 </servlet>
                
                
                
                
                 <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
                </servlet>
                
                 <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.jsf</url-pattern>
                </servlet-mapping>
                
                
                 <welcome-file-list>
                 <welcome-file>index.jsp</welcome-file>
                 </welcome-file-list>
                
                </web-app>


                • 5. Re: MyFaces 1.1.2 Portal 2.4
                  alain_fr

                  i solved the problem adding


                  <listener>
                  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
                  </listener>


                  in web.xml