"javadoc: error - an unknown error has occurred" while building Apache Lucene Docs with JDK9b118

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

"javadoc: error - an unknown error has occurred" while building Apache Lucene Docs with JDK9b118

Uwe Schindler-4
Hi,

While updating the build system to better support Java 9 (e.g., javac's "-release" parameter), I noticed that Javadoc invocation fails with an unknown error during building the docs:

This is the verbose output of ANT (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/'
[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

You see:
[javadoc] javadoc: error - an unknown error has occurred
Shortly before failing the build.

I tried to disable many of the default options we pass to javadoc (like custom stylesheet sources).

I also tried to inject "-Xold", but this does not work with ant, because Javadocs seems to only accept this parameter at the beginning of the command line. With Ant you cannot insert anything at the beginning of command line, so it complains with "unknown option: -Xold"!!!

I also tried to pass -html5 or -html4, but neither brought a change. It fails in the same way.

The resulting Javadocs are not viewable, because the stylesheet and scripts are completely missing, you only see 3 small boxes.

Is there any way to figure out what the "unknown error" is about? I would need more information to open a bug report.

If you want to reproduce, just checkout Apache Lucene/Solr from Github (https://github.com/apache/lucene-solr) and run "ant documentation".

Uwe

-----
Uwe Schindler
[hidden email]
ASF Member, Apache Lucene PMC / Committer
Bremen, Germany
http://lucene.apache.org/


Reply | Threaded
Open this post in threaded view
|

Re: "javadoc: error - an unknown error has occurred" while building Apache Lucene Docs with JDK9b118

Jonathan Gibbons
Uwe,

Getting a message like "An unknown error has occurred" without any
additional details is enough of a reason to file a bug.

I note your comment about issues with -Xold and Ant.  If you are just
trying to document packages (i.e. no modules), to workaround this bug in
the new doclet, it should work to specify the name of the old doclet
explicitly, as in
     -doclet com.sun.tools.doclets.standard.Standard

-- Jon

On 05/21/2016 02:59 AM, Uwe Schindler wrote:

> Hi,
>
> While updating the build system to better support Java 9 (e.g., javac's "-release" parameter), I noticed that Javadoc invocation fails with an unknown error during building the docs:
>
> This is the verbose output of ANT (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/'
> [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
>
> You see:
> [javadoc] javadoc: error - an unknown error has occurred
> Shortly before failing the build.
>
> I tried to disable many of the default options we pass to javadoc (like custom stylesheet sources).
>
> I also tried to inject "-Xold", but this does not work with ant, because Javadocs seems to only accept this parameter at the beginning of the command line. With Ant you cannot insert anything at the beginning of command line, so it complains with "unknown option: -Xold"!!!
>
> I also tried to pass -html5 or -html4, but neither brought a change. It fails in the same way.
>
> The resulting Javadocs are not viewable, because the stylesheet and scripts are completely missing, you only see 3 small boxes.
>
> Is there any way to figure out what the "unknown error" is about? I would need more information to open a bug report.
>
> If you want to reproduce, just checkout Apache Lucene/Solr from Github (https://github.com/apache/lucene-solr) and run "ant documentation".
>
> Uwe
>
> -----
> Uwe Schindler
> [hidden email]
> ASF Member, Apache Lucene PMC / Committer
> Bremen, Germany
> http://lucene.apache.org/
>
>

Reply | Threaded
Open this post in threaded view
|

RE: "javadoc: error - an unknown error has occurred" while building Apache Lucene Docs with JDK9b118

Uwe Schindler-4
Hi Jonathan,

I can confirm, the Javadocs task succeed by adding the following Ant attribute to Ant's <javadoc/> XML tag:
        doclet="com.sun.tools.doclets.standard.Standard"

Thanks for that trick, now Java 9 built the same HTML output like Java 8, just with some warning messages about outdated API (com.sun.javadoc). It is still strange that passing -Xold does not work with Apache Ant, although you can pass stuff like Java 8 "-doclint" easily with <arg/> (e.g., <arg line="${javadoc.release.args}"/><arg line="${javadoc.doclint.args}"/>). Is it because it must be at beginning of command line which cannot be enforced with <args/>?

https://github.com/apache/lucene-solr/blob/master/lucene/common-build.xml#L2051-L2146

I will open a bug report and give you the review ID. Is it ok to list "how to reproduce using the Apache Lucene build"? I have no standalone reproducer, because I have no idea where the issue could be cominng from :-(

Uwe

-----
Uwe Schindler
[hidden email]
ASF Member, Apache Lucene PMC / Committer
Bremen, Germany
http://lucene.apache.org/

> From: javadoc-dev [mailto:[hidden email]] On
> Behalf Of Jonathan Gibbons
> Sent: Saturday, May 21, 2016 5:24 PM
> To: [hidden email]
> Subject: Re: "javadoc: error - an unknown error has occurred" while building
> Apache Lucene Docs with JDK9b118
>
> Uwe,
>
> Getting a message like "An unknown error has occurred" without any
> additional details is enough of a reason to file a bug.
>
> I note your comment about issues with -Xold and Ant.  If you are just
> trying to document packages (i.e. no modules), to workaround this bug in
> the new doclet, it should work to specify the name of the old doclet
> explicitly, as in
>      -doclet com.sun.tools.doclets.standard.Standard
>
> -- Jon
>
> On 05/21/2016 02:59 AM, Uwe Schindler wrote:
> > Hi,
> >
> > While updating the build system to better support Java 9 (e.g., javac's "-
> release" parameter), I noticed that Javadoc invocation fails with an unknown
> error during building the docs:
> >
> > This is the verbose output of ANT (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/'
> > [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
> >
> > You see:
> > [javadoc] javadoc: error - an unknown error has occurred
> > Shortly before failing the build.
> >
> > I tried to disable many of the default options we pass to javadoc (like
> custom stylesheet sources).
> >
> > I also tried to inject "-Xold", but this does not work with ant, because
> Javadocs seems to only accept this parameter at the beginning of the
> command line. With Ant you cannot insert anything at the beginning of
> command line, so it complains with "unknown option: -Xold"!!!
> >
> > I also tried to pass -html5 or -html4, but neither brought a change. It fails in
> the same way.
> >
> > The resulting Javadocs are not viewable, because the stylesheet and scripts
> are completely missing, you only see 3 small boxes.
> >
> > Is there any way to figure out what the "unknown error" is about? I would
> need more information to open a bug report.
> >
> > If you want to reproduce, just checkout Apache Lucene/Solr from Github
> (https://github.com/apache/lucene-solr) and run "ant documentation".
> >
> > Uwe
> >
> > -----
> > Uwe Schindler
> > [hidden email]
> > ASF Member, Apache Lucene PMC / Committer
> > Bremen, Germany
> > http://lucene.apache.org/
> >
> >

Reply | Threaded
Open this post in threaded view
|

RE: "javadoc: error - an unknown error has occurred" while building Apache Lucene Docs with JDK9b118

Uwe Schindler-4
Hallo Jonathan,

I opened a bug report, here is the review ID: https://bugs.openjdk.java.net/browse/JI-9038327

Uwe

-----
Uwe Schindler
[hidden email]
ASF Member, Apache Lucene PMC / Committer
Bremen, Germany
http://lucene.apache.org/

> -----Original Message-----
> From: javadoc-dev [mailto:[hidden email]] On
> Behalf Of Uwe Schindler
> Sent: Saturday, May 21, 2016 9:38 PM
> To: 'Jonathan Gibbons' <[hidden email]>; javadoc-
> [hidden email]
> Subject: RE: "javadoc: error - an unknown error has occurred" while building
> Apache Lucene Docs with JDK9b118
>
> Hi Jonathan,
>
> I can confirm, the Javadocs task succeed by adding the following Ant
> attribute to Ant's <javadoc/> XML tag:
> doclet="com.sun.tools.doclets.standard.Standard"
>
> Thanks for that trick, now Java 9 built the same HTML output like Java 8, just
> with some warning messages about outdated API (com.sun.javadoc). It is still
> strange that passing -Xold does not work with Apache Ant, although you can
> pass stuff like Java 8 "-doclint" easily with <arg/> (e.g., <arg
> line="${javadoc.release.args}"/><arg line="${javadoc.doclint.args}"/>). Is it
> because it must be at beginning of command line which cannot be enforced
> with <args/>?
>
> https://github.com/apache/lucene-solr/blob/master/lucene/common-
> build.xml#L2051-L2146
>
> I will open a bug report and give you the review ID. Is it ok to list "how to
> reproduce using the Apache Lucene build"? I have no standalone
> reproducer, because I have no idea where the issue could be cominng from
> :-(
>
> Uwe
>
> -----
> Uwe Schindler
> [hidden email]
> ASF Member, Apache Lucene PMC / Committer
> Bremen, Germany
> http://lucene.apache.org/
>
> > From: javadoc-dev [mailto:[hidden email]] On
> > Behalf Of Jonathan Gibbons
> > Sent: Saturday, May 21, 2016 5:24 PM
> > To: [hidden email]
> > Subject: Re: "javadoc: error - an unknown error has occurred" while
> building
> > Apache Lucene Docs with JDK9b118
> >
> > Uwe,
> >
> > Getting a message like "An unknown error has occurred" without any
> > additional details is enough of a reason to file a bug.
> >
> > I note your comment about issues with -Xold and Ant.  If you are just
> > trying to document packages (i.e. no modules), to workaround this bug in
> > the new doclet, it should work to specify the name of the old doclet
> > explicitly, as in
> >      -doclet com.sun.tools.doclets.standard.Standard
> >
> > -- Jon
> >
> > On 05/21/2016 02:59 AM, Uwe Schindler wrote:
> > > Hi,
> > >
> > > While updating the build system to better support Java 9 (e.g., javac's "-
> > release" parameter), I noticed that Javadoc invocation fails with an
> unknown
> > error during building the docs:
> > >
> > > This is the verbose output of ANT (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/'
> > > [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
> > >
> > > You see:
> > > [javadoc] javadoc: error - an unknown error has occurred
> > > Shortly before failing the build.
> > >
> > > I tried to disable many of the default options we pass to javadoc (like
> > custom stylesheet sources).
> > >
> > > I also tried to inject "-Xold", but this does not work with ant, because
> > Javadocs seems to only accept this parameter at the beginning of the
> > command line. With Ant you cannot insert anything at the beginning of
> > command line, so it complains with "unknown option: -Xold"!!!
> > >
> > > I also tried to pass -html5 or -html4, but neither brought a change. It fails
> in
> > the same way.
> > >
> > > The resulting Javadocs are not viewable, because the stylesheet and
> scripts
> > are completely missing, you only see 3 small boxes.
> > >
> > > Is there any way to figure out what the "unknown error" is about? I
> would
> > need more information to open a bug report.
> > >
> > > If you want to reproduce, just checkout Apache Lucene/Solr from Github
> > (https://github.com/apache/lucene-solr) and run "ant documentation".
> > >
> > > Uwe
> > >
> > > -----
> > > Uwe Schindler
> > > [hidden email]
> > > ASF Member, Apache Lucene PMC / Committer
> > > Bremen, Germany
> > > http://lucene.apache.org/
> > >
> > >