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

[JDK9] Illegal reflective access from xstream

XMLWordPrintable

      While exploring Jenkins 2.60.3 on Oracle Java 9 build 181 (pre-release), it reports illegal access exceptions and warns that a future release of Java 9 will forbid illegal access.

      A partial stack trace shows:

      WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/var/jenkins_home/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar) to field java.util.TreeMap.comparator
              at com.thoughtworks.xstream.core.util.Fields.locate(Fields.java:39)
              at com.thoughtworks.xstream.converters.collections.TreeMapConverter.<clinit>(TreeMapConverter.java:50)
              at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:811)
              at com.thoughtworks.xstream.XStream.<init>(XStream.java:574)
      
      WARNING: Illegal reflective access by com.thoughtworks.xstream.converters.reflection.FieldDictionary (file:/var/jenkins_home/war/WEB-INF/lib/xstream-1.4.7-jenkins-1.jar) to field java.util.Collections$EmptyList.serialVersionUID
              at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:148)
              at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldsFor(FieldDictionary.java:76)
              at com.thoughtworksxstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:130)
      

      Similar warnings appear for FieldDictionary references

      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.AbstractCollection.MAX_ARRAY_SIZE
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.AbstractList.modCount
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.AbstractMap.keySet
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.AbstractMap.values
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.Arrays$ArrayList.a
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.Arrays$ArrayList.serialVersionUID
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.Collections$EmptyList.serialVersionUID
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.Collections$UnmodifiableCollection.c
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.Collections$UnmodifiableCollection.serialVersionUID
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.Collections$UnmodifiableList.list
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.Collections$UnmodifiableList.serialVersionUID
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.Collections$UnmodifiableSet.serialVersionUID
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.BASE_HEADER
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.comparator
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.descendingMap
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.entrySet
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.EQ
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.GT
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.head
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.HEAD
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.keySet
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.LT
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.serialVersionUID
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.concurrent.ConcurrentSkipListMap.values
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.BLACK
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.comparator
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.descendingMap
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.entrySet
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.modCount
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.navigableKeySet
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.RED
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.root
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.serialVersionUID
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.size
      WARNING: Illegal reflective access by ...reflection.FieldDictionary to field java.util.TreeMap.UNBOUNDED
      

      Similar warnings appear for Field references

      WARNING: Illegal reflective access by ...core.util.Fields to field java.awt.font.TextAttribute.instanceMap
      WARNING: Illegal reflective access by ...core.util.Fields to field java.lang.reflect.Proxy.h
      WARNING: Illegal reflective access by ...core.util.Fields to field java.util.EnumMap.keyType
      WARNING: Illegal reflective access by ...core.util.Fields to field java.util.EnumSet.elementType
      WARNING: Illegal reflective access by ...core.util.Fields to field java.util.Properties.defaults
      WARNING: Illegal reflective access by ...core.util.Fields to field java.util.TreeMap.comparator
      WARNING: Illegal reflective access by ...core.util.Fields to field java.util.TreeSet.m
      

      Similar warnings appear for SerializableConverter references

      WARNING: Illegal reflective access by ...reflection.SerializableConverter to field java.util.concurrent.ConcurrentSkipListMap.comparator
      WARNING: Illegal reflective access by ...reflection.SerializableConverter to field java.util.TreeMap.comparator
      

      Method access warnings appear in SerializationMethodInvoker for:

      WARNING: Illegal reflective access by ...reflection.SerializationMethodInvoker to method java.util.Collections$EmptyList.readResolve()
      WARNING: Illegal reflective access by ...reflection.SerializationMethodInvoker to method java.util.Collections$UnmodifiableList.readResolve()
      WARNING: Illegal reflective access by ...reflection.SerializationMethodInvoker to method java.util.concurrent.ConcurrentSkipListMap.readObject(java.io.ObjectInputStream)
      WARNING: Illegal reflective access by ...reflection.SerializationMethodInvoker to method java.util.concurrent.ConcurrentSkipListMap.writeObject(java.io.ObjectOutputStream)
      WARNING: Illegal reflective access by ...reflection.SerializationMethodInvoker to method java.util.TreeMap.readObject(java.io.ObjectInputStream)
      WARNING: Illegal reflective access by ...reflection.SerializationMethodInvoker to method java.util.TreeMap.writeObject(java.io.ObjectOutputStream)
      

      Method access warnings appear in AbstractAttributedCharacterIteratorAttributeConverter for:

      WARNING: Illegal reflective access by ...reflection.AbstractAttributedCharacterIteratorAttributeConverter to method java.text.AttributedCharacterIterator$Attribute.getName()
      

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

              Created:
              Updated:
              Resolved: