1 Reply Latest reply on Oct 19, 2007 9:12 AM by Mike K

    Using RichFaces and Oracle ADF

    Paul Mormino Newbie

      Getting this error when using RichFaces and Oracle ADF components together:

      SEVERE: Error Rendering View[/organization_search.xhtml]
      java.lang.NullPointerException
      at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.setRenderingProperty(FacesRenderingContext.java:157)
      at oracle.adfinternal.view.faces.ui.RenderedNodeRenderingContext.setProperty(RenderedNodeRenderingContext.java:162)
      at oracle.adfinternal.view.faces.ui.ServletRenderingContext._setContextProperty(ServletRenderingContext.java:309)
      at oracle.adfinternal.view.faces.ui.ServletRenderingContext.setServletRequest(ServletRenderingContext.java:140)
      at oracle.adfinternal.view.faces.ui.ServletRenderingContext.setServletRequest(ServletRenderingContext.java:163)
      at oracle.adfinternal.view.faces.ui.ServletRenderingContext.init(ServletRenderingContext.java:113)
      at oracle.adfinternal.view.faces.ui.ServletRenderingContext.init(ServletRenderingContext.java:96)
      at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.(FacesRenderingContext.java:106)
      at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.createRenderingContext(FacesRenderingContext.java:79)
      at oracle.adfinternal.view.faces.uinode.UINodeRendererBase.getRenderingContext(UINodeRendererBase.java:89)
      at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingContext(FacesRenderingContext.java:66)
      at oracle.adfinternal.view.faces.uinode.FacesRenderingContext.getRenderingContext(FacesRenderingContext.java:52)
      at oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.getRenderingContext(UINodeRenderer.java:79)
      at oracle.adfinternal.view.faces.renderkit.htmlBasic.UINodeRenderer.encodeBegin(UINodeRenderer.java:38)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
      at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
      at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._invokeDoFilter(AdfFacesFilterImpl.java:367)
      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl._doFilterImpl(AdfFacesFilterImpl.java:336)
      at oracle.adfinternal.view.faces.webapp.AdfFacesFilterImpl.doFilter(AdfFacesFilterImpl.java:196)
      at oracle.adf.view.faces.webapp.AdfFacesFilter.doFilter(AdfFacesFilter.java:87)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:307)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:687)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:469)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:403)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      at org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:699)
      at org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:670)
      at org.apache.jsp.index_jsp._jspService(index_jsp.java:58)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:44)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:150)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:595)


      Searched on the net and the ADF site and tried revising the web.xml and faces-config.xml files to get both the components working but the page which only has the RichFaces components fails per above.

      Has anyone used the two component types together in the same application?
      Also need to use SEAM components in the application.

      Thanks;
      Paul

        • 1. Re: Using RichFaces and Oracle ADF
          Mike K Newbie

          Hi Paul,

          i have richfaces and trinidad (oracle adf) working with facelets..etc.
          (no seam yet...)

          my faces-config.xml does have something like:

          <!-- Use the Trinidad RenderKit -->
           <default-render-kit-id>
           org.apache.myfaces.trinidad.core
           </default-render-kit-id>
          


          and my web.xml has:
          <!-- Trinidad has its own ViewHandler, which is a "decorating"
           view handler - for example, it needs to wrap methods like renderView()
           to perform some extra pre- and post-handling. Facelets, on the other
           hand, is more of a true ViewHandler - it actually implements
           renderView() (yeah, it decorates too, but forget about that
           for a second). As a result, the world is a better place if
           the Trinidad ViewHandler runs around the Facelets ViewHandler.
           But since Facelets is registered in WEB-INF/faces-config.xml,
           and Trinidad's is registered from META-INF/faces-config.xml in its
           JAR, exactly the opposite happens as per the JSF spec.
          
           Hence, the following config parameter, which Trinidad
           exposes to allow pushing a ViewHandler inside
           of ours. FWIW, you retain the entire delegation stack -
           just flipped around a bit - so that Facelets still decorates
           the standard ViewHandler, and therefore you've still got
           JSP support.
           -->
           <context-param>
           <param-name>
           org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER
           </param-name>
           <param-value>com.sun.facelets.FaceletViewHandler</param-value>
           </context-param>
          


          ohh and I needed the a4j-trinidad.jar (from richfaces-extension svn)
          http://anonsvn.jboss.org/repos/richfaces/trunk/extensions/trinidad/

          Good luck ;)

          CU Mike