Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1651

Null locator in EffectPipe triggers NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.8
    • 2.1.9, 2.2
    • Blocks: Forms
    • None
    • Operating System: Linux
      Platform: PC
    • 37149

    Description

      I am getting an NPE at line 488 in EffectPipe.java which is reliably triggered
      by simply putting an XSLT transform in the template pipeline at any point BEFORE
      the forms template transformer. It didn't show up in the stack trace, but I
      traced it to the call to EffectPipe.beginBuffer() in cases where locator is
      null. For some reason, locator is null in case there is an xsl transform in the
      pipeline right before the forms transformer. I'm including a zip of the
      relevant files to recreate the problem using the stock "registration" sample
      form, as well as a simple patch that works around the NPE. I'm not sure if this
      is the *correct* way to fix this bug, since I don't really understand what it
      means for the locator to be null in this context, but it appears to work fine
      for me. Note that in the included sitemap you just need to comment out the
      <transform src="xsl/identity.xsl"/> and the bug goes away.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tom@slaxicon.org Tom Green
            Votes:
            3 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: