Bug#982338: maven-jar-plugin: FTBFS with OpenJDK 17: module java.base does not "opens java.lang" to unnamed module

Emmanuel Bourg ebourg at apache.org
Mon Feb 8 23:37:03 GMT 2021


Source: maven-jar-plugin
Severity: important
Tags: ftbfs sid bookworm
User: debian-java at lists.debian.org
Usertags: default-java17

maven-jar-plugin fails to build with OpenJDK 17, the tests fail with the following error:


  [INFO] -------------------------------------------------------
  [INFO]  T E S T S
  [INFO] -------------------------------------------------------
  [INFO] Running org.apache.maven.plugins.jar.JarMojoTest
  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.
  [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.614 s <<< FAILURE! - in org.apache.maven.plugins.jar.JarMojoTest
  [ERROR] testJarTestEnvironment(org.apache.maven.plugins.jar.JarMojoTest)  Time elapsed: 0.576 s  <<< ERROR!
  com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalStateException: Unable to load cache item
          at org.apache.maven.plugins.jar.JarMojoTest.setUp(JarMojoTest.java:42)
  Caused by: java.lang.IllegalStateException: Unable to load cache item
          at org.apache.maven.plugins.jar.JarMojoTest.setUp(JarMojoTest.java:42)
  Caused by: java.lang.ExceptionInInitializerError
          at org.apache.maven.plugins.jar.JarMojoTest.setUp(JarMojoTest.java:42)
  Caused by: com.google.inject.internal.cglib.core.$CodeGenerationException: java.lang.reflect.InaccessibleObjectException-->Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @2ee4f460
          at org.apache.maven.plugins.jar.JarMojoTest.setUp(JarMojoTest.java:42)
  Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @2ee4f460
          at org.apache.maven.plugins.jar.JarMojoTest.setUp(JarMojoTest.java:42)



More information about the pkg-java-maintainers mailing list