After some testing, the problem was due to the RenderingContext being
null. Scriptlet initialization was happening during a static block of
the SimpleInputColorRenderer, not during the render phase, which
explains why the RenderingContext is null.
This doesn't appear to be a problem for Trinidad because the Trinidad
renderkit implements deferred loading of renderers. In Ian's case, he is
extending a renderer and adding it to the Faces renderkit.
I will submit an addition to the patch to allow for extended renderers
not being in the Trinidad renderkit.
Thanks,
Yee-Wah
Yee-wah Lee wrote:
I'll take a look at this. The line at which the code is failing
indicates the LocaleContext is null, or the FormattingLocale is null.
Not sure which is the problem here.
If anyone else has seen this problem, please reply with details on
your environment.
Thanks,
Yee-Wah
Matthias Wessendorf wrote:
that file "NamedLocaleInfoScriptlet" was add when fixing 797.
stay tuned.
-M
On Jan 18, 2008 4:37 AM, Ian Carr <[EMAIL PROTECTED]>
wrote:
I have tried to upgrade two applications to the Trinidad 1.0.5
release from 1.0.4. One worked fine the second results in an
exception during application startup. Both applications start fine
with 1.0.4.
I have checked the configurations and can't see anything obviously
in error. Does anybody have an idea of what I need to do?
I have looked at the release notes (which still say they are for
1.0.3) and didn't see anything there.
Both applications are using the sun reference implementation of JSF
(1.1_02) and the runtime environment is Tomcat 5.5.
Exception trace below:
===========================
SEVERE: Exception sending context initialized event to listener
instance of class com.sun.faces.config.ConfigureListener
java.lang.ExceptionInInitializerError
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.Scriptlet.registerSelfWithKey(Scriptlet.java:163)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.Scriptlet.registerSelf(Scriptlet.java:92)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.SimpleInputColorRenderer.<clinit>(SimpleInputColorRenderer.java:622)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputColorRenderer.findTypeConstants(InputColorRenderer.java:45)
at
fsl.trinidad.extensions.kit.FSLInputColorRenderer.findTypeConstants(FSLInputColorRenderer.java:18)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlRenderer.<init>(XhtmlRenderer.java:53)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.<init>(LabelAndMessageRenderer.java:49)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.<init>(InputLabelAndMessageRenderer.java:41)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputColorRenderer.<init>(InputColorRenderer.java:33)
at
fsl.trinidad.extensions.kit.FSLInputColorRenderer.<init>(FSLInputColorRenderer.java:9)
at
fsl.trinidad.extensions.kit.FSLRenderKit.<init>(FSLRenderKit.java:17)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:935)
at
com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:426)
at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:348)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at
org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at
org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
at
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
Caused by: java.lang.NullPointerException
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.LocaleInfoScriptlet.getSupportedLocaleVariant(LocaleInfoScriptlet.java:168)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.NamedLocaleInfoScriptlet.<init>(NamedLocaleInfoScriptlet.java:62)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.NamedLocaleInfoScriptlet.registerNamedLocales(NamedLocaleInfoScriptlet.java:47)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.XhtmlScriptletFactory.registerAllScriptlets(XhtmlScriptletFactory.java:75)
at
org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlUtils.<clinit>(XhtmlUtils.java:531)
... 35 more
Thanks in advance
Ian