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

NPE from xstream.core.JVM.isOpenJDK

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      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)
      

        Attachments

          Issue Links

            Activity

            Hide
            jglick 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.

            Show
            jglick 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.
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            dogfood 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
            Show
            dogfood 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
            Hide
            jglick 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.

            Show
            jglick 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.
            Hide
            jglick Jesse Glick added a comment -

            User confirms that fix works.

            Show
            jglick Jesse Glick added a comment - User confirms that fix works.
            Hide
            scm_issue_link 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

            Show
            scm_issue_link 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

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: