MyFaces Trinidad
  1. MyFaces Trinidad
  2. TRINIDAD-1960

NullPointerException in LocaleInfoScriptlet.getSupportedLocaleVariant

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.2.14-core
    • Fix Version/s: 1.2.15-core , 2.0.0-beta-1
    • Component/s: None
    • Labels:
      None
    • Environment:
      Mac OS X 10.6, Java 6, Glassfish 3.0.2

      Description

      Hi,
      I tried to deploy trinidad in a web app to my Glassfish Server. After reporting and fixing TRINIDAD-1959 I get the following problem:

      Caused by: java.lang.NullPointerException
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.jsLibs.LocaleInfoScriptlet.getSupportedLocaleVariant(LocaleInfoScriptlet.java:171)
      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:73)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.XhtmlUtils.<clinit>(XhtmlUtils.java:598)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelBorderLayoutRenderer.<clinit>(PanelBorderLayoutRenderer.java:1050)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:169)
      at org.apache.myfaces.extensions.validator.generic.renderkit.ExtValGenericRenderKit.intercept(ExtValGenericRenderKit.java:84)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit$$EnhancerByCGLIB$$30834978.addRenderer(<generated>)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase._loadRenderKitMap(RenderKitBase.java:258)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase.<init>(RenderKitBase.java:56)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.<init>(RenderKitDecorator.java:39)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.<init>(CoreRenderKit.java:168)
      at org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit$$EnhancerByCGLIB$$30834978.<init>(<generated>)
      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:513)
      at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:228)
      at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:220)
      at net.sf.cglib.core.ReflectUtils.newInstance(ReflectUtils.java:216)
      at net.sf.cglib.proxy.Enhancer.createUsingReflection(Enhancer.java:640)
      at net.sf.cglib.proxy.Enhancer.firstInstance(Enhancer.java:538)
      at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:225)
      at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
      at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)
      at org.apache.myfaces.extensions.validator.generic.renderkit.ExtValGenericRenderKit.newInstance(ExtValGenericRenderKit.java:62)
      at org.apache.myfaces.extensions.validator.generic.renderkit.GenericRenderKitWrapperFactory.createWrapper(GenericRenderKitWrapperFactory.java:45)
      at org.apache.myfaces.extensions.validator.core.renderkit.DefaultRenderKitWrapperFactory.createWrapper(DefaultRenderKitWrapperFactory.java:54)
      at org.apache.myfaces.extensions.validator.core.renderkit.ExtValRenderKitFactory.getRenderKit(ExtValRenderKitFactory.java:84)
      at org.apache.myfaces.trinidadinternal.renderkit.CoreRenderKitFactory.getRenderKit(CoreRenderKitFactory.java:55)
      at com.sun.faces.config.processor.RenderKitConfigProcessor.process(RenderKitConfigProcessor.java:170)
      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
      at com.sun.faces.config.processor.ManagedBeanConfigProcessor.process(ManagedBeanConfigProcessor.java:270)
      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
      at com.sun.faces.config.processor.ValidatorConfigProcessor.process(ValidatorConfigProcessor.java:120)
      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
      at com.sun.faces.config.processor.ConverterConfigProcessor.process(ConverterConfigProcessor.java:126)
      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
      at com.sun.faces.config.processor.ComponentConfigProcessor.process(ComponentConfigProcessor.java:117)
      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
      at com.sun.faces.config.processor.ApplicationConfigProcessor.process(ApplicationConfigProcessor.java:337)
      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
      at com.sun.faces.config.processor.LifecycleConfigProcessor.process(LifecycleConfigProcessor.java:116)
      at com.sun.faces.config.processor.AbstractConfigProcessor.invokeNext(AbstractConfigProcessor.java:114)
      at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:223)
      at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:335)
      ... 42 more

      I created a patch for http://svn.apache.org/repos/asf/myfaces/trinidad/branches/trinidad-1.2.x/ and will attach it to this ticket.

      /Manuel

        Issue Links

          Activity

          Hide
          Manuel Blechschmidt added a comment -

          Prevents the NullPointereception

          Show
          Manuel Blechschmidt added a comment - Prevents the NullPointereception
          Hide
          Yee-Wah Lee added a comment -
          Show
          Yee-Wah Lee added a comment - Seems similar to the issue discussed here (but it should have been fixed): http://mail-archives.apache.org/mod_mbox/myfaces-users/200807.mbox/%3C71235db40807080221w403a26fajdb9bffe1709beda4@mail.gmail.com%3E
          Hide
          Manuel Blechschmidt added a comment -

          Hi Yee-Wah,
          thanks for your fast response. Actually it seems that it was neither applied in 1.x branch nor on the branch that I am using trinidad-1.2.x.

          See:
          http://svn.apache.org/repos/asf/myfaces/trinidad/branches/trinidad-1.2.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/jsLibs/LocaleInfoScriptlet.java

          and:
          http://svn.apache.org/repos/asf/myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/jsLibs/LocaleInfoScriptlet.java

          Only the trunk got this bug fix. Can this fix also be applied in the two mentioned branches?

          Thanks
          Manuel

          Show
          Manuel Blechschmidt added a comment - Hi Yee-Wah, thanks for your fast response. Actually it seems that it was neither applied in 1.x branch nor on the branch that I am using trinidad-1.2.x. See: http://svn.apache.org/repos/asf/myfaces/trinidad/branches/trinidad-1.2.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/jsLibs/LocaleInfoScriptlet.java and: http://svn.apache.org/repos/asf/myfaces/trinidad/branches/trinidad-1.0.x/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/jsLibs/LocaleInfoScriptlet.java Only the trunk got this bug fix. Can this fix also be applied in the two mentioned branches? Thanks Manuel
          Hide
          Manuel Blechschmidt added a comment -

          This is the same issue.

          Show
          Manuel Blechschmidt added a comment - This is the same issue.
          Hide
          Matthias Weßendorf added a comment -

          was reported as TRINIDAD-2008 as well....

          Show
          Matthias Weßendorf added a comment - was reported as TRINIDAD-2008 as well....
          Hide
          Max Starets added a comment -

          The fix for TRINIDAD-2008 on the trunk would probably work here as well

          Show
          Max Starets added a comment - The fix for TRINIDAD-2008 on the trunk would probably work here as well
          Hide
          Scott O'Bryan added a comment -

          This issue is a duplicate. Marking it as such.

          Show
          Scott O'Bryan added a comment - This issue is a duplicate. Marking it as such.

            People

            • Assignee:
              Unassigned
              Reporter:
              Manuel Blechschmidt
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development