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

field visiblePackages is null for the unnamed module producing NPE when accessed

XMLWordPrintable

    • b154
    • x86_64
    • windows_7
    • Verified

        FULL PRODUCT VERSION :
        java version "9-ea"
        Java(TM) SE Runtime Environment (build 9-ea+119)
        Java HotSpot(TM) 64-Bit Server VM (build 9-ea+119, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.1.7601]

        A DESCRIPTION OF THE PROBLEM :
        When trying to run the Javadocs task of Apache Lucene's Ant-based build system, the Javadoc tool produces "javadoc: error - an unknown error has occurred" without any further information. Removing additional command line arguments did not help to find the source of problem.

        The problem seems to happen with Apache Lucene's Core module, I was able to generate Javadocs of other source code projects without this error.

        Corresponding Lucene bug report: https://issues.apache.org/jira/browse/LUCENE-7294

        I also tried to add "-html4" or "-html5", but this made no difference.

        REGRESSION. Last worked in version 9

        ADDITIONAL REGRESSION INFORMATION:
        java version "9-ea"
        Java(TM) SE Runtime Environment (build 9-ea+119)
        Java HotSpot(TM) 64-Bit Server VM (build 9-ea+119, mixed mode)

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        Checkout Apache Lucene from Github and change to Lucene subdirectory
        $ git clone https://github.com/apache/lucene-solr.git
        $ cd lucene-solr
        (you are now in root folder of checkout)
        $ cd lucene/core
        (you are now in Lucene's core module

        Run Ant task to produce Javadocs:
        $ ant javadocs
        (alternatively add -verbose):
        $ ant -verbose javadocs

        This should produce Javadocs. It starts to collect all classes and source files, it also copied doc-files, but shortly when building index files is produces the above message.

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        The Javadocs task should run without a cryptic error message. At least it should tell user what's wrong.
        ACTUAL -
        The Javadoc tool exists with exit code 1 and produces incomplete Javadocs. E.g., the stylesheet file is missing, so it cannot be displayed at all, you only see 3 small boxes with Javadocs.

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        This is the output with -verbose:

        [javadoc] Generating Javadoc
        [javadoc] No href was given for the link - skipping
        [javadoc] No href was given for the link - skipping
        [javadoc] Executing 'C:\Program Files\Java\jdk-9\bin\javadoc.exe' with arguments:
        [javadoc] '-locale'
        [javadoc] 'en_US'
        [javadoc] '-charset'
        [javadoc] 'utf-8'
        [javadoc] '-d'
        [javadoc] 'C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core'
        [javadoc] '-noindex'
        [javadoc] '-protected'
        [javadoc] '-J-Xmx512m'
        [javadoc] '-overview'
        [javadoc] 'C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\core\src\java\overview.html'
        [javadoc] '-windowtitle'
        [javadoc] 'Lucene 7.0.0-SNAPSHOT API'
        [javadoc] '-encoding'
        [javadoc] 'utf-8'
        [javadoc] '-use'
        [javadoc] '-docencoding'
        [javadoc] 'utf-8'
        [javadoc] '-release'
        [javadoc] '8'
        [javadoc] '-Xdoclint:all'
        [javadoc] '-Xdoclint:-missing'
        [javadoc] '-doctitle'
        [javadoc] 'Lucene 7.0.0-SNAPSHOT core API'
        [javadoc] '-bottom'
        [javadoc] '
        [javadoc] <i>Copyright &copy; 2000-2016 Apache Software Foundation. All Rights Reserved.</i>
        [javadoc] <script src='{@docRoot}/prettify.js' type='text/javascript'></script>
        [javadoc] <script type='text/javascript'>
        [javadoc] (function(){
        [javadoc] var oldonload = window.onload;
        [javadoc] if (typeof oldonload != 'function') {
        [javadoc] window.onload = prettyPrint;
        [javadoc] } else {
        [javadoc] window.onload = function() {
        [javadoc] oldonload();
        [javadoc] prettyPrint();
        [javadoc] }
        [javadoc] }
        [javadoc] })();
        [javadoc] </script>
        [javadoc] '
        [javadoc] '-classpath'
        [javadoc] 'C:\Program Files\Java\apache-ant-1.8.3\lib\ant.jar'
        [javadoc] '-version'
        [javadoc] '-author'
        [javadoc] '-sourcepath'
        [javadoc] 'C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\core\src\java'
        [javadoc] '-linkoffline'
        [javadoc] 'https://docs.oracle.com/javase/8/docs/api/&#39;
        [javadoc] 'file:/C:/Users/Uwe%20Schindler/Projects/lucene/trunk-lusolr1/lucene/tools/javadoc/java8/'
        [javadoc] '-tag'
        [javadoc] 'lucene.experimental:a:WARNING: This API is experimental and might change in incompatible ways in the next release.'
        [javadoc] '-tag'
        [javadoc] 'lucene.internal:a:NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.'
        [javadoc] 'org.apache.lucene'
        [javadoc] 'org.apache.lucene.analysis'
        [javadoc] 'org.apache.lucene.analysis.tokenattributes'
        [javadoc] 'org.apache.lucene.codecs'
        [javadoc] 'org.apache.lucene.codecs.blocktree'
        [javadoc] 'org.apache.lucene.codecs.compressing'
        [javadoc] 'org.apache.lucene.codecs.lucene50'
        [javadoc] 'org.apache.lucene.codecs.lucene53'
        [javadoc] 'org.apache.lucene.codecs.lucene54'
        [javadoc] 'org.apache.lucene.codecs.lucene60'
        [javadoc] 'org.apache.lucene.codecs.lucene62'
        [javadoc] 'org.apache.lucene.codecs.perfield'
        [javadoc] 'org.apache.lucene.document'
        [javadoc] 'org.apache.lucene.geo'
        [javadoc] 'org.apache.lucene.index'
        [javadoc] 'org.apache.lucene.search'
        [javadoc] 'org.apache.lucene.search.similarities'
        [javadoc] 'org.apache.lucene.search.spans'
        [javadoc] 'org.apache.lucene.store'
        [javadoc] 'org.apache.lucene.util'
        [javadoc] 'org.apache.lucene.util.automaton'
        [javadoc] 'org.apache.lucene.util.bkd'
        [javadoc] 'org.apache.lucene.util.fst'
        [javadoc] 'org.apache.lucene.util.mutable'
        [javadoc] 'org.apache.lucene.util.packed'
        [javadoc]
        [javadoc] The ' characters around the executable and arguments are
        [javadoc] not part of the command.
        [javadoc] Javadoc execution
        [javadoc] Loading source files for package org.apache.lucene...
        [...]
        [javadoc] Loading source files for package org.apache.lucene.util.mutable...
        [javadoc] Loading source files for package org.apache.lucene.util.packed...
        [javadoc] Constructing Javadoc information...
        [javadoc] Standard Doclet version 9-ea
        [javadoc] Building tree for all the packages and classes...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\org\apache\lucene\LucenePackage.html...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\org\apache\lucene\analysis\Analyzer.html...
        [...]
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\org\apache\lucene\util\bkd\package-use.html...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\org\apache\lucene\util\fst\package-use.html...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\org\apache\lucene\util\mutable\package-use.html...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\org\apache\lucene\util\packed\package-use.html...
        [javadoc] Building index for all the packages and classes...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\overview-tree.html...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\deprecated-list.html...
        [javadoc] Building index for all classes...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\allclasses-frame.html...
        [javadoc] javadoc: error - an unknown error has occurred
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\allclasses-noframe.html...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\index.html...
        [javadoc] Generating C:\Users\Uwe Schindler\Projects\lucene\trunk-lusolr1\lucene\build\docs\core\overview-summary.html...
        [javadoc] 1 error


        REPRODUCIBILITY :
        This bug can be reproduced always.

        CUSTOMER SUBMITTED WORKAROUND :
        If you add "doclet" attribute to the Ant Javadoc task, specifying the old doclet, the javadocs are produced as in Java 8:

        doclet="com.sun.tools.doclets.standard.Standard"

        (no errors)

              ksrini Kumar Srinivasan
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Created:
                Updated:
                Resolved: