[ http://issues.apache.org/jira/browse/MYFACES-210?page=comments#action_12330026 ]
Walter Snel commented on MYFACES-210: ------------------------------------- Unfortunately the issue is still there. Without special initialisation code in my ApplicationFacade the myfaces system throws the following exception: 18:40:05,515 ERROR ApplicationImpl:555 - Could not instantiate converter class javax.faces.convert.IntegerConverter java.lang.NullPointerException at org.apache.myfaces.application.ApplicationImpl.internalCreateConverter(ApplicationImpl.java:534) at org.apache.myfaces.application.ApplicationImpl.createConverter(ApplicationImpl.java:494) at com.tmns.music.MusicApplicationFacade.createConverter(MusicApplicationFacade.java:144) at org.apache.myfaces.renderkit.RendererUtils.getStringValue(RendererUtils.java:308) at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:93) at org.apache.myfaces.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:81) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:341) at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:494) at org.apache.myfaces.renderkit.RendererUtils.renderChildren(RendererUtils.java:471) at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:492) at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.renderColumnBody(HtmlTableRendererBase.java:205) at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:160) at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:329) at org.apache.myfaces.renderkit.RendererUtils.renderChild(RendererUtils.java:488) at org.apache.myfaces.renderkit.html.HtmlGridRenderer.renderChildren(HtmlGridRenderer.java:253) at org.apache.myfaces.renderkit.html.HtmlGridRenderer.encodeEnd(HtmlGridRenderer.java:131) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:341) at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:386) at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:290) at org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:98) at org.apache.jsp.composites.basicTest_jsp._jspx_meth_h_panelGrid_0(basicTest_jsp.java:221) at org.apache.jsp.composites.basicTest_jsp._jspx_meth_h_form_0(basicTest_jsp.java:135) at org.apache.jsp.composites.basicTest_jsp._jspService(basicTest_jsp.java:89) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704) at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:590) at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510) at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:966) at org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:581) at org.apache.struts.taglib.tiles.InsertTag.doInclude(InsertTag.java:705) at org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:816) at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:469) at org.apache.jsp.template.template_jsp._jspx_meth_tiles_insert_2(template_jsp.java:257) at org.apache.jsp.template.template_jsp._jspx_meth_f_subview_2(template_jsp.java:235) at org.apache.jsp.template.template_jsp._jspx_meth_f_view_0(template_jsp.java:120) at org.apache.jsp.template.template_jsp._jspService(template_jsp.java:70) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:704) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:474) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:409) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:312) at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:405) at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.dispatch(JspTilesViewHandlerImpl.java:220) at org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:206) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:534) My facade looks like: public class MusicApplicationFacade extends ApplicationImpl { protected Application impl; public MusicApplicationFacade(Application _impl) { impl = _impl; } public ActionListener getActionListener() { return impl.getActionListener(); } public void setActionListener(ActionListener arg0) { impl.setActionListener(arg0); } . . . and then: // Special for myFaces. public void addConverterConfiguration( String converterClassName, org.apache.myfaces.config.impl.digester.elements.Converter configuration) { if (impl instanceof ApplicationImpl) ((ApplicationImpl)impl).addConverterConfiguration(converterClassName, configuration); } . . . } If I delete the special myfaces code the above exception appears. > Undesired dependency on ApplicationImpl in FacesConfigurator > ------------------------------------------------------------ > > Key: MYFACES-210 > URL: http://issues.apache.org/jira/browse/MYFACES-210 > Project: MyFaces > Type: Bug > Components: Implementation > Versions: 1.0.9m9 > Environment: Custom ApplicationFactory and Application Objects > Reporter: Walter Snel > Assignee: Martin Marinschek > Priority: Minor > Fix For: 1.1.0 > > Manfred's recent additions related to the configurability of Converters > created a dependency on a particular Application implementation in the > FacesConfigurator. > I noticed this because I'm using a custom ApplicationFactory that returns a > custom Facade (with augmentations) to the ApplicationImpl class. > In this case the FacesConfigurator doesn't call the > addConverterConfiguration. This, later on, leads to horrible nullpointer > exceptions when any of standard converters are used. Perhaps we could > consider using relfection instead of the current 'instanceof' mechanism to > find out if the addConverterConfiguration() method is supported ? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira