11 Replies Latest reply on Nov 15, 2007 12:29 PM by David bashford

    richfaces with jdeveloper

    Serkan Susantez Newbie

      Hi,
      i am using Oracle JDeveloper and i want to create an jsf application with richfaces support. i downloaded richfaces-ui-3.1.2.GA-bin.zip and import 3 libraries and common collections to the project.

      <?xml version = '1.0' encoding = 'windows-1254'?>
      <web-app 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"
       version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
       <description>Empty web.xml file for Web Application</description>
       <context-param>
       <param-name>org.ajax4jsf.SKIN</param-name>
       <param-value>DEFAULT</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>/faces/*</url-pattern>
       </servlet-mapping>
       <session-config>
       <session-timeout>35</session-timeout>
       </session-config>
       <mime-mapping>
       <extension>html</extension>
       <mime-type>text/html</mime-type>
       </mime-mapping>
       <mime-mapping>
       <extension>txt</extension>
       <mime-type>text/plain</mime-type>
       </mime-mapping>
      </web-app>

      this is my web.xml. when i run the project the framework works succesfully but skin does not displays. forexample when i put a calendar to the project it works but it displays as plain text

      thnx


        • 1. Re: richfaces with jdeveloper
          Serkan Susantez Newbie

          here's the screen shot...
          [img]http://www.susantez.net/jsf/richfaces/error1-skin.JPG[/img]

          source of the page:

          <?xml version='1.0' encoding='windows-1254'?>
          <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:a4j="http://richfaces.org/a4j"
           xmlns:rich="http://richfaces.org/rich">
           <jsp:output omit-xml-declaration="true" doctype-root-element="HTML"
           doctype-system="http://www.w3.org/TR/html4/loose.dtd"
           doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
           <jsp:directive.page contentType="text/html;charset=windows-1254"/>
           <f:view>
           <html>
           <head>
           <meta http-equiv="Content-Type"
           content="text/html; charset=windows-1254"/>
           <title>index</title>
           </head>
           <body>
           <a4j:form>
           <rich:panelBar>
           <rich:panelBarItem label="panelBarItem 1">
           <h:inputText size="50" value="#{backing_IndexBean.txt}">
           <a4j:support event="onkeyup" reRender="rep"/>
           </h:inputText>
           <h:outputText value="#{backing_IndexBean.txt}" id="rep"/>
           </rich:panelBarItem>
           <rich:panelBarItem label="panelBarItem 2">
           <rich:calendar popup="true"/>
           </rich:panelBarItem>
           </rich:panelBar>
           </a4j:form>
           </body>
           </html>
           </f:view>
          </jsp:root>
          


          • 2. Re: richfaces with jdeveloper
            Ilya Shaikovsky Master

            seems like styles and classes isn't applied at all. B.t.w. We investigate OC4J server problems right now..

            • 3. Re: richfaces with jdeveloper
              Michael Morgan Newbie

              I am having the same issue. I am using JDEV 10.1.3. This also occurs when deployed to an external OC4J. The Style Sheets are downloaded, but they are just empty. Also this seems to effect some of the JavaScript files for things like the ModalPanel component. Some of the JavaScript is missing because the RichFaces.showModalWindow is not available. Has a solution/workaround been determined?

              • 5. Re: richfaces with jdeveloper
                Nick Belaevski Master

                Could you please add server logs to the issue?

                • 6. Re: richfaces with jdeveloper
                  Ruslan Tjulinov Newbie

                  That's because Oracle AS not work with xcss, and for fixing this you need to change default xml (oracle.xml) parcer to, parcer can work with it, for examle take XAMP from GlassFish servers.

                  • 7. Re: richfaces with jdeveloper
                    Ruslan Tjulinov Newbie

                    Sorry, of course it's JAXP not "XAMP", and can be downloaded form here https://jaxp.dev.java.net/, put two files to WEB-INF/libs directory and in JDeveloper go to Project Properties->Run/Debug->Default->Edit->Launch Settings and put to Java Options this : -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl
                    And be happy :)

                    • 8. Re: richfaces with jdeveloper
                      Michael Morgan Newbie

                      Is there a procedure to configure an external standalone OC4J to use the JAXP parser?

                      • 9. Re: richfaces with jdeveloper
                        Ruslan Tjulinov Newbie

                        Yes, you just need to follow this instructions http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html
                        and include jaxp-api.jar & jaxp-ri.jar files instead of oracle.xml while deploying app.

                        • 10. Re: richfaces with jdeveloper
                          Michael Morgan Newbie

                          Following these instructions solved the CSS issues in both the internal JDEV and standalone OC4J, however I am still not getting all the proper JavaScript files for each component.

                          Using the example richfaces demo, I added a ModalPanel to a simple page and I receive, RichFaces.showModalPanel is not a function JavaScript error.... Is this related to the xml parser as well?

                          • 11. Re: richfaces with jdeveloper
                            David bashford Newbie

                            I'm having this same problem with standalone OC4J and richfaces. I've registered jaxp as a shared library and removed oracle.xml and redeployed, but I get the following error...

                            It looks as if it is still attempting to create instances of the oracle parsers

                            07/11/15 12:21:16 SEVERE: ProgressObjectImpl.reportError Provider oracle.xml.jaxp.JXDocumentBuilderFactory could not be instantiated: java.lang.NullPointerExceptionoracle.oc4j.admin.jmx.shared.exceptions.InternalException: Provider oracle.xml.jaxp.JXDocumentBuilderFactory could not be instantiated: java.lang.NullPointerException
                            at oracle.oc4j.admin.jmx.shared.deploy.NotificationUserData.(NotificationUserData.java:107)
                            at oracle.oc4j.admin.internal.Notifier.reportError(Notifier.java:429)
                            at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:136)
                            at oracle.oc4j.admin.jmx.server.mbeans.deploy.OC4JDeployerRunnable.doRun(OC4JDeployerRunnable.java:52)
                            at oracle.oc4j.admin.jmx.server.mbeans.deploy.DeployerRunnable.run(DeployerRunnable.java:81)
                            at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
                            at java.lang.Thread.run(Thread.java:595)

                            Caused by: javax.xml.parsers.FactoryConfigurationError: Provider oracle.xml.jaxp.JXDocumentBuilderFactory could not be instantiated: java.lang.NullPointerException
                            at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:104)

                            at org.apache.myfaces.shared_impl.webapp.webxml.WebXmlParser.parse(WebXmlParser.java:81)
                            at org.apache.myfaces.shared_impl.webapp.webxml.WebXml.init(WebXml.java:204)
                            at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:85)
                            at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:52)

                            Any thoughts?