myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Myfaces Wiki] Update of "Common Errors and Solutions" by MartinMarinschek
Date Sat, 22 Apr 2006 23:52:22 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.

The following page has been changed by MartinMarinschek:
http://wiki.apache.org/myfaces/Common_Errors_and_Solutions

The comment on the change is:
included on faq page

------------------------------------------------------------------------------
+ deleted
- '''Issue:'''
- NullPointerException in UIComponentBase when including somebody else's JSF component
  
- {{{
- java.lang.NullPointerException
- 	at javax.faces.component.UICompone<WBR>ntBase.encodeBegin(Unknown Source)
- 	at com.sun.faces.renderkit.html<WBR>_basic.HtmlBasicRenderer<WBR>.encodeRecursive(Unknown
Source)
- 	at com.sun.faces.renderkit.html<WBR>_basic.GroupRenderer.encodeChil<WBR>dren(Unknown
Source)
- 	at javax.faces.component.UICompone<WBR>ntBase.encodeChildren(Unknown Source)
- 	at com.sun.faces.renderkit.html<WBR>_basic.HtmlBasicRenderer<WBR>.encodeRecursive(Unknown
Source)
- 	at com.sun.faces.renderkit.html<WBR>_basic.GridRenderer.encodeChild<WBR>ren(Unknown
Source)
- 	at javax.faces.component.UICompone<WBR>ntBase.encodeChildren(Unknown Source)
- 	at com.sun.faces.renderkit.html<WBR>_basic.HtmlBasicRenderer<WBR>.encodeRecursive(Unknown
Source)
- 	at com.sun.faces.renderkit.html<WBR>_basic.GridRenderer.encodeChild<WBR>ren(Unknown
Source)
- 	at javax.faces.component.UICompone<WBR>ntBase.encodeChildren(Unknown Source)
- 	at javax.faces.component.UICompone<WBR>ntBase.encodeAll(Unknown Source)
- 	at javax.faces.render.Renderer<WBR>.encodeChildren(Unknown Source)
- 	at javax.faces.component.UICompone<WBR>ntBase.encodeChildren(Unknown Source)
- 	at javax.faces.component.UICompone<WBR>ntBase.encodeAll(Unknown Source)
- 	at javax.faces.component.UICompone<WBR>ntBase.encodeAll(Unknown Source)
- 	at javax.faces.component.UICompone<WBR>ntBase.encodeAll(Unknown Source)
- 	at com.sun.facelets.FaceletViewHan<WBR>dler.renderView(FaceletViewHandler.java:455)
- 	at com.sun.faces.lifecycle<WBR>.RenderResponsePhase.execute(Unknown Source)
- 	at com.sun.faces.lifecycle<WBR>.LifecycleImpl.phase(Unknown Source)
- 	at com.sun.faces.lifecycle<WBR>.LifecycleImpl.render(Unknown Source)
- 	at javax.faces.webapp.FacesServlet<WBR>.service(Unknown Source)
- 	at org.apache.catalina.core<WBR>.ApplicationFilterChain<WBR>.internalDoFilter(ApplicationFilterChain.java:252)
- 	at org.apache.catalina.core<WBR>.ApplicationFilterChain<WBR>.doFilter(ApplicationFilterChain.java:173)
- 	at org.apache.myfaces.component<WBR>.html.util.ExtensionsFilter<WBR>.doFilter(ExtensionsFilter.java:122)
- 	at org.apache.catalina.core<WBR>.ApplicationFilterChain<WBR>.internalDoFilter(ApplicationFilterChain.java:202)
- 	at org.apache.catalina.core<WBR>.ApplicationFilterChain<WBR>.doFilter(ApplicationFilterChain.java:173)
- 	at org.apache.catalina.core<WBR>.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
- 	at org.apache.catalina.core<WBR>.StandardContextValve.invoke(StandardContextValve.java:178)
- 	at org.apache.catalina.authenticat<WBR>or.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
- 	at org.apache.catalina.core<WBR>.StandardHostValve.invoke(StandardHostValve.java:126)
- 	at org.apache.catalina.valves<WBR>.ErrorReportValve.invoke(ErrorReportValve.java:105)
- 	at org.apache.catalina.core<WBR>.StandardEngineValve.invoke(StandardEngineValve.java:107)
- 	at org.apache.catalina.connector<WBR>.CoyoteAdapter.service(CoyoteAdapter.java:148)
- 	at org.apache.coyote.http11<WBR>.Http11Processor.process(Http11Processor.java:869)
- 	at org.apache.coyote.http11<WBR>.Http11BaseProtocol$Http11Conne<WBR>ctionHandler.processConnection(Http11BaseProtocol.java:667)
- 	at org.apache.tomcat.util.net<WBR>.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
- 	at org.apache.tomcat.util.net<WBR>.LeaderFollowerWorkerThread<WBR>.runIt(LeaderFollowerWorkerThread.java:80)
- 	at org.apache.tomcat.util.threads<WBR>.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
- 	at java.lang.Thread.run(Thread.java:595)
- }}}
- 
- '''Solution:'''
- The only way UIComponentBase.encodeBegin can throw a NullPointerException in this situation
is if the renderer could not be instantiated. In this case I had an incorrect renderer-type
for the Tomahawk component in {root}\web\WEB-INF\facelet\tomahawk.taglib.xml as below. panelStack
org.apache.myfaces.HtmlPanelStack javax.faces.Panel As it turns out, the HtmlPanelcomponent
has its own default renderer, so you don't need the renderer-type at all: panelStack org.apache.myfaces.HtmlPanelStack
- 
- 
- '''Issue:''' 
- Using the tomahawk :popup tag causes java.lang.NullPointerException in HtmlPopupRenderer.encodeEnd(
- 
- '''Solution:'''
- The facet name needs to be hard coded "popup".
- 
- '''Issue:''' 
- Using the tomahawk HtmlDataScroller (dataScroller) tag causes java.lang.ClassCastException
in com.sun.facelets.tag.jsf.ActionSourceRule$ActionListenerMapper2.applyMetadata(ActionSourceRule.java:98)
- 
- '''Solution:''' Download the latest Tomahawk jar inside tomahawk-1.1.2-SNAPSHOT-bin.zip
from here: http://myfaces.apache.org/download.html
- 
- '''Issue:''' 
- Using the tomahawk you get java.lang.NoClassDefFoundError: org/apache/commons/lang/builder/HashCodeBuilder
- 
- '''Solution:'''
- Download the latest jakarta commons jars (inside myfaces-core-1.1.2-SNAPSHOT-bin.zip) from
here: http://myfaces.apache.org/download.html
- 
- '''Issue:''' 
- WARNING: The AdfFacesFilter has not been installed. ADF Faces requires this filter for proper
execution.
- 
- '''Solution:'''
- use a servlet-name in web.xml: adfFaces Faces Servlet ... where you've assigned "Faces Servlet"
as the name of the FacesServlet as below Faces Servlet javax.faces.webapp.FacesServlet 1
- 
- '''Issue:''' 
- The ADF component doesn't popup anything or submit (no javascript working). Error: submitForm
is not defined
- 
- '''Solution:'''
- You need to define how the ADF resources (such as .js files and images) are provided in
web.xml resources oracle.adf.view.faces.webapp.ResourceServlet resources /adf/*
- 
- '''Issue:''' 
- The MyFaces component doesn't popup anything or submit (no javascript working).
- 
- '''Solution:'''
- You need to define how the MyFaces resources (such as .js files and images) are provided
in web.xml with a MyFacesExtensionsFilter entry.
- 
- 
- '''Issue:''' 
- NullPointerException in adf faces at the start of the render phase OR rendering warnings
- {{{
- Mar 21, 2006 12:10:15 AM org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
WARNING: Unsupported component-family/renderer-type: oracle.adf.Panel/oracle.adf.Group
- Mar 21, 2006 12:10:15 AM oracle.adf.view.faces.component.UIXComponentBase _getRendererImpl
WARNING: Could not find renderer for CorePanelGroup[UIXFacesBeanImpl, id=_id38], rendererType
= oracle.adf.Group
- Mar 21, 2006 12:10:15 AM org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
WARNING: Unsupported component-family/renderer-type: oracle.adf.Command/oracle.adf.Link
- Mar 21, 2006 12:10:15 AM oracle.adf.view.faces.component.UIXComponentBase _getRendererImpl
WARNING: Could not find renderer for CoreCommandLink[CommandLinkFacesBean, id=_id41], rendererType
= oracle.adf.Link
- Mar 21, 2006 12:10:15 AM org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
WARNING: Unsupported component-family/renderer-type: oracle.adf.Output/oracle.adf.Formatted
- }}}
- {{{
- SEVERE: Error Rendering View[/main.xhtml] java.lang.NullPointerException at oracle.adfinternal.view.faces<WBR>.uinode.FacesRenderingContext<WBR>.setRenderingProperty(FacesRenderingContext.java:157)
at oracle.adfinternal.view.faces<WBR>.ui.RenderedNodeRenderingContex<WBR>t.setProperty(RenderedNodeRenderingContext<WBR>.java:162)
at oracle.adfinternal.view.faces<WBR>.ui.RootRenderingContext.init(RootRenderingContext.java:81)
at oracle.adfinternal.view.faces<WBR>.uinode.FacesRenderingContext.(FacesRenderingContext.java:106)
at oracle.adfinternal.view.faces<WBR>.uinode.FacesRenderingContext<WBR>.createRenderingContext(FacesRenderingContext.java:79)
at oracle.adfinternal.view.faces<WBR>.uinode.UINodeRendererBase<WBR>.getRenderingContext(UINodeRendererBase.java:89)
at oracle.adfinternal.view.faces<WBR>.uinode.FacesRenderingContext<WBR>.getRenderingContext(FacesRenderingContext.java:66)
at oracle.adfinternal.view.faces<WBR>.uinode.FacesRenderingContext<WBR>.getRenderingContext(Face
 sRenderingContext.java:52) at oracle.adfinternal.view.faces<WBR>.renderkit.htmlBasic.UINodeRend<WBR>erer.getRenderingContext(UINodeRenderer.java:79)
at oracle.adfinternal.view.faces<WBR>.renderkit.htmlBasic.UINodeRend<WBR>erer.encodeBegin(UINodeRenderer.java:38)
at javax.faces.component.UICompone<WBR>ntBase.encodeBegin(UIComponentBase.java:512)
at com.sun.facelets.FaceletViewHan<WBR>dler.encodeRecursive(FaceletViewHandler.java:555)
at com.sun.facelets.FaceletViewHan<WBR>dler.encodeRecursive(FaceletViewHandler.java:562)
at com.sun.facelets.FaceletViewHan<WBR>dler.encodeRecursive(FaceletViewHandler.java:562)
at com.sun.facelets.FaceletViewHan<WBR>dler.renderView(FaceletViewHandler.java:457)
at org.apache.myfaces.lifecycle<WBR>.LifecycleImpl.render(LifecycleImpl.java:367) at
javax.faces.webapp.FacesServlet<WBR>.service(FacesServlet.java:138) at org.apache.catalina.core<WBR>.ApplicationFilterChain<WBR>.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core
 <WBR>.ApplicationFilterChain<WBR>.doFilter(ApplicationFilterChain.java:173) at
org.apache.myfaces.webapp<WBR>.filter.ExtensionsFilter<WBR>.doFilter(ExtensionsFilter.java:130)
at org.apache.catalina.core<WBR>.ApplicationFilterChain<WBR>.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core<WBR>.ApplicationFilterChain<WBR>.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core<WBR>.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core<WBR>.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.authenticat<WBR>or.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
at org.apache.catalina.core<WBR>.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves<WBR>.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core<WBR>.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector<WBR>.CoyoteAdapter.service
 (CoyoteAdapter.java:148) at org.apache.coyote.http11<WBR>.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11<WBR>.Http11BaseProtocol$Http11Conne<WBR>ctionHandler.processConnection(Http11BaseProtocol.java:667)
at org.apache.tomcat.util.net<WBR>.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net<WBR>.LeaderFollowerWorkerThread<WBR>.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads<WBR>.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
- }}}
- 
- '''Solution:'''
- Make sure your FaceletViewHandler is commented out and the default render kit of ADF faces
defined in faces-config.xml oracle.adf.core (Note that the ADF faces implementation ensures
non-ADF components still get rendered in the normal way so it can safely co-exist with other
JSF components) ..and your web.xml contains these lines for ADF faces oracle.adf.view.faces.ALTERNATE_VIEW_HANDLER
com.sun.facelets.FaceletViewHandler AdfFacesFilter oracle.adf.view.faces.webapp.AdfFacesFilter
AdfFacesFilter FacesServlet
- 
- 
- Thanks to Murray Brandon for the initial contribution.
- 

Mime
View raw message