ICEfaces
  1. ICEfaces
  2. ICE-7483

NPE in InputRichTextResourceHandler

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1-Beta2
    • Fix Version/s: 3.0.RC1, 3.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      -
    • Assignee Priority:
      P1

      Description

      A user has reported the following issue when a composite component is placed on their page:

      java.lang.NullPointerException
      at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler$ResourceEntry.access$500(InputRichTextResourceHandler.java:213)
      at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.createResource(InputRichTextResourceHandler.java:174)
      at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.createResource(InputRichTextResourceHandler.java:170)
      at com.sun.faces.facelets.tag.jsf.CompositeComponentTagLibrary.getCompositeComponentResource(CompositeComponentTagLibrary.java:145)
      at com.sun.faces.facelets.tag.jsf.CompositeComponentTagLibrary.containsTagHandler(CompositeComponentTagLibrary.java:121)
      at com.sun.faces.facelets.tag.CompositeTagLibrary.containsTagHandler(CompositeTagLibrary.java:167)
      at com.sun.faces.facelets.compiler.CompilationManager.pushTag(CompilationManager.java:295)
      at com.sun.faces.facelets.compiler.SAXCompiler$CompilationHandler.startElement(SAXCompiler.java:255)
      at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
      at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)

      The issue can be reproduced by adding a basic composite component to our component showcase like so:

      1. Composite component source - /resources/test/mycc.xhtml
      2. Component used in main-template.xhtml, I added my composite component.

      The exception will be thrown as soon as you hit comp-suite/showcase.jsf URI. The user has also observed the following:

      Further debugging seems to indicate that this occurs when a composite component is present on the page (which is the case in all our pages). CompositeComponentTagLibrary.getCompositeComponentResource is invoked before the PreRenderViewEvent system event gets fired. The problem does not occur if the page does not include a composite component. So to reproduce, the first page you try to access after the application is started needs to have a composite component or else the event will be fired and the problem will not occur anymore because the InputRichTextResourceHandler.codeResource will have been filled properly.

        Activity

        There are no subversion log entries for this issue yet.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Tyler Johnson
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: