Cocoon
  1. Cocoon
  2. COCOON-1492

NPE by adding an extra HTML tag in hello.xml

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.7
    • Fix Version/s: None
    • Component/s: * Cocoon Core
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      I downloaded 2.1.7, built it, and started with the cocoon.sh. Most of the samples seem working just
      fine, and they are very nice.

      However, there is a very simple problem with the Hello World sample. I added an extra html tag, such
      as <b>, in the hello.xml file, then the HTML generation from the XML file started failing and saying
      NullPointerException. It does not happen when generating XHTML or CHTML from the same XML file.

      I could reproduce this on the following platforms:
      HPUX w/ Java 1.3.1.11
      Mac OS X (Panther) w/ Java 1.4.2

      Modified hello.xml:
      <page>
       <title>Hello</title>
       <content>
        <para>This is my <b>first</b> Cocoon page!</para>
       </content>
      </page>


      Stacktrace:
      org.apache.cocoon.ProcessingException: Error executing pipeline.: java.lang.RuntimeException:
      java.lang.NullPointerException
              at
      org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessin
      gPipeline.java:940)
              at
      org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(A
      bstractCachingProcessingPipeline.java:281)
              at
      org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline
      .java:483)
              at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:
      120)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:46)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchN
      ode.java:130)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:
      138)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:234)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:176)
              at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
              at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:46)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchN
      ode.java:130)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:
      138)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:234)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:176)
              at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
              at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:46)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchN
      ode.java:130)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:
      138)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:234)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:176)
              at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
              at org.apache.cocoon.Cocoon.process(Cocoon.java:608)
              at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1123)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
              at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
              at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
              at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
              at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
              at org.mortbay.http.HttpServer.service(HttpServer.java:879)
              at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
              at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
              at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
              at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
              at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
              at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)
      Caused by: java.lang.RuntimeException: java.lang.NullPointerException
              at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3418)
              at
      org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:
      389)
              at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:55)
              at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:560)
              at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
              at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
              at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
              at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown
      Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
              at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
              at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:296)
              at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
              at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:275)
              at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:115)
              at
      org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(A
      bstractCachingProcessingPipeline.java:269)
              ... 47 more
      java.lang.RuntimeException: java.lang.NullPointerException
              at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3418)
              at
      org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:
      389)
              at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:55)
              at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:560)
              at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown Source)
              at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
              at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
              at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
              at org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown
      Source)
              at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
              at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
              at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
              at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:296)
              at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
              at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:275)
              at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:115)
              at
      org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(A
      bstractCachingProcessingPipeline.java:269)
              at
      org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline
      .java:483)
              at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:
      120)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:46)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchN
      ode.java:130)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:
      138)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:234)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:176)
              at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
              at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:46)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchN
      ode.java:130)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:
      138)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:234)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:176)
              at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
              at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:117)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:46)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchN
      ode.java:130)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:
      138)
              at
      org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractPar
      entProcessingNode.java:68)
              at
      org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:92)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:234)
              at
      org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.j
      ava:176)
              at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:243)
              at org.apache.cocoon.Cocoon.process(Cocoon.java:608)
              at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1123)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358)
              at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567)
              at org.mortbay.http.HttpContext.handle(HttpContext.java:1807)
              at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525)
              at org.mortbay.http.HttpContext.handle(HttpContext.java:1757)
              at org.mortbay.http.HttpServer.service(HttpServer.java:879)
              at org.mortbay.http.HttpConnection.service(HttpConnection.java:789)
              at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960)
              at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806)
              at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218)
              at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:300)
              at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:511)

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Sakai, Kazuhiro
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development