question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Build failure with OpenJDK 16

See original GitHub issue

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What’s the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

I would like to contribute to openapi-generator’s language support, but I’m not very familiar with Java, and the build is failing on my system.

❯ mvn clean install -e

[INFO] Running TestSuite
Configuring TestNG with: TestNG60Configurator
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
java.lang.instrument.IllegalClassFormatException: Error while instrumenting sun/util/resources/provider/NonBaseLocaleDataMetaInfo.
	at org.jacoco.agent.rt.internal_43f5073.CoverageTransformer.transform(CoverageTransformer.java:94)
...

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.0:jar (attach-javadocs) on project openapi-generator-core: MavenReportException: Error while generating Javadoc: Project contains Javadoc Warnings -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.1.0:jar (attach-javadocs) on project openapi-generator-core: MavenReportException: Error while generating Javadoc: Project contains Javadoc Warnings
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
openapi-generator version

master (2e85ccdec8c3304e42c3434ef6da54a637a13e1a)

OpenAPI declaration file content or url
Generation Details
Steps to reproduce
❯ java --version
openjdk 16.0.1 2021-04-20
OpenJDK Runtime Environment AdoptOpenJDK-16.0.1+9 (build 16.0.1+9)
OpenJDK 64-Bit Server VM AdoptOpenJDK-16.0.1+9 (build 16.0.1+9, mixed mode, sharing)
❯ mvn --version
Apache Maven 3.8.1 (05c21c65bdfed0f71a2f2ada8b84da59348c4c5d)
Maven home: /usr/local/Cellar/maven/3.8.1/libexec
Java version: 16.0.1, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/16.0.1/libexec/openjdk.jdk/Contents/Home
Default locale: en_CA, platform encoding: UTF-8
OS name: "mac os x", version: "11.4", arch: "x86_64", family: "mac"
Related issues/PRs

#9804 a different build error

Suggest a fix

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
wing328commented, Jun 23, 2021

Right, we’ve not yet tested this project with JDK 16. Please use ./run-in-docker.sh mvn package for the time being.

0reactions
Stokestackcommented, Sep 9, 2022

Same experience here. Skipping JavaDoc doesn’t solve it for me either. Java and Maven version info:

java version “1.8.0_341” Java™ SE Runtime Environment (build 1.8.0_341-b10) Java HotSpot™ 64-Bit Server VM (build 25.341-b10, mixed mode)

Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63) Maven home: /usr/local/Cellar/maven/3.8.6/libexec Java version: 18.0.2.1, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/18.0.2.1/libexec/openjdk.jdk/Contents/Home

The Docker option doesn’t work, because although I have Docker installed, the script mentioned above fails with:

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

Aaaand this turns out to be a big PITA on Macs, which require a bunch of other stuff to run the Docker daemon, despite the fact that you can type “docker” at the command line and it spits out a bunch of info. Thus it would be really great to have the core problem fixed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven 3.6.3-1 fails to run with OpenJDK 16 and 17
Maven 3.6.3-1 apparently fails to run with OpenJDK 16. It seems to be a bug and was fixed in Maven 3.6.3-2 (and above)...
Read more >
Developers - [BUG] Build failure with OpenJDK 16 - - Bountysource
[BUG] Build failure with OpenJDK 16.
Read more >
Java 16 crashes on initialising GTKL&F on Manjaro Linux
This fix is basically a revert of that bug modulo source file location move. For example, JDK-8272149 shows the issue crashing the JVM...
Read more >
Kapt is not working properly with OpenJDK 16 - Stack Overflow
I have an application that uses Kotlin 1.5.0 and Kapt for mapstructs. I have updated my JDK to 16 and I get the...
Read more >
JDK 11.0.2 Bug Fixes - Oracle
# JBS Component Subcomponent 1 JDK‑7017058 client‑libs 2d 2 JDK‑8210335 client‑libs 2d 3 JDK‑8206392 client‑libs javax.swing
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found