Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68090

Envinject plugin tests fail on Java 17

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • envinject-plugin
    • None

      With Java 17 run

      mvn clean verify -Dtest=org.jenkinsci.plugins.envinject.EnvInjectActionTest -Djenkins.version=2.339 -Denforcer.skip -Djenkins-test-harness.version=1721.v385389722736 
      

      Expected results

      The test passes

      Actual results

      The test fails with:

      [ERROR] Tests run: 5, Failures: 0, Errors: 3, Skipped: 2, Time elapsed: 8.179 s <<< FAILURE! - in org.jenkinsci.plugins.envinject.EnvInjectActionTest
      [ERROR] org.jenkinsci.plugins.envinject.EnvInjectActionTest.doNotOverrideWrapperEnvVar  Time elapsed: 5.605 s  <<< ERROR!
      java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class hudson.slaves.DumbSlave
      	at hudson.XmlFile.write(XmlFile.java:220)
      	at jenkins.model.Nodes.persistNode(Nodes.java:183)
      	at jenkins.model.Nodes.addNode(Nodes.java:148)
      	at jenkins.model.Jenkins.addNode(Jenkins.java:2206)
      	at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:1046)
      	at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:1037)
      	at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:1027)
      	at org.jvnet.hudson.test.JenkinsRule.createOnlineSlave(JenkinsRule.java:1104)
      	at org.jenkinsci.plugins.envinject.EnvInjectActionTest.slaveContributing(EnvInjectActionTest.java:134)
      	at org.jenkinsci.plugins.envinject.EnvInjectActionTest.setupProjectWithDefaultEnvValue(EnvInjectActionTest.java:127)
      	at org.jenkinsci.plugins.envinject.EnvInjectActionTest.doNotOverrideWrapperEnvVar(EnvInjectActionTest.java:62)
      	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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:606)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class hudson.slaves.DumbSlave
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
      	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1266)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1255)
      	at com.thoughtworks.xstream.XStream.toXML(XStream.java:1228)
      	at hudson.XmlFile.write(XmlFile.java:213)
      	... 23 more
      Caused by: java.lang.RuntimeException: Failed to serialize org.jvnet.hudson.test.SimpleCommandLauncher#env for class org.jvnet.hudson.test.SimpleCommandLauncher
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      	... 36 more
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.util.Set java.util.AbstractMap.keySet accessible: module java.base does not "opens java.util" to unnamed module @13a5fe33
      	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.Field.checkCanSetAccessible(Field.java:178)
      	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
      	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildDictionaryEntryForClass(FieldDictionary.java:176)
      	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:142)
      	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldsFor(FieldDictionary.java:80)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:167)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:206)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      	... 45 more
      
      [ERROR] org.jenkinsci.plugins.envinject.EnvInjectActionTest.doNotOverrideWithBuildWrapper  Time elapsed: 1.531 s  <<< ERROR!
      java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class hudson.slaves.DumbSlave
      	at hudson.XmlFile.write(XmlFile.java:220)
      	at jenkins.model.Nodes.persistNode(Nodes.java:183)
      	at jenkins.model.Nodes.addNode(Nodes.java:148)
      	at jenkins.model.Jenkins.addNode(Jenkins.java:2206)
      	at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:1046)
      	at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:1037)
      	at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:1027)
      	at org.jvnet.hudson.test.JenkinsRule.createOnlineSlave(JenkinsRule.java:1104)
      	at org.jenkinsci.plugins.envinject.EnvInjectActionTest.slaveContributing(EnvInjectActionTest.java:134)
      	at org.jenkinsci.plugins.envinject.EnvInjectActionTest.setupProjectWithDefaultEnvValue(EnvInjectActionTest.java:127)
      	at org.jenkinsci.plugins.envinject.EnvInjectActionTest.doNotOverrideWithBuildWrapper(EnvInjectActionTest.java:94)
      	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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:606)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class hudson.slaves.DumbSlave
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
      	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1266)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1255)
      	at com.thoughtworks.xstream.XStream.toXML(XStream.java:1228)
      	at hudson.XmlFile.write(XmlFile.java:213)
      	... 23 more
      Caused by: java.lang.RuntimeException: Failed to serialize org.jvnet.hudson.test.SimpleCommandLauncher#env for class org.jvnet.hudson.test.SimpleCommandLauncher
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      	... 36 more
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.util.Set java.util.AbstractMap.keySet accessible: module java.base does not "opens java.util" to unnamed module @13a5fe33
      	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.Field.checkCanSetAccessible(Field.java:178)
      	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
      	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildDictionaryEntryForClass(FieldDictionary.java:176)
      	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:142)
      	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldsFor(FieldDictionary.java:80)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:167)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:206)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      	... 45 more
      
      [ERROR] org.jenkinsci.plugins.envinject.EnvInjectActionTest.doNotOverrideWithPasswordWrapper  Time elapsed: 1.001 s  <<< ERROR!
      java.io.IOException: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class hudson.slaves.DumbSlave
      	at hudson.XmlFile.write(XmlFile.java:220)
      	at jenkins.model.Nodes.persistNode(Nodes.java:183)
      	at jenkins.model.Nodes.addNode(Nodes.java:148)
      	at jenkins.model.Jenkins.addNode(Jenkins.java:2206)
      	at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:1046)
      	at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:1037)
      	at org.jvnet.hudson.test.JenkinsRule.createSlave(JenkinsRule.java:1027)
      	at org.jvnet.hudson.test.JenkinsRule.createOnlineSlave(JenkinsRule.java:1104)
      	at org.jenkinsci.plugins.envinject.EnvInjectActionTest.slaveContributing(EnvInjectActionTest.java:134)
      	at org.jenkinsci.plugins.envinject.EnvInjectActionTest.setupProjectWithDefaultEnvValue(EnvInjectActionTest.java:127)
      	at org.jenkinsci.plugins.envinject.EnvInjectActionTest.doNotOverrideWithPasswordWrapper(EnvInjectActionTest.java:106)
      	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 org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      	at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:606)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:299)
      	at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:293)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.lang.Thread.run(Thread.java:833)
      Caused by: java.lang.RuntimeException: Failed to serialize hudson.model.Slave#launcher for class hudson.slaves.DumbSlave
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:44)
      	at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:83)
      	at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1266)
      	at com.thoughtworks.xstream.XStream.marshal(XStream.java:1255)
      	at com.thoughtworks.xstream.XStream.toXML(XStream.java:1228)
      	at hudson.XmlFile.write(XmlFile.java:213)
      	... 23 more
      Caused by: java.lang.RuntimeException: Failed to serialize org.jvnet.hudson.test.SimpleCommandLauncher#env for class org.jvnet.hudson.test.SimpleCommandLauncher
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:274)
      	at hudson.util.RobustReflectionConverter$2.visit(RobustReflectionConverter.java:241)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:174)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:226)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      	... 36 more
      Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field transient java.util.Set java.util.AbstractMap.keySet accessible: module java.base does not "opens java.util" to unnamed module @13a5fe33
      	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.Field.checkCanSetAccessible(Field.java:178)
      	at java.base/java.lang.reflect.Field.setAccessible(Field.java:172)
      	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildDictionaryEntryForClass(FieldDictionary.java:176)
      	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:142)
      	at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldsFor(FieldDictionary.java:80)
      	at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:167)
      	at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:206)
      	at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:163)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)
      	at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:59)
      	at com.thoughtworks.xstream.core.AbstractReferenceMarshaller$1.convertAnother(AbstractReferenceMarshaller.java:83)
      	at hudson.util.RobustReflectionConverter.marshallField(RobustReflectionConverter.java:283)
      	at hudson.util.RobustReflectionConverter$2.writeField(RobustReflectionConverter.java:270)
      	... 45 more
      

            Unassigned Unassigned
            notmyfault Alexander Brandes
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: