Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8270866

NPE in DocTreePath.getTreePath()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: tools
    • Environment:
    • Subcomponent:
    • Introduced In Build:
      b24
    • Introduced In Version:
      17
    • Resolved In Build:
      b33
    • CPU:
      x86_64
    • OS:
      generic
    • Verification:
      Verified

      Backports

        Description

        I'm getting an error when running the javadoc tool since recently on JDK 17

        [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.2.0:javadoc (default-cli) on project jooq-codegen: An error has occurred in Javadoc report generation:
        [ERROR] Exit code: 1 - Building index for all the packages and classes...
        [ERROR] Standard Doclet version 17-ea+26-2439
        [ERROR] Building tree for all the packages and classes...
        [ERROR] Generating C:\Users\lukas\jOOQ\jdk-bugs\jOOQ\jOOQ-codegen\target\site\apidocs\org\jooq\codegen\AbstractGeneratorStrategy.html...
        [ERROR] Generating C:\Users\lukas\jOOQ\jdk-bugs\jOOQ\jOOQ-codegen\target\site\apidocs\org\jooq\codegen\DefaultGenerator.html...
        [ERROR] error: An internal exception has occurred.
        [ERROR] (java.lang.NullPointerException: Cannot invoke "com.sun.source.util.DocTreePath.getTreePath()" because "path" is null)
        [ERROR] Please file a bug against the javadoc tool via the Java bug reporting page
        [ERROR] (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com)
        [ERROR] for duplicates. Include error messages and the following diagnostic in your report. Thank you.
        [ERROR] java.lang.NullPointerException: Cannot invoke "com.sun.source.util.DocTreePath.getTreePath()" because "path" is null
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.JavadocLog.getDiagnosticSource(JavadocLog.java:618)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.JavadocLog.print(JavadocLog.java:245)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.Messages.report(Messages.java:187)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.Messages.warning(Messages.java:133)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.seeTagToContent(HtmlDocletWriter.java:1072)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter$2.visitLink(HtmlDocletWriter.java:1557)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter$2.visitLink(HtmlDocletWriter.java:1419)
        [ERROR] at jdk.compiler/com.sun.tools.javac.tree.DCTree$DCLink.accept(DCTree.java:538)
        [ERROR] at jdk.compiler/com.sun.source.util.SimpleDocTreeVisitor.visit(SimpleDocTreeVisitor.java:79)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.commentTagsToContent(HtmlDocletWriter.java:1641)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.commentTagsToContent(HtmlDocletWriter.java:1362)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.addCommentTags(HtmlDocletWriter.java:1278)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.addCommentTags(HtmlDocletWriter.java:1258)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.addSummaryComment(HtmlDocletWriter.java:1227)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.SubWriterHolderWriter.addIndexComment(SubWriterHolderWriter.java:133)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.SubWriterHolderWriter.addSummaryLinkComment(SubWriterHolderWriter.java:158)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.AbstractMemberWriter.addMemberSummary(AbstractMemberWriter.java:366)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.MemberSummaryBuilder.buildSummary(MemberSummaryBuilder.java:279)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.MemberSummaryBuilder.addSummary(MemberSummaryBuilder.java:446)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.MemberSummaryBuilder.buildMethodsSummary(MemberSummaryBuilder.java:235)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.MemberSummaryBuilder$1.build(MemberSummaryBuilder.java:112)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ClassBuilder.buildMemberSummary(ClassBuilder.java:327)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ClassBuilder.buildClassDoc(ClassBuilder.java:148)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ClassBuilder.build(ClassBuilder.java:113)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:388)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:286)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:199)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:212)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.run(AbstractDoclet.java:115)
        [ERROR] at jdk.javadoc/jdk.javadoc.doclet.StandardDoclet.run(StandardDoclet.java:103)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:556)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:393)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:342)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
        [ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)

        To reproduce, use

        $ git clone https://github.com/jOOQ/jOOQ
        $ cd jOOQ
        $ git checkout 2f242b563cb4996e7088a6e0b513a86210b83898
        $ mvn clean install -pl jooq,jooq-meta,jooq-codegen
        $ mvn javadoc:javadoc -pl jooq-codegen

        If required, I can try to make a smaller reproducer, but it might take some time

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                hannesw Hannes Wallnoefer
                Reporter:
                leder Lukas Eder
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: