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

Illegal reflective access by XStream

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • Jenkins 2.289.1
      Java 11.0.11
      Implied labels plugin 0.7

      With the implied labels plugin 0.7 installed on my Jenkins 2.289.1 using the label definitions as described in https://github.com/MarkEWaite/docker-lfs/blob/557b67944b7b4f37f493eac8e4f2f6a253eb02aa/ref/org.jenkinsci.plugins.impliedlabels.Config.xml#L1 , Java 11 reports an illegal access exception during startup.

      The stack trace for the illegal access exception is:

      WARNING: Illegal reflective access by com.thoughtworks.xstream.converters.reflection.FieldDictionary (file:/var/jenkins_home/war/WEB-INF/lib/xstream-1.4.17.jar) to field java.util.Collections$UnmodifiableCollection.serialVersionUID
              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.fieldOrNull(FieldDictionary.java:115)
              at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getFieldOrNull(PureJavaReflectionProvider.java:197)
              at hudson.util.RobustReflectionConverter.fieldDefinedInClass(RobustReflectionConverter.java:434)
              at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:296)
              at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:280)
              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 hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:439)
              at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:341)
              at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:280)
              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:1431)
              at hudson.util.XStream2.unmarshal(XStream2.java:161)
              at hudson.util.XStream2.unmarshal(XStream2.java:132)
              at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1411)
              at hudson.XmlFile.unmarshal(XmlFile.java:180)
              at hudson.XmlFile.unmarshal(XmlFile.java:163)
              at org.jenkinsci.plugins.impliedlabels.Config.load(Config.java:211)
              at org.jenkinsci.plugins.impliedlabels.Config.<init>(Config.java:80)
              at org.jenkinsci.plugins.impliedlabels.ImpliedLabelsPlugin.<clinit>(ImpliedLabelsPlugin.java:33)
              at java.base/java.lang.Class.newInstance(Class.java:584)
              at hudson.ClassicPluginStrategy.load(ClassicPluginStrategy.java:378)
              at hudson.PluginManager$2$1$1.run(PluginManager.java:551)
              at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      

      Issue is reported at this line:

      https://github.com/jenkinsci/implied-labels-plugin/blob/777c5e4bf8438dae723d0b31edd0c399899ceb65/src/main/java/org/jenkinsci/plugins/impliedlabels/Config.java#L211

            Unassigned Unassigned
            markewaite Mark Waite
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: