1 Reply Latest reply on Feb 12, 2007 10:31 AM by Stan Silvert

    My JBOSS is still pointing to JSF-RI instead of myfaces when

    yachaa Newbie

      Hi there,

      I am trying to use tomahawk with jboss seam but I have an early problem with myfaces. It seems that my application is still pointing to the sun implementation instead of myfaces. I have the following exception:
      10:43:35,601 INFO [STDOUT] 10:43:35,586 ERROR [[/Epsilon]] Exception sending co
      ntext initialized event to listener instance of class org.apache.myfaces.webapp.
      StartupServletContextListener
      java.lang.NoClassDefFoundError: com/sun/facelets/FaceletViewHandler
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
      4)
      at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp
      ClassLoader.java:1815)
      at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa
      der.java:869)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
      der.java:1322)
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa
      der.java:1201)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:242)
      at org.apache.myfaces.shared_impl.util.ClassUtils.classForName(ClassUtil
      s.java:131)

      I have removed all the jsf-ri libraries from tomcat library and my project library.

      Below is my web.xml file. Thank you beforehand for your help.


      <?xml version="1.0" encoding="UTF-8"?>

      <web-app version="2.4"
      xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

      <!-- Seam -->

      <context-param>
      <param-name>javax.faces.CONFIG_FILES</param-name>
      <param-value>/WEB-INF/navigation.xml</param-value>
      </context-param>


      <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>


      <!-- Propagate conversations across redirects -->


      <filter-name>Seam Exception Filter</filter-name>
      <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>


      <filter-mapping>
      <filter-name>Seam Exception Filter</filter-name>
      <url-pattern>/*</url-pattern>
      </filter-mapping>


      <filter-name>Seam Redirect Filter</filter-name>
      <filter-class>org.jboss.seam.servlet.SeamRedirectFilter</filter-class>


      <filter-mapping>
      <filter-name>Seam Redirect Filter</filter-name>
      <url-pattern>*.seam</url-pattern>
      </filter-mapping>

      <!-- 120 second conversation timeout -->
      <context-param>
      <param-name>org.jboss.seam.core.manager.conversationTimeout</param-name>
      <param-value>120000</param-value>
      </context-param>


      <!-- MyFaces -->

      <context-param>
      <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
      <param-value>client</param-value>
      </context-param>

      <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>true</param-value>
      </context-param>

      <context-param>
      <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
      <param-value>.xhtml</param-value>
      </context-param>


      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>


      <!-- My Faces Extensions Filter -->

      <filter-name>extensionsFilter</filter-name>
      <!-- <filter-class>org.apache.myfaces.component.html.util.ExtensionsFilter</filter-class> -->
      <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
      <init-param>
      <param-name>uploadMaxFileSize</param-name>
      <param-value>100m</param-value>
      <!--
      Set the size limit for uploaded files.
      Format: 10 - 10 bytes
      10k - 10 KB
      10m - 10 MB
      1g - 1 GB

      -->
      </init-param>
      <init-param>
      <param-name>uploadThresholdSize</param-name>
      <param-value>100k</param-value>
      <!--
      Set the threshold size - files
      below this limit are stored in memory, files above
      this limit are stored on disk.

      Format: 10 - 10 bytes
      10k - 10 KB
      10m - 10 MB
      1g - 1 GB

      -->
      </init-param>

      <!--
      <init-param>
      <param-name>uploadRepositoryPath</param-name>
      <param-value>/temp</param-value>
      Set the path where the intermediary files will be stored.

      </init-param>
      -->


      <filter-mapping>
      <filter-name>extensionsFilter</filter-name>
      <url-pattern>*.seam</url-pattern>
      </filter-mapping>

      <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
      <filter-mapping>
      <filter-name>extensionsFilter</filter-name>
      <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
      </filter-mapping>

      <!-- Faces Servlet Mapping -->

      <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.seam</url-pattern>
      </servlet-mapping>


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


      </web-app>