4 Replies Latest reply on Oct 21, 2011 10:35 AM by Michael G

    my first jsf page with richfaces

    Scania Saab Newbie

      Hello to all;

      last few days I try to use RichFaces but I can not, i
      note that I am new to RichFaces



      I use a platform eclipse INDIGO, then I installed the tools boss.

      after I created a JSF 2.0 and servlet 3.0 version on the application server I am using jboss 7.0, but each time the page is not found:


      and here is my configuration:

      the list of libs I use:

      common-annotations.jar
      commons-beanutils.jar
      commons-collections.jar
      commons-digester.jar
      commons-logging.jar
      cssparser-0.9.5.jar
      el-ri.jar
      guava-r07.jar
      jhighlight-1.0.jar
      jsf-api-2.0.4-b09.jar
      jsf-facelets-1.1.14.jar
      jsf-impl-2.0.4-b09.jar
      jsf-tlds.jar
      jstl.jar
      RichFaces-component-api-4.0.0.Final.jar
      RichFaces-components-ui-4.0.0.Final.jar
      RichFaces-core-api-4.0.0.Final.jar
      RichFaces-core-impl-4.0.0.Final.jar
      sac-1.3.jar
      standard.jar

       

      this is my web.xml:

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

      <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

      xmlns="http://java.sun.com/xml/ns/javaee"

      xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"

      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"

      version="3.0">

        <display-name>jsf2</display-name>

        <context-param>

        <param-name>org.richfaces.SKIN</param-name>

        <param-value>classic</param-value>

      </context-param>

      <context-param>

        <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>

        <param-value>com.sun.facelets.FaceletViewHandler</param-value>

      </context-param>

      <filter>

        <display-name>RichFaces Filter</display-name>

        <filter-name>richfaces</filter-name>

        <filter-class>org.ajax4jsf.Filter</filter-class>

      </filter>

      <filter-mapping>

        <filter-name>richfaces</filter-name>

        <servlet-name>Faces Servlet</servlet-name>

        <dispatcher>REQUEST</dispatcher>

        <dispatcher>FORWARD</dispatcher>

        <dispatcher>INCLUDE</dispatcher>

      </filter-mapping>

      <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>/jsf2/*.jsf</url-pattern>

        </servlet-mapping>

        <context-param>

          <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name>

          <param-value>resources.application</param-value>

        </context-param>

        <listener>

          <listener-class>com.sun.faces.config.ConfigureListener</listener-class>

        </listener>

      </web-app>

       

       

      and this is my jsp file:

      <?xml version="1.0" encoding="ISO-8859-1" ?>

      <%@ page language="java" contentType="text/html; charset=ISO-8859-1"

          pageEncoding="ISO-8859-1"%>

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

      <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"xmlns:h="http://java.sun.com/jsf/html">

      <head>

      <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

      <title>Insert title here</title>

      </head>

      <body>

      <f:view>

      <h:commandButton value="valider">

          

      </h:commandButton>

      </f:view>

      </body>

      </html>

       

      also be noted that at the start of JBoss AS 7.0, the following messages:

       

      16:54:40,171 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.unit."jsf2.war".INSTALL:

      • org.jboss.msc.service.StartException

      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(

      1. DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(

      1. ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(

      1. ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(

      1. ThreadPoolExecutor.java:886) [:1.6.0_25]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(

      1. ThreadPoolExecutor.java:908) [:1.6.0_25]

      at java.lang.Thread.run(

      1. Thread.java:662) [:1.6.0_25]

      Caused by:

      1. java.lang.RuntimeException: Failed to load class org.ajax4jsf.Filter

      at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(

      1. EEClassConfigurationProcessor.java:141)

      at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(

      1. EEClassConfigurationProcessor.java:122)

      at org.jboss.as.ee.component.LazyValue.get(

      1. LazyValue.java:40)

      at org.jboss.as.ee.component.EEApplicationDescription.getClassConfiguration(

      1. EEApplicationDescription.java:183)

      at org.jboss.as.ee.component.ComponentDescription.createConfiguration(

      1. ComponentDescription.java:153)

      at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(

      1. EEModuleConfigurationProcessor.java:70)

      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(

      1. DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]

      ... 5 more

      Caused by:

      1. java.lang.ClassNotFoundException: org.ajax4jsf.Filter from [Module "deployment.jsf2.war:main" from Service Module Loader]

      at org.jboss.modules.ModuleClassLoader.findClass(

      1. ModuleClassLoader.java:191)

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(

      1. ConcurrentClassLoader.java:361)

      at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(

      1. ConcurrentClassLoader.java:333)

      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(

      1. ConcurrentClassLoader.java:310)

      at org.jboss.modules.ConcurrentClassLoader.loadClass(

      1. ConcurrentClassLoader.java:103)

      at java.lang.Class.forName0(

      Native Method) [:1.6.0_25]

      at java.lang.Class.forName(

      1. Class.java:247) [:1.6.0_25]

      at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(

      1. EEClassConfigurationProcessor.java:139)

      ... 11 more

       

      16:54:40,406 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "jsf2.war" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"jsf2.war\".INSTALL" => "

      • org.jboss.msc.service.StartException

      16:54:41,171 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) Stopped deployment jsf2.war in 776ms

      16:54:41,171 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Failed services" => {"jboss.deployment.unit.\"jsf2.war\".INSTALL" => "

      • org.jboss.msc.service.StartException