A user trying to run a Maven build reports an error:

      java.lang.NullPointerException
      	at com.thoughtworks.xstream.core.JVM.isOpenJDK(JVM.java:128)
      	at com.thoughtworks.xstream.core.JVM.canUseSun14ReflectionProvider(JVM.java:279)
      	at com.thoughtworks.xstream.core.JVM.bestReflectionProvider(JVM.java:254)
      	at com.thoughtworks.xstream.XStream.<init>(XStream.java:438)
      	at com.thoughtworks.xstream.XStream.<init>(XStream.java:381)
      	at com.thoughtworks.xstream.XStream.<init>(XStream.java:336)
      	at hudson.util.XStream2.<init>(XStream2.java:84)
      	at hudson.model.Run.<clinit>(Run.java:2164)
      

          [JENKINS-21183] NPE from xstream.core.JVM.isOpenJDK

          Jesse Glick added a comment -

          A faulty fix of JENKINS-10752 is to blame.

          Note that upstream XStream does not have code that looks anything like this; the Jenkins fork seems to have diverged quite a bit.

          Jesse Glick added a comment - A faulty fix of JENKINS-10752 is to blame. Note that upstream XStream does not have code that looks anything like this; the Jenkins fork seems to have diverged quite a bit.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          xstream/src/java/com/thoughtworks/xstream/core/JVM.java
          http://jenkins-ci.org/commit/xstream/8b14bfc4729451d510b91b31bf733eeaa7552221
          Log:
          JENKINS-21183 There is no guarantee that System.getProperty("java.runtime.name") is set; this is not a documented property.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: xstream/src/java/com/thoughtworks/xstream/core/JVM.java http://jenkins-ci.org/commit/xstream/8b14bfc4729451d510b91b31bf733eeaa7552221 Log: JENKINS-21183 There is no guarantee that System.getProperty("java.runtime.name") is set; this is not a documented property.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/pom.xml
          http://jenkins-ci.org/commit/jenkins/8011acf02828a3aaa666af1b1db873af1031a11a
          Log:
          [FIXED JENKINS-21183] Updated XStream to pick up NPE fix.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/pom.xml http://jenkins-ci.org/commit/jenkins/8011acf02828a3aaa666af1b1db873af1031a11a Log: [FIXED JENKINS-21183] Updated XStream to pick up NPE fix.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #3138
          [FIXED JENKINS-21183] Updated XStream to pick up NPE fix. (Revision 8011acf02828a3aaa666af1b1db873af1031a11a)

          Result = SUCCESS
          Jesse Glick : 8011acf02828a3aaa666af1b1db873af1031a11a
          Files :

          • core/pom.xml
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #3138 [FIXED JENKINS-21183] Updated XStream to pick up NPE fix. (Revision 8011acf02828a3aaa666af1b1db873af1031a11a) Result = SUCCESS Jesse Glick : 8011acf02828a3aaa666af1b1db873af1031a11a Files : core/pom.xml changelog.html

          Jesse Glick added a comment -

          Note: user is running JDK 7u45, so I have no explanation for how this system property came to be unset. (jrunscript claims that it is set.) Nonetheless, a defensive null check is appropriate here.

          Jesse Glick added a comment - Note: user is running JDK 7u45, so I have no explanation for how this system property came to be unset. ( jrunscript claims that it is set.) Nonetheless, a defensive null check is appropriate here.

          Jesse Glick added a comment -

          User confirms that fix works.

          Jesse Glick added a comment - User confirms that fix works.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          core/pom.xml
          http://jenkins-ci.org/commit/jenkins/620513fff556be570c54a368bf92c404a2bb96c4
          Log:
          [FIXED JENKINS-21183] Updated XStream to pick up NPE fix.

          (cherry picked from commit 8011acf02828a3aaa666af1b1db873af1031a11a)

          Conflicts:
          changelog.html

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: core/pom.xml http://jenkins-ci.org/commit/jenkins/620513fff556be570c54a368bf92c404a2bb96c4 Log: [FIXED JENKINS-21183] Updated XStream to pick up NPE fix. (cherry picked from commit 8011acf02828a3aaa666af1b1db873af1031a11a) Conflicts: changelog.html

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: