New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java 9 javadoc failure in build #1741

Closed
joakime opened this Issue Aug 15, 2017 · 8 comments

Comments

Projects
None yet
3 participants
@joakime
Copy link
Member

joakime commented Aug 15, 2017

JDK 9+181

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0-M1:jar (default-cli) on project fcgi-server: MavenReportException: Error while generating Javadoc:
[ERROR] Exit code: 1 - javadoc: error - An exception occurred while building a component: TagInfo
[ERROR] (com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: /opt/jenkins/workspace/jetty-9.4.x jdk9/jetty-proxy/target/jetty-proxy-9.4.7-SNAPSHOT.jar(/org/eclipse/jetty/proxy/AsyncMiddleManServlet$1.class)
[ERROR] class file contains malformed variable arity method: (org.eclipse.jetty.proxy.AsyncMiddleManServlet,java.nio.ByteBuffer[],javax.servlet.http.HttpServletRequest)
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.)
[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] com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: /opt/jenkins/workspace/jetty-9.4.x jdk9/jetty-proxy/target/jetty-proxy-9.4.7-SNAPSHOT.jar(/org/eclipse/jetty/proxy/AsyncMiddleManServlet$1.class)
[ERROR] class file contains malformed variable arity method: (org.eclipse.jetty.proxy.AsyncMiddleManServlet,java.nio.ByteBuffer[],javax.servlet.http.HttpServletRequest)
[ERROR] Please remove or make sure it appears in the correct subdirectory of the classpath.
[ERROR] at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.badClassFile(ClassReader.java:278)
[ERROR] at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readMethod(ClassReader.java:2402)
[ERROR] at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2641)
[ERROR] at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassBuffer(ClassReader.java:2706)
[ERROR] at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:2719)
[ERROR] at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:348)
[ERROR] at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:285)
[ERROR] at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
[ERROR] at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1314)
[ERROR] at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:1248)
[ERROR] at jdk.compiler/com.sun.tools.javac.code.Symbol$TypeSymbol.getEnclosedElements(Symbol.java:800)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getItems0(Utils.java:2468)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getItems0(Utils.java:2463)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.recursiveGetItems(Utils.java:2451)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils$16.visitPackage(Utils.java:2436)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils$16.visitPackage(Utils.java:2432)
[ERROR] at jdk.compiler/com.sun.tools.javac.code.Symbol$PackageSymbol.accept(Symbol.java:1166)
[ERROR] at java.compiler@9/javax.lang.model.util.AbstractElementVisitor6.visit(AbstractElementVisitor6.java:106)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getItems(Utils.java:2445)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getClasses(Utils.java:2182)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getAllClasses(Utils.java:2355)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.findClassInPackageElement(Utils.java:1047)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.WorkArounds.searchClass(WorkArounds.java:231)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.findClass(Utils.java:1065)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.taglets.ThrowsTaglet.inherit(ThrowsTaglet.java:76)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.DocFinder.search(DocFinder.java:257)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.DocFinder.search(DocFinder.java:270)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.taglets.ThrowsTaglet.inheritThrowsDocumentation(ThrowsTaglet.java:133)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.taglets.ThrowsTaglet.getTagletOutput(ThrowsTaglet.java:164)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.taglets.TagletWriter.genTagOutput(TagletWriter.java:238)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDocletWriter.addTagsInfo(HtmlDocletWriter.java:319)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.MethodWriterImpl.addTags(MethodWriterImpl.java:206)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.MethodBuilder.buildTagInfo(MethodBuilder.java:207)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractMemberBuilder.build(AbstractMemberBuilder.java:87)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:200)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.MethodBuilder.buildMethodDoc(MethodBuilder.java:151)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractMemberBuilder.build(AbstractMemberBuilder.java:87)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:200)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ClassBuilder.buildMethodDetails(ClassBuilder.java:412)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:200)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ClassBuilder.buildMemberDetails(ClassBuilder.java:346)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:200)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ClassBuilder.buildClassDoc(ClassBuilder.java:155)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:564)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ClassBuilder.build(ClassBuilder.java:125)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.generateClassFiles(HtmlDoclet.java:263)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:273)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:207)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.run(AbstractDoclet.java:117)
[ERROR] at jdk.javadoc/jdk.javadoc.doclet.StandardDoclet.run(StandardDoclet.java:72)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:574)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:423)
[ERROR] at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:340)
[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)
[ERROR] 
[ERROR] Command line was: /opt/shared/jdk9/bin/javadoc @options @packages
[ERROR] 
[ERROR] Refer to the generated Javadoc files in '/opt/jenkins/workspace/jetty-9.4.x jdk9/jetty-fcgi/fcgi-server/target/apidocs' dir.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :fcgi-server

sbordet added a commit that referenced this issue Aug 15, 2017

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.
@joakime

This comment has been minimized.

Copy link
Member Author

joakime commented Aug 15, 2017

considering this fixed, closing...

@joakime joakime closed this Aug 15, 2017

sbordet added a commit that referenced this issue Aug 15, 2017

Issue #1741 - Java 9 javadoc failure in build.
Updated Maven Javadoc Plugin to 3.0.0-M1 and removed unused imports
that were influencing somehow the Javadoc generation.
@sbordet

This comment has been minimized.

Copy link
Contributor

sbordet commented Aug 15, 2017

See also elastic/elasticsearch#24733.

For us, turning the anonymous inner class into a named inner class worked around what appears to be a Javadoc bug.

@sbordet sbordet removed the Bug label Aug 16, 2017

@schauder

This comment has been minimized.

Copy link

schauder commented Aug 25, 2017

Did you create an issue for Javadoc? I'm asking because I see the same/similar problem.

@sbordet

This comment has been minimized.

Copy link
Contributor

sbordet commented Aug 25, 2017

We have not created an issue to Oracle, as so far we were the only ones, to my knowledge, hitting this issue. If you do open an issue to Oracle, can you please link it here ? Unless you want us to create it.

@schauder

This comment has been minimized.

Copy link

schauder commented Aug 25, 2017

Haven't created an issue, because currently, I can't reproduce the issue in a reasonable way. So if you could create an issue that would be appreciated.

If not I'll take a stab at it next week, based on your code.

@sbordet

This comment has been minimized.

Copy link
Contributor

sbordet commented Aug 25, 2017

I'll do it, thanks !

@sbordet

This comment has been minimized.

Copy link
Contributor

sbordet commented Aug 25, 2017

Submitted.

@sbordet

This comment has been minimized.

joakime added a commit that referenced this issue Jun 19, 2018

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.

joakime added a commit that referenced this issue Jun 19, 2018

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.

joakime added a commit that referenced this issue Jun 19, 2018

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.

joakime added a commit that referenced this issue Jun 19, 2018

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.

joakime added a commit that referenced this issue Jun 19, 2018

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.

joakime added a commit that referenced this issue Jun 19, 2018

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.

joakime added a commit that referenced this issue Jun 19, 2018

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.

joakime added a commit that referenced this issue Jun 19, 2018

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.

joakime added a commit that referenced this issue Jun 19, 2018

Issue #1741 - Java 9 javadoc failure in build.
Workaround for a Javadoc tool bug in JDK 9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment