5 Replies Latest reply on Apr 6, 2010 10:58 AM by edrus

    Richfaces problem?

      Hi all,

       

      I'm using Richfaces 3.1.6 SR1 with JBoss 4.0.3 SP1 and JSF 1.1_01 RI

       

      I tried to compile the project using richfaces and i got a NoClassDefFoundError: org/apache/commons/collections/map/LRUMap

       

      Then i've downloaded commons-collections-3.1.jar and deploy was successfull.

       

      My project has a login page. Entering the information (user and password) and clicking "OK" it is creating another browser. The old browser remains with a "loading" message and the new one loads the page but with no session.

       

      When i remove richfaces jars and tags from both web.xml and jsp files everything comes back to normal, i.e., when i click on "OK" in login page, the welcome page loads fine (in the same browser).

       

      Do you know what i'm doing wrong?

       

      Thanks.

        • 1. Re: Richfaces problem?
          nbelaevski

          Hi,

           

          Please post page code.

          • 2. Re: Richfaces problem?

            Hi Nick,

             

            index.jsp:

             

            <!doctype html public "-//w3c//dtd html 4.0 transitional//en">

            <html>

            <head></head>

             

            <body>

             

            <jsp:forward page='<%= "/pages/DesktopClient.faces" +

            (request.getQueryString() ==null ? "" : "?" + request.getQueryString() ) %>' />

             

            </body>

            </html>

             

            web.xml:

             

            ...

            <!-- Richfaces config -->

            <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>INCLUDE</dispatcher>

            </filter-mapping>

            ...

             

            Teste.jsp:

            <%@ page language="java" pageEncoding="UTF-8"%>

            <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

            <%@ taglib uri="http://client.sias.gesmallworld.com/dynjsf/core" prefix="dc"%>

            <%@ taglib uri="http://client.sias.gesmallworld.com/dynjsf/html_basic" prefix="dh"%>

            <%@ taglib uri="http://client.sias.gesmallworld.com/dynjsf" prefix="dyn"%>

            <!-- Richfaces taglibs -->

            <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>

            <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>

             

            <dc:view>

                  <dyn:head title="Teste" themePath="xp" stylesheets="teste"/>

                  <f:loadBundle basename="Teste" var="bundle"/>

                  <dyn:body styleClass="background_menu">

            ...

            OBS: No config at all jsp... only taglib references.

             

            DesktopClient.jsp:

            <%@ page language="java" contentType="text/html; charset=UTF-8"%>

            <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>

            <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>

            <%@ taglib uri="http://client.sias.gesmallworld.com/dynjsf/core" prefix="dc"%>

            <%@ taglib uri="http://client.sias.gesmallworld.com/dynjsf/html_basic" prefix="dh"%>

            <%@ taglib uri="http://client.sias.gesmallworld.com/dynjsf" prefix="dyn"%>

            <%@ taglib uri="http://client.sias.gesmallworld.com/desktop" prefix="desk"%>

             

            <dc:view>

                  <f:loadBundle basename="Main" var="bundle" />

                  <f:loadBundle basename="User" var="uBundle" />

                  <f:loadBundle basename="Query" var="queryBundle" />

                  <f:loadBundle basename="Layer" var="lBundle" />

                  <dyn:head title="#{bundle.application_title}" themePath="xp" stylesheets="desktop,menu" />

                  <dyn:body styleClass="background_silver_no_scroll">

                

                        <%-- Enter form for new password after password expiry --%>

                        <dh:panelGroup rendered="#{UserBean.passwordExpired}" styleClass="login_body">

            ...

             

             

            When i click login button, it shows another browser with DesktopClient.faces.

             

            Removing all richfaces config works fine. Its annoying =D

             

            Any idea?

             

            Thanks a lot,

            Edro.

            • 3. Re: Richfaces problem?

              I've made a test:

               

              1 - Added all dependent libraries (commons-*) to the project and made all config in web.xml and *.jsp from reference guide. I got the problem.

               

              2 - removed all richfaces configs from web.xml and taglibs from *.jsp, and the problem persisted... . No error was found in jboss log.

               

              3 - removed all richfaces libs from project and deployed it. The application worked fine.

               

              4 - added only the ajax4jsf-1.1.1.jar to project and deployed it. The problem returned. No error was found in jboss log.

               

              5 - removed ajax4jsf-1.1.1.jar, and only commons-* libs was in project. The application works fine.

               

              I don't know, but seems to be a conflict with ajax and some libs of my project.

               

              Can you see anything bad?

               

              Thanks,

              Edro.

              • 4. Re: Richfaces problem?
                ilya_shaikovsky

                ajax4jsf library should not be added since 3.1.0 after projects merge. just three richfaces libraries should be there.

                • 5. Re: Richfaces problem?

                  Sorry, but seems that i don't explained very well...

                   

                  I don't used both at the same time.

                   

                  As i tried, i used 3 richfaces libs to one test... then removed all richfaces libs from project and added ajax4jsf and made another test.

                   

                  Using richfaces libs or ajax4jsf lib i got the same problem. Don't know if this is a problem or configuration mistake.