Bug#1012102: groovycsv: FTBFS with OpenJDK 17 due to an illegal reflective access during the tests

Emmanuel Bourg ebourg at apache.org
Mon May 30 09:28:12 BST 2022


Source: groovycsv
Version: 1.3-2
Severity: important
Tags: ftbfs sid bookworm
User: debian-java at lists.debian.org
Usertags: default-java17

groovycsv fails to build with OpenJDK 17, the tests make an illegal
reflective access into java.base/java.lang:


  :test
  Putting task artifact state for task ':test' into context took 0.0 secs.
  Up-to-date check for task ':test' took 0.008 secs. It is not up-to-date because:
    No history is available.
  Starting process 'Gradle Test Executor 2'. Working directory: /<<PKGBUILDDIR>> Command: /usr/lib/jvm/java-17-openjdk-amd64/bin/java -Dorg.gradle.native=false @/tmp/gradle-worker-classpath12606975899872403165txt -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -ea worker.org.gradle.process.internal.worker.GradleWorkerMain 'Gradle Test Executor 2'
  Successfully started process 'Gradle Test Executor 2'
  Gradle Test Executor 2 started executing tests.
  
  com.xlson.groovycsv.CsvIteratorSpec > CsvIterator should close the underlying CSVReader instance when reaching the end of the file. FAILED
      java.lang.ExceptionInInitializerError
          at org.spockframework.mock.runtime.ProxyBasedMockFactory$CglibMockFactory.createMock(ProxyBasedMockFactory.java:80)
          at org.spockframework.mock.runtime.ProxyBasedMockFactory.create(ProxyBasedMockFactory.java:49)
          at org.spockframework.mock.runtime.JavaMockFactory.create(JavaMockFactory.java:51)
          at org.spockframework.mock.runtime.CompositeMockFactory.create(CompositeMockFactory.java:44)
          at org.spockframework.lang.SpecInternals.createMock(SpecInternals.java:47)
          at org.spockframework.lang.SpecInternals.createMockImpl(SpecInternals.java:282)
          at org.spockframework.lang.SpecInternals.MockImpl(SpecInternals.java:99)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at com.xlson.groovycsv.CsvIteratorSpec.CsvIterator should close the underlying CSVReader instance when reaching the end of the file.(CsvIteratorSpec.groovy:32)
  
          Caused by:
          net.sf.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 @4cfaf581
              at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:464)
              at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:339)
              at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:96)
              at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:94)
              at net.sf.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at net.sf.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
              at net.sf.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
              at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:119)
              at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:294)
              at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:221)
              at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:174)
              at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:153)
              at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:73)
              ... 10 more
  
              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 @4cfaf581
                  at net.sf.cglib.core.ReflectUtils$1.run(ReflectUtils.java:61)
                  at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
                  at net.sf.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:52)
                  at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:243)
                  at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
                  at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:332)
                  ... 22 more



More information about the pkg-java-maintainers mailing list