Bug#1011555: libpicocontainer1-java: FTBFS with OpenJDK 17 due to an illegal reflective access during the tests
Emmanuel Bourg
ebourg at apache.org
Tue May 24 21:43:48 BST 2022
Package: libpicocontainer1-java
Version: 1.3-3
Severity: important
Tags: ftbfs sid bookworm
User: debian-java at lists.debian.org
Usertags: default-java17
libpicocontainer1-java fails to build with OpenJDK 17, the tests make illegal
reflective accesses into java.base/java.io:
[INFO] Running org.picocontainer.defaults.ConstructorInjectionComponentAdapterTestCase
[ERROR] Tests run: 24, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.122 s <<< FAILURE! - in org.picocontainer.defaults.ConstructorInjectionComponentAdapterTestCase
[ERROR] testSER_isXStreamSerializableWithPureReflection(org.picocontainer.defaults.ConstructorInjectionComponentAdapterTestCase) Time elapsed: 0.114 s <<< ERROR!
java.lang.ExceptionInInitializerError
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.instantiateUsingSerialization(PureJavaReflectionProvider.java:113)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:88)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:580)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:276)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1391)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1376)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1261)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1252)
at org.picocontainer.tck.AbstractComponentAdapterTestCase.testSER_isXStreamSerializableWithPureReflection(AbstractComponentAdapterTestCase.java:241)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:100)
at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:140)
at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:113)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.Object java.io.ObjectStreamClass.newInstance() throws java.lang.InstantiationException,java.lang.reflect.InvocationTargetException,java.lang.UnsupportedOperationException accessible: module java.base does not "opens java.io" to unnamed module @4cfaf581
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider$Reflections.<clinit>(PureJavaReflectionProvider.java:244)
... 37 more
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make java.lang.Object java.io.ObjectStreamClass.newInstance() throws java.lang.InstantiationException,java.lang.reflect.InvocationTargetException,java.lang.UnsupportedOperationException accessible: module java.base does not "opens java.io" to unnamed module @4cfaf581
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider$Reflections.<clinit>(PureJavaReflectionProvider.java:244)
... 37 more
[INFO] Running org.picocontainer.defaults.DefaultComponentAdapterFactoryTestCase
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.picocontainer.defaults.DefaultComponentAdapterFactoryTestCase
[INFO] Running org.picocontainer.defaults.DefaultPicoContainerTreeSerializationTestCase
[INFO] Tests run: 35, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in org.picocontainer.defaults.DefaultPicoContainerTreeSerializationTestCase
[INFO] Running org.picocontainer.defaults.DefaultPicoContainerLifecycleTestCase
[INFO] Tests run: 22, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.206 s - in org.picocontainer.defaults.DefaultPicoContainerLifecycleTestCase
[INFO] Running org.picocontainer.defaults.XStreamSerialisationTestCase
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.03 s - in org.picocontainer.defaults.XStreamSerialisationTestCase
[INFO] Running org.picocontainer.defaults.DefaultLazyInstantiationTestCase
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in org.picocontainer.defaults.DefaultLazyInstantiationTestCase
[INFO] Running org.picocontainer.defaults.CollectionComponentParameterTestCase
[INFO] Tests run: 14, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.005 s - in org.picocontainer.defaults.CollectionComponentParameterTestCase
[INFO] Running org.picocontainer.defaults.SetterInjectionComponentAdapterTestCase
[ERROR] Tests run: 18, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.013 s <<< FAILURE! - in org.picocontainer.defaults.SetterInjectionComponentAdapterTestCase
[ERROR] testSER_isXStreamSerializableWithPureReflection(org.picocontainer.defaults.SetterInjectionComponentAdapterTestCase) Time elapsed: 0.004 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider$Reflections
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.instantiateUsingSerialization(PureJavaReflectionProvider.java:113)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:88)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:580)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:276)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1391)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1376)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1261)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1252)
at org.picocontainer.tck.AbstractComponentAdapterTestCase.testSER_isXStreamSerializableWithPureReflection(AbstractComponentAdapterTestCase.java:241)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:100)
at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:140)
at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:113)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
[INFO] Running org.picocontainer.defaults.ChildContainerTestCase
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.picocontainer.defaults.ChildContainerTestCase
[INFO] Running org.picocontainer.defaults.ParameterTestCase
[INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.001 s - in org.picocontainer.defaults.ParameterTestCase
[INFO] Running org.picocontainer.defaults.BeanPropertyComponentAdapterTestCase
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.picocontainer.defaults.BeanPropertyComponentAdapterTestCase
[INFO] Running org.picocontainer.defaults.DefaultPicoContainerTestCase
[INFO] Tests run: 59, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.017 s - in org.picocontainer.defaults.DefaultPicoContainerTestCase
[INFO] Running org.picocontainer.defaults.DefaultMultipleConstructorTestCase
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.picocontainer.defaults.DefaultMultipleConstructorTestCase
[INFO] Running org.picocontainer.defaults.InstanceComponentAdapterTestCase
[ERROR] Tests run: 20, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.009 s <<< FAILURE! - in org.picocontainer.defaults.InstanceComponentAdapterTestCase
[ERROR] testSER_isXStreamSerializableWithPureReflection(org.picocontainer.defaults.InstanceComponentAdapterTestCase) Time elapsed: 0.005 s <<< ERROR!
java.lang.NoClassDefFoundError: Could not initialize class com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider$Reflections
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.instantiateUsingSerialization(PureJavaReflectionProvider.java:113)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.newInstance(PureJavaReflectionProvider.java:88)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.instantiateNewInstance(AbstractReflectionConverter.java:580)
at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.unmarshal(AbstractReflectionConverter.java:276)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1391)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1376)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1261)
at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1252)
at org.picocontainer.tck.AbstractComponentAdapterTestCase.testSER_isXStreamSerializableWithPureReflection(AbstractComponentAdapterTestCase.java:241)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at junit.framework.TestCase.runTest(TestCase.java:164)
at org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at jdk.internal.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:100)
at org.apache.maven.surefire.junit.JUnit3Provider.executeTestSet(JUnit3Provider.java:140)
at org.apache.maven.surefire.junit.JUnit3Provider.invoke(JUnit3Provider.java:113)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
More information about the pkg-java-maintainers
mailing list