Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.3
    • Fix Version/s: 1.4
    • Component/s: Module - Xdoc
    • Labels:
      None

      Description

      If the <dt> tag is missing from a definition list <dl> element, for example as below:

      <?xml version="1.0"?>
      <document url="doxia_test.html">
        <body>
          <section name="Section">
            <subsection name="Subsection">
              <dl>
                 <!-- <dt>dt</dt> -->
                 <dd>dd</dd>
              </dl>
            </subsection>
          </section>
        </body>
      </document>
      

      and the output format is PDF then the plugin crashes with EmptyStackException:

      [INFO] Trace
      java.lang.reflect.UndeclaredThrowableException
              at $Proxy0.body_(Unknown Source)
              at org.apache.maven.doxia.module.xdoc.XdocParser.handleEndTag(XdocParser.java:256)
              at org.apache.maven.doxia.parser.AbstractXmlParser.parseXml(AbstractXmlParser.java:217)
              at org.apache.maven.doxia.parser.AbstractXmlParser.parse(AbstractXmlParser.java:137)
              at org.apache.maven.doxia.parser.XhtmlBaseParser.parse(XhtmlBaseParser.java:90)
              at org.apache.maven.doxia.module.xdoc.XdocParser.parse(XdocParser.java:104)
              at org.apache.maven.doxia.DefaultDoxia.parse(DefaultDoxia.java:63)
              at org.apache.maven.doxia.book.services.renderer.AbstractITextBookRenderer.renderSection(AbstractITextBookRenderer.java:264)
              at org.apache.maven.doxia.book.services.renderer.AbstractITextBookRenderer.renderChapter(AbstractITextBookRenderer.java:219)
              at org.apache.maven.doxia.book.services.renderer.AbstractITextBookRenderer.renderBook(AbstractITextBookRenderer.java:148)
              at org.apache.maven.doxia.book.DefaultBookDoxia.renderBook(DefaultBookDoxia.java:142)
              at org.apache.maven.doxia.plugin.DoxiaRenderBooksMojo.execute(DoxiaRenderBooksMojo.java:265)
              at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
              at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
              at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
              at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
              at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
              at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
              at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
              at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
              at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
      Caused by: java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.apache.maven.doxia.sink.PipelineSink.invoke(PipelineSink.java:76)
              ... 31 more
      Caused by: java.util.EmptyStackException
              at java.util.Stack.peek(Stack.java:85)
              at java.util.Stack.pop(Stack.java:67)
              at org.apache.maven.doxia.module.itext.SinkActionContext.release(SinkActionContext.java:145)
              at org.apache.maven.doxia.module.itext.ITextSink.body_(ITextSink.java:291)
              ... 36 more
      

      This is quite tricky to debug; it would help if the plugin gave some context - or better yet, detected the missing element.

      Note that xdoc output does not crash, nor does it report an error.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        930d 4h 1m 1 Robert Scholte 01/Apr/13 16:53
        Mark Thomas made changes -
        Reporter SebbASF [ sebbasf ] Sebb [ sebb@apache.org ]
        Mark Thomas made changes -
        Workflow jira [ 12957011 ] Default workflow, editable Closed status [ 12994011 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 23:17:25 UTC 2015 [ 1428275845026 ]
        Mark Thomas made changes -
        Workflow jira [ 12719829 ] Default workflow, editable Closed status [ 12748563 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:30:24 UTC 2015 [ 1428226224715 ]
        Robert Scholte made changes -
        Fix Version/s 1.4 [ 18423 ]
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Robert Scholte [ rfscholte ]
        Resolution Fixed [ 1 ]
        Hide
        Robert Scholte added a comment -

        Fixed in r1463310
        I noticed that while parsing the XDoc, the Sink-elements became unbalanced. I've made some adjustments to the XhtmlBaseParser, so other Parsers depending on this class should be fixed as well.

        Show
        Robert Scholte added a comment - Fixed in r1463310 I noticed that while parsing the XDoc, the Sink-elements became unbalanced. I've made some adjustments to the XhtmlBaseParser , so other Parsers depending on this class should be fixed as well.
        Robert Scholte made changes -
        Field Original Value New Value
        Component/s Module - Xdoc [ 12820 ]
        Hide
        Sebb added a comment -

        Hoever, rtf and latex output do crash. Presumably xdoc output does not need to analyse the xml fully.

        Show
        Sebb added a comment - Hoever, rtf and latex output do crash. Presumably xdoc output does not need to analyse the xml fully.
        sebbasf created issue -

          People

          • Assignee:
            Robert Scholte
            Reporter:
            Sebb
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development