You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jesse Alexander (KBSA 21)" <al...@credit-suisse.com> on 2005/05/26 10:58:44 UTC
RE: [jira] Commented: (MYFACES-133) Configured but inexistent Ren
derer is not reported
Yep... used the FacesConsole and added "Error" to the wrong field... changing the type
instead of the class...
Adding "Error" to the class-name, therefor rendering it uninstantiable... I now get:
---------------------------------------------------------
26.05.2005 10:54:29 org.apache.myfaces.util.ClassUtils simpleClassForName
SCHWERWIEGEND: Class ch.ajsw.faces.renderer.MyHelpRendererError not found
java.lang.ClassNotFoundException: ch.ajsw.faces.renderer.MyHelpRendererError
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.apache.myfaces.util.ClassUtils.classForName(ClassUtils.java:175)
at org.apache.myfaces.util.ClassUtils.simpleClassForName(ClassUtils.java:194)
at org.apache.myfaces.util.ClassUtils.newInstance(ClassUtils.java:278)
at org.apache.myfaces.config.FacesConfigurator.configureRenderKits(FacesConfigurator.java:644)
at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:216)
at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:105)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:88)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
--- snipped parts of stacktrace
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Caused by: java.lang.ClassNotFoundException: ch.ajsw.faces.renderer.MyHelpRendererError
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at org.apache.myfaces.util.ClassUtils.classForName(ClassUtils.java:175)
at org.apache.myfaces.util.ClassUtils.simpleClassForName(ClassUtils.java:194)
... 49 more
26.05.2005 10:54:29 org.apache.myfaces.webapp.StartupServletContextListener initFaces
INFO: ServletContext 'C:\DATA\eclipse\jsf-comp\MyHelp\webcontent\' initialized.
/---------------------------------------------------------
And on top seems to appear the desired message. I cannot remember to have seen these
log-entries when I entered the Jira-report... So, to me, this seems a POSITIVE change
in 1.0.9
And therefor closing the bug-report seems appropriate.
regards
Alexander
-----Original Message-----
From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
Sent: Thursday, May 26, 2005 10:50 AM
To: MyFaces Development
Subject: Re: [jira] Commented: (MYFACES-133) Configured but inexistent Ren derer is not reported
But this is something different what you are doing - you are having a
component which has a renderer-type set, and an appropriate renderer
for this component can not be found.
The bug was about changing a renderer-class to an uninstantiable class.
regards,
Martin
On 5/26/05, Jesse Alexander (KBSA 21) <al...@credit-suisse.com> wrote:
> I tried it with 1.0.9 and got this in the TC-log:
> -----------------------------------------------------
> 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> StandardContext[/MyHelp]No Renderer found for component form1:_id4 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> StandardContext[/MyHelp]No Renderer found for component form1:_id4 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> StandardContext[/MyHelp]No Renderer found for component form1:_id4 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> StandardContext[/MyHelp]No Renderer found for component form1:_id4 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> StandardContext[/MyHelp]No Renderer found for component form1:_id7 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> StandardContext[/MyHelp]No Renderer found for component form1:_id7 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> StandardContext[/MyHelp]No Renderer found for component form1:_id7 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> StandardContext[/MyHelp]No Renderer found for component form1:_id7 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> /-----------------------------------------------------
> Looking at the code-snippet below, I would expect another message ...
>
> regards
> Alexander
>
> -----Original Message-----
> From: Martin Marinschek (JIRA) [mailto:myfaces-dev@incubator.apache.org]
> Sent: Thursday, May 26, 2005 8:52 AM
> To: dev@myfaces.apache.org
> Subject: [jira] Commented: (MYFACES-133) Configured but inexistent Renderer is not reported
>
> [ http://issues.apache.org/jira/browse/MYFACES-133?page=comments#action_66332 ]
>
> Martin Marinschek commented on MYFACES-133:
> -------------------------------------------
>
>
> This is the corresponding source-code:
>
> javax.faces.render.Renderer renderer = null;
> try {
> renderer = (javax.faces.render.Renderer) ClassUtils.newInstance(element.getRendererClass());
> } catch(FacesException e) {
> // ignore the failure so that the render kit is configured
> log.error("failed to configure class " + element.getRendererClass(), e);
> continue;
> }
>
> I would suppose that the logging should be exactly what you refer to, I don't know why this would still not be logged?
>
> regards,
>
> Martin
>
> > Configured but inexistent Renderer is not reported
> > --------------------------------------------------
> >
> > Key: MYFACES-133
> > URL: http://issues.apache.org/jira/browse/MYFACES-133
> > Project: MyFaces
> > Type: Bug
> > Versions: 1.0.8 beta
> > Environment: Tomcat 5.0.28
> > Reporter: Alexander Jesse
> > Priority: Minor
> > Attachments: MinimalMyFaces.zip, MinimalRI.zip, TomcatConfig_Log.zip
> >
> > A configured but inexistent renderer is not reported and the myfaces-application starts using the supplied standard renderer. The SUN-RI reports a "java.lang.ClassNotFoundException: com.jsf.components.renderer.NotExistingRenderer" which helps to pinpoint the configuration error.
> > For production this can be a desired behaviour but presents some danger at the same time. Not having the information at hand I wondered why my renderer would not decorate the input-field as planned. When I tried the same renderer in the RI the error (wrong classname) was found in 30 seconds.
> > The error is easy to reproduce:
> > Take an existing JSF-application and add a phantom renderer to the faces-config.xml. Then start the web-container.
> > (sample config-entry:
> > <render-kit>
> > <renderer>
> > <component-family>javax.faces.Input</component-family>
> > <renderer-type>javax.faces.Text</renderer-type>
> > <renderer-class>com.jsf.components.renderer.NotExistingRenderer</renderer-class>
> > </renderer>
> > </render-kit>
> > )
>
> --
> 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
>
Re: [jira] Commented: (MYFACES-133) Configured but inexistent Ren derer is not reported
Posted by Martin Marinschek <ma...@gmail.com>.
Very well!
regards,
Martin
On 5/26/05, Jesse Alexander (KBSA 21) <al...@credit-suisse.com> wrote:
> Yep... used the FacesConsole and added "Error" to the wrong field... changing the type
> instead of the class...
>
> Adding "Error" to the class-name, therefor rendering it uninstantiable... I now get:
> ---------------------------------------------------------
> 26.05.2005 10:54:29 org.apache.myfaces.util.ClassUtils simpleClassForName
> SCHWERWIEGEND: Class ch.ajsw.faces.renderer.MyHelpRendererError not found
> java.lang.ClassNotFoundException: ch.ajsw.faces.renderer.MyHelpRendererError
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:219)
> at org.apache.myfaces.util.ClassUtils.classForName(ClassUtils.java:175)
> at org.apache.myfaces.util.ClassUtils.simpleClassForName(ClassUtils.java:194)
> at org.apache.myfaces.util.ClassUtils.newInstance(ClassUtils.java:278)
> at org.apache.myfaces.config.FacesConfigurator.configureRenderKits(FacesConfigurator.java:644)
> at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:216)
> at org.apache.myfaces.webapp.StartupServletContextListener.initFaces(StartupServletContextListener.java:105)
> at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:88)
> at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
>
> --- snipped parts of stacktrace
>
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
> Caused by: java.lang.ClassNotFoundException: ch.ajsw.faces.renderer.MyHelpRendererError
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:219)
> at org.apache.myfaces.util.ClassUtils.classForName(ClassUtils.java:175)
> at org.apache.myfaces.util.ClassUtils.simpleClassForName(ClassUtils.java:194)
> ... 49 more
> 26.05.2005 10:54:29 org.apache.myfaces.webapp.StartupServletContextListener initFaces
> INFO: ServletContext 'C:\DATA\eclipse\jsf-comp\MyHelp\webcontent\' initialized.
> /---------------------------------------------------------
>
> And on top seems to appear the desired message. I cannot remember to have seen these
> log-entries when I entered the Jira-report... So, to me, this seems a POSITIVE change
> in 1.0.9
>
> And therefor closing the bug-report seems appropriate.
>
> regards
> Alexander
>
> -----Original Message-----
> From: Martin Marinschek [mailto:martin.marinschek@gmail.com]
> Sent: Thursday, May 26, 2005 10:50 AM
> To: MyFaces Development
> Subject: Re: [jira] Commented: (MYFACES-133) Configured but inexistent Ren derer is not reported
>
> But this is something different what you are doing - you are having a
> component which has a renderer-type set, and an appropriate renderer
> for this component can not be found.
>
> The bug was about changing a renderer-class to an uninstantiable class.
>
> regards,
>
> Martin
>
> On 5/26/05, Jesse Alexander (KBSA 21) <al...@credit-suisse.com> wrote:
> > I tried it with 1.0.9 and got this in the TC-log:
> > -----------------------------------------------------
> > 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> > WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> > 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> > WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> > StandardContext[/MyHelp]No Renderer found for component form1:_id4 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> > StandardContext[/MyHelp]No Renderer found for component form1:_id4 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> > 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> > WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> > StandardContext[/MyHelp]No Renderer found for component form1:_id4 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> > 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> > WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> > StandardContext[/MyHelp]No Renderer found for component form1:_id4 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> > 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> > WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> > 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> > WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> > StandardContext[/MyHelp]No Renderer found for component form1:_id7 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> > StandardContext[/MyHelp]No Renderer found for component form1:_id7 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> > 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> > WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> > StandardContext[/MyHelp]No Renderer found for component form1:_id7 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> > 26.05.2005 09:58:59 org.apache.myfaces.renderkit.html.HtmlRenderKitImpl getRenderer
> > WARNUNG: Unsupported component-family/renderer-type: ch.ajsw/ch.ajsw.renderer.MyHelpRenderer
> > StandardContext[/MyHelp]No Renderer found for component form1:_id7 (component-family=ch.ajsw, renderer-type=ch.ajsw.renderer.MyHelpRenderer)
> > /-----------------------------------------------------
> > Looking at the code-snippet below, I would expect another message ...
> >
> > regards
> > Alexander
> >
> > -----Original Message-----
> > From: Martin Marinschek (JIRA) [mailto:myfaces-dev@incubator.apache.org]
> > Sent: Thursday, May 26, 2005 8:52 AM
> > To: dev@myfaces.apache.org
> > Subject: [jira] Commented: (MYFACES-133) Configured but inexistent Renderer is not reported
> >
> > [ http://issues.apache.org/jira/browse/MYFACES-133?page=comments#action_66332 ]
> >
> > Martin Marinschek commented on MYFACES-133:
> > -------------------------------------------
> >
> >
> > This is the corresponding source-code:
> >
> > javax.faces.render.Renderer renderer = null;
> > try {
> > renderer = (javax.faces.render.Renderer) ClassUtils.newInstance(element.getRendererClass());
> > } catch(FacesException e) {
> > // ignore the failure so that the render kit is configured
> > log.error("failed to configure class " + element.getRendererClass(), e);
> > continue;
> > }
> >
> > I would suppose that the logging should be exactly what you refer to, I don't know why this would still not be logged?
> >
> > regards,
> >
> > Martin
> >
> > > Configured but inexistent Renderer is not reported
> > > --------------------------------------------------
> > >
> > > Key: MYFACES-133
> > > URL: http://issues.apache.org/jira/browse/MYFACES-133
> > > Project: MyFaces
> > > Type: Bug
> > > Versions: 1.0.8 beta
> > > Environment: Tomcat 5.0.28
> > > Reporter: Alexander Jesse
> > > Priority: Minor
> > > Attachments: MinimalMyFaces.zip, MinimalRI.zip, TomcatConfig_Log.zip
> > >
> > > A configured but inexistent renderer is not reported and the myfaces-application starts using the supplied standard renderer. The SUN-RI reports a "java.lang.ClassNotFoundException: com.jsf.components.renderer.NotExistingRenderer" which helps to pinpoint the configuration error.
> > > For production this can be a desired behaviour but presents some danger at the same time. Not having the information at hand I wondered why my renderer would not decorate the input-field as planned. When I tried the same renderer in the RI the error (wrong classname) was found in 30 seconds.
> > > The error is easy to reproduce:
> > > Take an existing JSF-application and add a phantom renderer to the faces-config.xml. Then start the web-container.
> > > (sample config-entry:
> > > <render-kit>
> > > <renderer>
> > > <component-family>javax.faces.Input</component-family>
> > > <renderer-type>javax.faces.Text</renderer-type>
> > > <renderer-class>com.jsf.components.renderer.NotExistingRenderer</renderer-class>
> > > </renderer>
> > > </render-kit>
> > > )
> >
> > --
> > 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
> >
>