Uploaded image for project: 'MyFaces Trinidad'
  1. MyFaces Trinidad
  2. TRINIDAD-2008

tr:panelBorderLayout is throwing exception with Mojarra during tag execution

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-alpha-2
    • 2.0.0-beta-1
    • None
    • None
    • Mojarra 2.0.4, WLS

    Description

      To reproduce the issue, try running the following test.xhtml page:

      <f:view xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:tr="http://myfaces.apache.org/trinidad">

      <tr:document>
      <tr:form>
      <tr:panelBorderLayout/>
      </tr:form>
      </tr:document>
      </f:view>

      You will notice java.lang.ExceptionInInitializerError
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelBorderLayoutRenderer.<clinit>(PanelBorderLayoutRenderer.java:1102)

      The root cause is the following exception:

      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:825)
      at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelBorderLayoutRenderer.<clinit>(PanelBorderLayoutRenderer.java:1102)
      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 java.lang.Class.newInstance0(Class.java:355)
      at java.lang.Class.newInstance(Class.java:308)
      at org.apache.myfaces.trinidadinternal.renderkit.ClassRendererInstantiator.instantiate(ClassRendererInstantiator.java:49)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase.findRenderer(RenderKitBase.java:167)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.findRenderer(RenderKitDecorator.java:104)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderKitDecorator.findRenderer(RenderKitDecorator.java:114)
      at org.apache.myfaces.trinidadinternal.renderkit.RenderKitBase.getRenderer(RenderKitBase.java:129)
      at com.sun.faces.application.ApplicationImpl.applyAnnotations(ApplicationImpl.java:1915)
      at com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations(ApplicationImpl.java:1864)
      at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1125)
      at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:513)
      at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:153)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:116)
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:94)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:133)
      at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:180)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:116)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:133)
      at com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:180)
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:116)
      at com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:163)
      at com.sun.faces.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:89)
      at com.sun.faces.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:79)
      at com.sun.faces.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:148)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.buildView(FaceletViewHandlingStrategy.java:740)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:96)

      It appears that LocaleInfoScriptlet.getSupportedLocaleVariant() counts on RenderingContext being present. The issue is that RenderingContext is not available during tag execution when com.sun.faces.application.ApplicationImpl.applyAnnotations() is going after a render.

      Attachments

        1. TRINIDAD-2002.patch
          1 kB
          Max Starets

        Issue Links

          Activity

            People

              mstarets Max Starets
              mstarets Max Starets
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: