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

Jenkins is no more WinXP compliant : CreateSymbolicLinkW is not available

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: core
    • Labels:
    • Environment:
      windows XP
      Windows Server 2003 Enterprise Edition SP2
    • Similar Issues:

      Description

      since update to 1.507 (from 1.505), no build is possible.

      it seems that fix of https://issues.jenkins-ci.org/browse/JENKINS-15587 has broken XP compatibility.

      when starting to run any job, error message is :

      FATAL: Error looking up function 'CreateSymbolicLinkW': La procédure spécifiée est introuvable.

      java.lang.UnsatisfiedLinkError: Error looking up function 'CreateSymbolicLinkW': La procédure spécifiée est introuvable.

      at com.sun.jna.Function.<init>(Function.java:179)
      at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:347)
      at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:327)
      at com.sun.jna.Library$Handler.invoke(Library.java:203)
      at $Proxy22.CreateSymbolicLinkW(Unknown Source)
      at hudson.util.jna.Kernel32Utils.createSymbolicLink(Kernel32Utils.java:85)
      at hudson.Util.createSymlink(Util.java:1048)
      at hudson.model.Run.execute(Run.java:1573)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      at hudson.model.ResourceController.execute(ResourceController.java:88)
      at hudson.model.Executor.run(Executor.java:237)

        Attachments

          Issue Links

            Activity

            Hide
            mikecaspar Mike Caspar added a comment -

            OK.. I made some progress and wanted to help others who are having trouble. It appears that by upgrading to Java 1.7 (jre7) instead of 1.6 does the trick. I found out that just changing JAVA_HOME is not enough to be able to do the switch.

            If you go to Manage Jenkins, then system info (sysinfo).. check the java.runtime.version. You will see that it seems to ignores whatever is in JAVA_HOME.

            I discovered that the reason for this is that a Copy of the JRE at the time of initial installation was copied to JENKINS_HOME/jre.

            To fix this, I did the following...

            • net stop jenkins
            • rename JENKINS_HOME\jre to JENKINS_HOME\jre-backup (in my case, I actually copied the entire folder elsewhere to be sure I had a copy (just in case).
            • Copy the folder c:\Program Files\Java\jre7 to JENKINS_HOME/jre7.
            • After copying JRE7 to JENKINS_HOME, rename it to jre (of course, you might be able to do without the rename step).
            • Start up Jenkins with net start Jenkins
            • Login and go to sysinfo.. you should see the newer java.runtime.version.

            I put this together from a few of the notes above and wanted to share it with other WinXP users that might not easily find this resolution.

            Show
            mikecaspar Mike Caspar added a comment - OK.. I made some progress and wanted to help others who are having trouble. It appears that by upgrading to Java 1.7 (jre7) instead of 1.6 does the trick. I found out that just changing JAVA_HOME is not enough to be able to do the switch. If you go to Manage Jenkins, then system info (sysinfo).. check the java.runtime.version. You will see that it seems to ignores whatever is in JAVA_HOME. I discovered that the reason for this is that a Copy of the JRE at the time of initial installation was copied to JENKINS_HOME/jre. To fix this, I did the following... net stop jenkins rename JENKINS_HOME\jre to JENKINS_HOME\jre-backup (in my case, I actually copied the entire folder elsewhere to be sure I had a copy (just in case). Copy the folder c:\Program Files\Java\jre7 to JENKINS_HOME/jre7. After copying JRE7 to JENKINS_HOME, rename it to jre (of course, you might be able to do without the rename step). Start up Jenkins with net start Jenkins Login and go to sysinfo.. you should see the newer java.runtime.version. I put this together from a few of the notes above and wanted to share it with other WinXP users that might not easily find this resolution.
            Hide
            adham_hassan Adham Hassan added a comment -

            Confirmed that replacing the JENKINS_HOME\jre folder with what jre7 folder I have in installed in C:\Program Files\Java\jre7, fixes this issue for my Windows Server 2003 SP2 Jenkins installation.

            Show
            adham_hassan Adham Hassan added a comment - Confirmed that replacing the JENKINS_HOME\jre folder with what jre7 folder I have in installed in C:\Program Files\Java\jre7, fixes this issue for my Windows Server 2003 SP2 Jenkins installation.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            changelog.html
            core/src/main/java/hudson/Util.java
            core/src/main/java/hudson/util/jna/Kernel32Utils.java
            http://jenkins-ci.org/commit/jenkins/a016f3da07958202b13dd247dcac6766ea03a2aa
            Log:
            [FIXED JENKINS-17343]

            Don't break Windows XP, fall back gracefully to no-op.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: changelog.html core/src/main/java/hudson/Util.java core/src/main/java/hudson/util/jna/Kernel32Utils.java http://jenkins-ci.org/commit/jenkins/a016f3da07958202b13dd247dcac6766ea03a2aa Log: [FIXED JENKINS-17343] Don't break Windows XP, fall back gracefully to no-op.
            Hide
            dogfood dogfood added a comment -

            Integrated in jenkins_main_trunk #2441

            Result = SUCCESS

            Show
            dogfood dogfood added a comment - Integrated in jenkins_main_trunk #2441 Result = SUCCESS
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Kohsuke Kawaguchi
            Path:
            core/src/main/java/hudson/Util.java
            core/src/main/java/hudson/util/jna/Kernel32Utils.java
            http://jenkins-ci.org/commit/jenkins/606dea7ab0bf36ac29695ef0c0c383a8b08c593f
            Log:
            [FIXED JENKINS-17343]

            Don't break Windows XP, fall back gracefully to no-op.
            (cherry picked from commit a016f3da07958202b13dd247dcac6766ea03a2aa)

            Conflicts:
            changelog.html

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: core/src/main/java/hudson/Util.java core/src/main/java/hudson/util/jna/Kernel32Utils.java http://jenkins-ci.org/commit/jenkins/606dea7ab0bf36ac29695ef0c0c383a8b08c593f Log: [FIXED JENKINS-17343] Don't break Windows XP, fall back gracefully to no-op. (cherry picked from commit a016f3da07958202b13dd247dcac6766ea03a2aa) Conflicts: changelog.html

              People

              • Assignee:
                Unassigned
                Reporter:
                aaubert alexandre aubert
              • Votes:
                11 Vote for this issue
                Watchers:
                21 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: