1 2 Previous Next 16 Replies Latest reply on Nov 3, 2008 3:29 AM by Stijn C.

    RichFaces 3.1.6 on OC4J 10.1.3

    Stijn C. Newbie

      Hello,

      I've been been trying to develop a simple application using RichFaces on the OC4J 10.1.3, but I'm having some problems. I've been trying to get this going for 3 days now, but no luck yet.

      Since I'm using OC4J 10.1.3 and this server does not support JSF 1.2 yet, I've had to resort to RichFaces 3.1.6. However, I can't get a simple form going. The page does seem to display correctly, but whenever I click my submit button, the page just seems to redirect to itself, not even entering the action of the backing bean. Really frustrating, because I can't seem to locate the source of the problem.


      This is my login page:

      <%@ page contentType="text/html"%>
      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
      <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
      <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
      
      <f:view>
      <html>
      <head>
      <link rel="stylesheet" href="resources/tmm.css" type="text/css" >
      <title>Login</title>
      </head>
      <body>
      
      <rich:panel id="Content_Panel" >
      <f:facet name="header">
      <h:outputText id="Out_Login" value="Please login"/>
      </f:facet>
      
      <h:form>
      <h:panelGrid id="Content_Grid" columns="2">
      
      <h:outputText value="User name:" />
      <h:inputText id="username" value="#{tmSession.username}"/>
      <h:outputText value="User password:"/>
      <h:inputSecret id="psswd" value="#{tmSession.psswd}"/>
      <h:commandButton value="Login" action="#{tmSession.logIn}"/>
      
      </h:panelGrid>
      </h:form>
      </rich:panel>
      
      </body>
      </html>
       </f:view>
      



      The backing bean:

      package com.xplanation.tm.client.web.maintenance.bean;
      
      public class TmSessionBean {
      
       private String username;
       private String psswd;
       private boolean loggedIn;
      
       public TmSessionBean() {
       System.out.println("CREATED TM SESSION");
       }
      
       public String getUsername() {
       System.out.println("GET username");
       return username;
       }
      
       public void setUsername(String username) {
       System.out.println("SET username: " + username);
       this.username = username;
       }
      
       public String getPsswd() {
       System.out.println("GET psswd");
       return psswd;
       }
      
       public void setPsswd(String psswd) {
       System.out.println("SET psswd: " + psswd);
       this.psswd = psswd;
       }
      
       public boolean isLoggedIn() {
       return loggedIn;
       }
      
       public String logIn() {
       System.out.println("LOG IN");
       loggedIn = true;
       return "loginSuccess";
       }
      }
      


      When the page loads, it prints:
      CREATED TM SESSION
      GET username
      GET psswd
      When I click the login button, it just prints the two GETs again while I get redirected to my login page!


      The faces-config.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE faces-config PUBLIC
       "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
       "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
      
      <faces-config>
      
       <application>
       <locale-config>
       <default-locale>en</default-locale>
       </locale-config>
       </application>
      
       <managed-bean>
       <managed-bean-name>tmSession</managed-bean-name>
       <managed-bean-class>com.xplanation.tm.client.web.maintenance.bean.TmSessionBean</managed-bean-class>
       <managed-bean-scope>session</managed-bean-scope>
       </managed-bean>
      
       <navigation-rule>
       <from-view-id>/Login.jsp</from-view-id>
       <navigation-case>
       <from-action>#{tmSession.logIn}</from-action>
       <from-outcome>loginSuccess</from-outcome>
       <to-view-id>Home.jsp</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-action>#{tmSession.logIn}</from-action>
       <from-outcome>loginFailure</from-outcome>
       <to-view-id>Login.jsp</to-view-id>
       </navigation-case>
       </navigation-rule>
      
       <navigation-rule>
       <from-view-id>/Menu.jsp</from-view-id>
       <navigation-case>
       <from-outcome>goToHome</from-outcome>
       <to-view-id>Home.jsp</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>goToNewProject</from-outcome>
       <to-view-id>ProjectNew.jsp</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>goToTasks</from-outcome>
       <to-view-id>ProjectList.jsp</to-view-id>
       </navigation-case>
       <navigation-case>
       <from-outcome>logOut</from-outcome>
       <to-view-id>Login.jsp</to-view-id>
       </navigation-case>
       </navigation-rule>
      
      </faces-config>
      



      The web.xml:

      <?xml version="1.0"?>
      <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">
      
       <display-name>TM Maintenance</display-name>
      
       <context-param>
       <param-name>org.richfaces.SKIN</param-name>
       <param-value>blueSky</param-value>
       </context-param>
       <context-param>
       <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
       <param-value>server</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>
       <filter>
       <display-name>Ajax4jsf Filter</display-name>
       <filter-name>ajax4jsf</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       </filter>
       <filter-mapping>
       <filter-name>ajax4jsf</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      
       <listener>
       <listener-class>com.sun.faces.config.ConfigureListener</listener-class>
       </listener>
      
       <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>
      
      
       <login-config>
       <auth-method>BASIC</auth-method>
       </login-config>
      
       <session-config>
       <session-timeout>60</session-timeout>
       </session-config>
       <welcome-file-list>
       <welcome-file>index.jsp</welcome-file>
       </welcome-file-list>
      
      </web-app>
      


      The libs included with my WAR file are the following:
      - commons-beanutils-1.7.jar
      - commons-collections-3.2.jar
      - commons-digester-1.8.jar
      - commons-el.jar
      - commons-logging-1.1.jar
      - el-api.jar
      - jsf-api.jar (1.1_01)
      - jsf-impl.jar (1.1_01)
      - jstl.jar
      - mysql-connector-java-3.1.10-bin.jar
      - oraclexsql.jar
      - richfaces-api-3.1.6.GA.jar
      - richfaces-impl-3.1.6.GA.jar
      - richfaces-ui-3.1.6.GA.jar
      - standard.jar
      - xercesImpl.jar


      Please, if anyone has any idea with might be the problem...
      I've searched the net but I have not found anyone with a similar problem. According to the documentation of RichFaces 3.1.6, it is supposed to work on OC4J, but I cannot get it to.

      Any help would be VERY much appreciated. Thanks!

      Best regards,
      Stijn

        • 1. Re: RichFaces 3.1.6 on OC4J 10.1.3
          Stijn C. Newbie

          Hrm. I think it's the libraries...

          Can someone detail me exactly what libraries I need to get RichFaces up and running on an OC4J 10.1.3.1.0? Or point me to a resource that details this?

          I'm guessing these are a given:
          - JSF 1.1_01: jsf-api.jar, jsf-impl.jar
          - RichFaces 3.1.6: richfaces-api-3.1.6.GA.jar, richfaces-impl-3.1.6.GA.jar, richfaces-ui-3.1.6.GA.jar
          - Apache Xerces 2.9.1 (to replace the default Oracle XML parser): xercesImpl.jar

          But what others?
          I also need JTSL, but what version? I think I also need some of those Apache Commons libs, but which exactly and what version?
          Do I also need the el-api.jar? Where on earth do I download that, by the way?

          Does anyone have experience with using RichFaces on OC4J? If so, I'd appreciate it if you'd share your experience. Thanks!

          Regards,
          Stijn

          • 2. Re: RichFaces 3.1.6 on OC4J 10.1.3
            Stijn C. Newbie

            Now, this is strange.

            I get the following in the output of the server:

            26-jun-2008 11:40:05 com.sun.faces.util.Util createInstance
            SEVERE: Can't instantiate class: org.ajax4jsf.application.AjaxStateManager'.:org.ajax4jsf.application.AjaxStateManager:exception:null
            


            When I browse to the page, I see a stacktrace:

            oracle.classloader.util.AnnotatedNoClassDefFoundError:
            
             Ontbrekende klasse: org.apache.commons.collections.map.LRUMap
            
             Afhankelijke klasse: org.ajax4jsf.cache.LRUMapCache
             Laadprogramma: tmm.web.tmm:0.0.0
             Code-source: /C:/AS/Oracle/OC4J/101310_4/j2ee/home/applications/tmm/tmm/WEB-INF/lib/richfaces-impl-3.1.6.GA.jar
             Configuratie: WEB-INF/lib/ directory in C:\AS\Oracle\OC4J\101310_4\j2ee\home\applications\tmm\tmm\WEB-INF\lib
            


            It can't find LRUMap? When I check, the class missing is contained in the commons-collections.jar library. But that library is included in the WAR file!

            These libs are now in the WEB-INF/lib folder:
            - commons-beanutils.jar
            - commons-collections.jar
            - commons-digester.jar
            - commons-logging.jar
            - el-api.jar
            - jsf-api.jar (1.1_01)
            - jsf-impl.jar (1.1_01)
            - jstl.jar (1.0)
            - mysql-connector.jar
            - richfaces-api-3.1.6.GA.jar
            - richfaces-ui-3.1.6.GA.jar
            - richfaces-impl-3.1.6.GA.jar
            - xercesImpl.jar (2.9.1)
            - xml-apis.jar

            The 4 Apache Commons libraries come from the JSF 1.1_01 zip I download from Sun.
            *sigh*
            All this trial and error and getting nowhere is becoming frustrating...

            Regards,
            Stijn

            • 3. Re: RichFaces 3.1.6 on OC4J 10.1.3
              Juan Ignacio Sánchez Lara Apprentice

              You've said at a blog (http://javanotepad.blogspot.com/2007/10/my-problems-putting-richfaces-to-work.html) that rich:messages and a4j:log won't give useful information. That's the first thing to double-check (IMHO).

              Second one is configuration. I think you have something wrong at your web.xml. This isn't wanted (since you're also mapping richfaces filter):

              <filter-mapping>
              <filter-name>ajax4jsf</filter-name>
              <servlet-name>Faces Servlet</servlet-name>
              FORWARD
              REQUEST
              INCLUDE
              </filter-mapping>

              • 4. Re: RichFaces 3.1.6 on OC4J 10.1.3
                Stijn C. Newbie

                Hello!

                Thanks for your reply.
                I've done as you asked, and removed the stuff from the web.xml, but it didn't change anything.
                I did however change the h:commandbutton of the form into an a4j:commandbutton, which made the a4j:log output some stuff.

                debug[12:48:18,626]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: click
                debug[12:48:18,626]: NEW AJAX REQUEST !!! with form :_id0
                debug[12:48:18,627]: Append text control _id0:username with value [hh] and value attribute [hh]
                debug[12:48:18,628]: Append password control _id0:psswd with value [hh] and value attribute [hh]
                debug[12:48:18,629]: Append hidden control _id0 with value [_id0] and value attribute [_id0]
                debug[12:48:18,629]: parameter _id0:_id7 with value _id0:_id7
                debug[12:48:18,630]: Start XmlHttpRequest
                debug[12:48:18,631]: Reqest state : 1
                debug[12:48:18,632]: QueryString: AJAXREQUEST=_viewRoot&_id0%3Ausername=hh&_id0%3Apsswd=hh&_id0=_id0&_id0%3A_id7=_id0%3A_id7&
                debug[12:48:18,632]: Reqest state : 1
                debug[12:48:18,977]: Reqest state : 2
                debug[12:48:18,978]: Reqest state : 3
                debug[12:48:18,979]: Reqest state : 4
                debug[12:48:18,980]: Reqest end with state 4
                debug[12:48:18,980]: Response with content-type: text/xml;charset=UTF-8
                debug[12:48:18,986]: Full response content: <?xml version="1.0"?>
                <html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/tmm/a4j_3_1_6.GAcss/panel.xcss/DATB/eAFjlbr0AAAC6gHS.jsf" class="component" /><link type="text/css" rel="stylesheet" href="/tmm/a4j_3_1_6.GAorg/richfaces/renderkit/html/css/msg.css.jsf" class="component" /><link type="text/css" rel="stylesheet" href="/tmm/a4j_3_1_6.GAorg/richfaces/renderkit/html/css/msgs.css.jsf" class="component" /><script type="text/javascript" src="/tmm/a4j_3_1_6.GAorg.ajax4jsf.javascript.AjaxScript.jsf">
                </script><link rel="stylesheet" href="resources/tmm.css" type="text/css" /><title>Login</title></head><body><table id="_id0:_id1" cellpadding="0" cellspacing="0" class="rich-messages" style="display: none; null"><tbody><tr><td><span class="rich-messages-marker"><img src="resources/passed.gif" alt="" /></span><span class="rich-messages-label">No Errors</span></td></tr></tbody></table><meta name="Ajax-Update-Ids" content="_id0:_id1" /><span id="ajax-view-state"></span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body></html>
                debug[12:48:18,987]: Header Ajax-Update-Ids not found, search in <meta>
                debug[12:48:18,988]: search for elements by name 'meta' in element #document
                debug[12:48:18,988]: selectNodes found 2
                debug[12:48:18,989]: Find <meta name='Ajax-Update-Ids' content='_id0:_id1'>
                debug[12:48:18,989]: Update page by list of rendered areas from response _id0:_id1
                debug[12:48:18,990]: search for elements by name 'script' in element #document
                debug[12:48:18,990]: selectNodes found 1
                debug[12:48:18,991]: <script> in response with src=/tmm/a4j_3_1_6.GAorg.ajax4jsf.javascript.AjaxScript.jsf
                debug[12:48:18,991]: Such element exist in document
                debug[12:48:18,991]: search for elements by name 'link' in element #document
                debug[12:48:18,992]: selectNodes found 4
                debug[12:48:18,993]: <link> in response with src=/tmm/a4j_3_1_6.GAcss/panel.xcss/DATB/eAFjlbr0AAAC6gHS.jsf
                debug[12:48:18,993]: Such element exist in document
                debug[12:48:18,994]: <link> in response with src=/tmm/a4j_3_1_6.GAorg/richfaces/renderkit/html/css/msg.css.jsf
                debug[12:48:18,994]: Such element exist in document
                debug[12:48:18,995]: <link> in response with src=/tmm/a4j_3_1_6.GAorg/richfaces/renderkit/html/css/msgs.css.jsf
                debug[12:48:18,995]: Such element exist in document
                debug[12:48:18,996]: <link> in response with src=resources/tmm.css
                debug[12:48:18,996]: Such element exist in document
                debug[12:48:18,997]: Attempt to update part of page for Id: _id0:_id1
                debug[12:48:18,997]: call selectSingleNode for id= _id0:_id1
                debug[12:48:18,998]: Replace content of node by outerHTML()
                error[12:48:18,999]: Error to clear node content by innerHTML Unknown runtime error
                debug[12:48:19,000]: search for elements by name 'script' in element table
                debug[12:48:19,001]: selectNodes found 0
                debug[12:48:19,001]: Scripts in updated part count : 0
                debug[12:48:19,001]: Update part of page for Id: _id0:_id1 successful
                debug[12:48:19,002]: call selectSingleNode for id= ajax-view-state
                debug[12:48:19,002]: Hidden JSF state fields:
                debug[12:48:19,003]: Namespace for hidden view-state input fields is undefined
                debug[12:48:19,003]: search for elements by name 'input' in element span
                debug[12:48:19,004]: selectNodes found 0
                debug[12:48:19,004]: Replace value for inputs: 4 by new values: 0
                debug[12:48:19,005]: search for elements by name 'INPUT' in element span
                debug[12:48:19,005]: selectNodes found 0
                debug[12:48:19,006]: Replace value for inputs: 4 by new values: 0
                debug[12:48:19,006]: call selectSingleNode for id= _A4J.AJAX.focus
                debug[12:48:19,007]: No focus information in response
                debug[12:48:19,007]: call selectSingleNode for id= org.ajax4jsf.oncomplete


                Notice the error[12:48:18,999] in there. Any idea what could be going wrong?
                Thanks!

                Regards,
                Stijn

                • 5. Re: RichFaces 3.1.6 on OC4J 10.1.3
                  Stijn C. Newbie


                  By the way, for reference, I've narrowed it down to the following required libs for my app:
                  - commons-beanutils-1.7.jar
                  - commons-collections-3.2.1.jar
                  - commons-digester-1.8.jar
                  - commons-logging-1.1.1.jar
                  - commons-logging-adapters-1.1.1.jar
                  - commons-logging-api-1.1.1.jar
                  - jsf-api.jar (1.1_01)
                  - jsf-impl.jar (1.1_01)
                  - jstl.jar (1.1)
                  - richfaces-api-3.1.6.GA.jar
                  - richfaces-impl-3.1.6.GA.jar
                  - richfaces-ui-3.1.6.GA.jar
                  - xercesImpl.jar (2.9.1)

                  • 6. Re: RichFaces 3.1.6 on OC4J 10.1.3
                    Juan Ignacio Sánchez Lara Apprentice

                    It's clear response doesn't content what it should...

                    Try putting f:view inside body instead around everything, and putting ids to every JSF component (JSF 1.1 has known problems on automatic id generation).

                    • 7. Re: RichFaces 3.1.6 on OC4J 10.1.3
                      Stijn C. Newbie

                      Hmm. Still no luck.
                      The page looks like this now:

                      <%@ page contentType="text/html" %>
                      <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
                      <%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
                      <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
                      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
                      
                      <html>
                      <head>
                       <link rel="stylesheet" href="resources/tmm.css" type="text/css">
                       <title>Login</title>
                      </head>
                      <body>
                      <f:view>
                      
                       <rich:panel id="ContentPanel">
                       <f:facet name="header">
                       <h:outputText id="OutLogin" value="Please login"/>
                       </f:facet>
                       <h:form id="FormLogin">
                       <h:panelGrid id="ContentGrid" columns="2">
                       <h:outputText id="OutUsername" value="User name:"/>
                       <h:inputText id="InUsername" value="#{tmSession.username}"/>
                       <h:outputText id="OutPsswd" value="User password:"/>
                       <h:inputSecret id="InPsswd" value="#{tmSession.psswd}"/>
                       <a4j:commandButton id="ButtonLogin" value="Login" action="#{tmSession.logIn}"/>
                       </h:panelGrid>
                       </h:form>
                       </rich:panel>
                       <a4j:log id="OutLog" popup="false" level="ALL" style="width: 800px; height: 300px;"></a4j:log>
                      
                      </f:view>
                      </body>
                      </html>


                      It still does nada, but the output of the a4j:log has changed slightly.
                      Instead of an error I got a warning now (I entered 'vv' as username and password):

                      debug[14:14:44,753]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: click
                      debug[14:14:44,753]: NEW AJAX REQUEST !!! with form :FormLogin
                      debug[14:14:44,754]: Append text control FormLogin:InUsername with value [vv] and value attribute [vv]
                      debug[14:14:44,754]: Append password control FormLogin:InPsswd with value [vv] and value attribute [vv]
                      debug[14:14:44,755]: Append hidden control FormLogin with value [FormLogin] and value attribute [FormLogin]
                      debug[14:14:44,756]: parameter FormLogin:ButtonLogin with value FormLogin:ButtonLogin
                      debug[14:14:44,756]: Start XmlHttpRequest
                      debug[14:14:44,769]: Reqest state : 1
                      debug[14:14:44,770]: QueryString: AJAXREQUEST=_viewRoot&FormLogin%3AInUsername=vv&FormLogin%3AInPsswd=vv&FormLogin=FormLogin&FormLogin%3AButtonLogin=FormLogin%3AButtonLogin&
                      debug[14:14:44,789]: Reqest state : 1
                      debug[14:14:45,231]: Reqest state : 2
                      debug[14:14:45,236]: Reqest state : 3
                      debug[14:14:45,315]: Reqest state : 4
                      debug[14:14:45,315]: Reqest end with state 4
                      debug[14:14:45,370]: Response with content-type: text/xml;charset=UTF-8
                      debug[14:14:45,375]: Full response content: <?xml version="1.0"?>
                      <html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/tmm/a4j_3_1_6.GAcss/panel.xcss/DATB/eAFjlbr0AAAC6gHS.jsf" class="component" /><script type="text/javascript" src="/tmm/a4j_3_1_6.GAorg.ajax4jsf.javascript.AjaxScript.jsf">
                      </script><link rel="stylesheet" href="resources/tmm.css" type="text/css" /><title>Login</title></head><body><meta name="Ajax-Update-Ids" content="" /><span id="ajax-view-state"></span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body></html>
                      debug[14:14:45,396]: Header Ajax-Update-Ids not found, search in <meta>
                      debug[14:14:45,397]: search for elements by name 'meta' in element #document
                      debug[14:14:45,399]: selectNodes found 2
                      debug[14:14:45,399]: Find <meta name='Ajax-Update-Ids' content=''>
                      warn[14:14:45,400]: No information in response about elements to replace
                      debug[14:14:45,400]: call selectSingleNode for id= ajax-view-state
                      debug[14:14:45,401]: Hidden JSF state fields:
                      debug[14:14:45,401]: Namespace for hidden view-state input fields is undefined
                      debug[14:14:45,402]: search for elements by name 'input' in element span
                      debug[14:14:45,402]: selectNodes found 0
                      debug[14:14:45,402]: Replace value for inputs: 4 by new values: 0
                      debug[14:14:45,403]: search for elements by name 'INPUT' in element span
                      debug[14:14:45,410]: selectNodes found 0
                      debug[14:14:45,411]: Replace value for inputs: 4 by new values: 0
                      debug[14:14:45,411]: call selectSingleNode for id= _A4J.AJAX.focus
                      debug[14:14:45,411]: No focus information in response
                      debug[14:14:45,412]: call selectSingleNode for id= org.ajax4jsf.oncomplete


                      Thanks!

                      Regards,
                      Stijn

                      • 8. Re: RichFaces 3.1.6 on OC4J 10.1.3
                        Juan Ignacio Sánchez Lara Apprentice

                        Well, you've gotten a warn instead of an error, that's a huge leap ahead! :)

                        That's the common warning when server is not rendering the region that should be updated.

                        The only relevant difference between your web.xml and mine is I turn forceParser off:

                        <display-name>RichFaces Filter</display-name>
                        <filter-name>richfaces</filter-name>
                        <filter-class>org.ajax4jsf.Filter</filter-class>
                        <init-param>
                        <param-name>forceparser</param-name>
                        <param-value>false</param-value>
                        </init-param>



                        Try and see..

                        I use SJSAS 8.2 and web I update web.xml restarting's not enough, I must do a redeploy, maybe OC4J has the same liimitation...

                        Is there any complilation error/warning, or any server message on startup?

                        Does a common h:commandButton inside a h:form works?

                        • 9. Re: RichFaces 3.1.6 on OC4J 10.1.3
                          Stijn C. Newbie

                          No luck: :-S
                          I restarted the server: nothing.
                          I added your extra parameter and redeployed: nothing.
                          I restarted the server again, for good measure: still nothing.

                          But yes, at least we're moving ahead. :-)

                          As a matter of fact, I do have a warning in the server output:
                          27-jun-2008 14:09:38 com.sun.faces.config.rules.ComponentRule end
                          WARNING: [ComponentRule]{faces-config/component} Merge(javax.faces.ViewRoot)


                          I've been trying to find what causes it, but again, haven't found anything yet.
                          Nothing else is printed on the server, besides this:
                          INFO: Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
                          27-jun-2008 14:10:56 org.ajax4jsf.cache.LRUMapCacheFactory createCache
                          INFO: Creating LRUMap cache instance using parameters: {org.richfaces.SKIN=blueSky, javax.faces.STATE_SAVING_METHOD=server}
                          27-jun-2008 14:10:56 org.ajax4jsf.cache.LRUMapCacheFactory createCache
                          INFO: Creating LRUMap cache instance of default capacity
                          27-jun-2008 14:10:56 org.ajax4jsf.cache.CacheManager getCacheFactory
                          INFO: Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory
                          27-jun-2008 14:10:56 org.ajax4jsf.cache.LRUMapCacheFactory createCache
                          INFO: Creating LRUMap cache instance using parameters: {org.richfaces.SKIN=blueSky, javax.faces.STATE_SAVING_METHOD=server}
                          27-jun-2008 14:10:56 org.ajax4jsf.cache.LRUMapCacheFactory createCache
                          INFO: Creating LRUMap cache instance of default capacity


                          Don't really know what that is, looks like informative spam to me. :-P

                          And no, an h:commandbutton in an h:form doesn't work either. It's what I had first, if you look at my very first post.
                          I do notice a difference though, between using the h:commandbutton and the a4j:commandbutton.
                          When I use the h:commandbutton, the entire page seems to get refreshed, and the System.outs I put in the GET-methods are printed. When I use the a4j:commandbutton, only the a4j:log seems to update, and no System.outs are printed.
                          But I reckon that's intended behavior? That the a4j only updates part of your page through JS?

                          As you might notice, I'm rather new to JSF. ;-)

                          Thanks.

                          Regards,
                          Stijn

                          • 10. Re: RichFaces 3.1.6 on OC4J 10.1.3
                            Stijn C. Newbie

                            Hrm.
                            Strangely enough, the warning in the a4j:log has disappeared, for no apparent reason.

                            debug[17:04:03,106]: Have Event [object Object] with properties: target: undefined, srcElement: [object], type: click
                            debug[17:04:03,106]: NEW AJAX REQUEST !!! with form :FormLogin
                            debug[17:04:03,107]: Append text control FormLogin:InUsername with value [gg] and value attribute [gg]
                            debug[17:04:03,108]: Append password control FormLogin:InPsswd with value [gggg] and value attribute [gggg]
                            debug[17:04:03,108]: Append hidden control FormLogin with value [FormLogin] and value attribute [FormLogin]
                            debug[17:04:03,109]: parameter FormLogin:ButtonLogin with value FormLogin:ButtonLogin
                            debug[17:04:03,110]: Start XmlHttpRequest
                            debug[17:04:03,111]: Reqest state : 1
                            debug[17:04:03,111]: QueryString: AJAXREQUEST=_viewRoot&FormLogin%3AInUsername=gg&FormLogin%3AInPsswd=gggg&FormLogin=FormLogin&FormLogin%3AButtonLogin=FormLogin%3AButtonLogin&
                            debug[17:04:03,112]: Reqest state : 1
                            debug[17:04:03,420]: Reqest state : 2
                            debug[17:04:03,421]: Reqest state : 3
                            debug[17:04:03,422]: Reqest state : 4
                            debug[17:04:03,422]: Reqest end with state 4
                            debug[17:04:03,423]: Response with content-type: text/xml;charset=UTF-8
                            debug[17:04:03,423]: Full response content: <?xml version="1.0"?>
                            <html xmlns="http://www.w3.org/1999/xhtml"><head><link type="text/css" rel="stylesheet" href="/tmm/a4j_3_1_6.GAcss/panel.xcss/DATB/eAFjlbr0AAAC6gHS.jsf" class="component" /><link type="text/css" rel="stylesheet" href="/tmm/a4j_3_1_6.GAorg/richfaces/renderkit/html/css/msg.css.jsf" class="component" /><link type="text/css" rel="stylesheet" href="/tmm/a4j_3_1_6.GAorg/richfaces/renderkit/html/css/msgs.css.jsf" class="component" /><script type="text/javascript" src="/tmm/a4j_3_1_6.GAorg.ajax4jsf.javascript.AjaxScript.jsf">
                            </script><link rel="stylesheet" href="resources/tmm.css" type="text/css" /><title>Login</title></head><body><dl id="_id0" class="rich-messages" style="display: none; null"><dt><span class="rich-messages-label"></span></dt></dl><meta name="Ajax-Update-Ids" content="_id0" /><span id="ajax-view-state"></span><meta id="Ajax-Response" name="Ajax-Response" content="true" /></body></html>
                            debug[17:04:03,424]: Header Ajax-Update-Ids not found, search in <meta>
                            debug[17:04:03,425]: search for elements by name 'meta' in element #document
                            debug[17:04:03,425]: selectNodes found 2
                            debug[17:04:03,425]: Find <meta name='Ajax-Update-Ids' content='_id0'>
                            debug[17:04:03,426]: Update page by list of rendered areas from response _id0
                            debug[17:04:03,426]: search for elements by name 'script' in element #document
                            debug[17:04:03,427]: selectNodes found 1
                            debug[17:04:03,427]: <script> in response with src=/tmm/a4j_3_1_6.GAorg.ajax4jsf.javascript.AjaxScript.jsf
                            debug[17:04:03,428]: Such element exist in document
                            debug[17:04:03,428]: search for elements by name 'link' in element #document
                            debug[17:04:03,429]: selectNodes found 4
                            debug[17:04:03,430]: <link> in response with src=/tmm/a4j_3_1_6.GAcss/panel.xcss/DATB/eAFjlbr0AAAC6gHS.jsf
                            debug[17:04:03,430]: Such element exist in document
                            debug[17:04:03,430]: <link> in response with src=/tmm/a4j_3_1_6.GAorg/richfaces/renderkit/html/css/msg.css.jsf
                            debug[17:04:03,431]: Such element exist in document
                            debug[17:04:03,431]: <link> in response with src=/tmm/a4j_3_1_6.GAorg/richfaces/renderkit/html/css/msgs.css.jsf
                            debug[17:04:03,432]: Such element exist in document
                            debug[17:04:03,432]: <link> in response with src=resources/tmm.css
                            debug[17:04:03,433]: Such element exist in document
                            debug[17:04:03,433]: Attempt to update part of page for Id: _id0
                            debug[17:04:03,434]: call selectSingleNode for id= _id0
                            debug[17:04:03,435]: Replace content of node by outerHTML()
                            debug[17:04:03,436]: search for elements by name 'script' in element dl
                            debug[17:04:03,436]: selectNodes found 0
                            debug[17:04:03,437]: Scripts in updated part count : 0
                            debug[17:04:03,437]: Update part of page for Id: _id0 successful
                            debug[17:04:03,438]: call selectSingleNode for id= ajax-view-state
                            debug[17:04:03,438]: Hidden JSF state fields:
                            debug[17:04:03,438]: Namespace for hidden view-state input fields is undefined
                            debug[17:04:03,439]: search for elements by name 'input' in element span
                            debug[17:04:03,439]: selectNodes found 0
                            debug[17:04:03,440]: Replace value for inputs: 4 by new values: 0
                            debug[17:04:03,441]: search for elements by name 'INPUT' in element span
                            debug[17:04:03,441]: selectNodes found 0
                            debug[17:04:03,441]: Replace value for inputs: 4 by new values: 0
                            debug[17:04:03,442]: call selectSingleNode for id= _A4J.AJAX.focus
                            debug[17:04:03,442]: No focus information in response
                            debug[17:04:03,443]: call selectSingleNode for id= org.ajax4jsf.oncomplete


                            Despite this, the form still won't submit. *sigh*
                            I am really wondering where this error lies. Does it have something to do with the message I get on the server?
                            com.sun.faces.config.rules.ComponentRule end
                            WARNING: [ComponentRule]{faces-config/component} Merge(javax.faces.ViewRoot)


                            But, I really appreciate all your help. :-)
                            I really believe in this technology, so I want to make it work...
                            Any other suggestions, or things I might try?

                            Regards,
                            Stijn

                            • 11. Re: RichFaces 3.1.6 on OC4J 10.1.3
                              Juan Ignacio Sánchez Lara Apprentice

                              You might be new to JSF but not to this world, since you give many useful information =D

                              When I began with this I tried to make MyFaces + Tomahawk + Sandbox + Facelets + A4J + RichFaces (they weren't the same) + Spring + Hibernate at the same time, and the learnt lesson was you MUST go step by step.

                              It seems JSF is not working at all. I'd first make plain JSF work. Adding RichFaces then will be seamless ;) I'd start from scratch and make it work.

                              I'd like to be more helpful, sorry

                              • 12. Re: RichFaces 3.1.6 on OC4J 10.1.3
                                Stijn C. Newbie

                                Ha.
                                Well, what d'you know...

                                I downgraded from RichFaces 3.1.6 to 3.1.5, and now it actually does what I expect to. It enters the backing bean and redirects to the appropriate page. Awesome.

                                Strange though, that it would work with 3.1.5 and not with 3.1.6...
                                Is there any reason why I'd want 3.1.6 instead of 3.1.5?

                                Regards,
                                Stijn

                                • 13. Re: RichFaces 3.1.6 on OC4J 10.1.3
                                  Juan Ignacio Sánchez Lara Apprentice

                                  WTF??? It's certainly surprising (even more than Spain winning Euro, ooeoeoeoe =D).

                                  I've just upgraded and I have seen not such behaviour. 3.1.6 should've been just a maintenance release...

                                  • 14. Re: RichFaces 3.1.6 on OC4J 10.1.3
                                    Stijn C. Newbie

                                    Yeah, congrats on that, by the way. A well earned and long overdue victory for the Spanish team. :-)

                                    Anyway, yeah, strange stuff. Maybe there's some discrepancy between the RF 3.1.6 libs and those on the OC4J server? Or maybe I have a configuration error somewhere, and 3.1.5 is less strict then 3.1.6? Who knows...
                                    This stuff is extremely hard to debug, as you get no feedback from the application whatsoever.

                                    But it's working now. I'm perfectly happy with using the 3.1.5 libs, instead of 3.1.6.

                                    Thanks for all your help!

                                    Regards,
                                    Stijn

                                    1 2 Previous Next