• Icon: Patch Patch
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • core
    • None
    • Windows

      I can not find a way to attach a patch to bug 5313, so here it is.

       
      Index: main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java
      ===================================================================
      --- main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java	(revision 26080)
      +++ main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java	(working copy)
      @@ -258,7 +258,20 @@
       
       
           private File makeResource(String name, byte[] image) throws IOException {
      -        File tmpFile = File.createTempFile("hudson-remoting", "");
      +    	//work around sun bug 6325169 on windows
      +    	//see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6325169
      +        File tmpFile = null;
      +        IOException lastException = null;
      +        for(int i=0; i<100 && tmpFile==null; i++) {
      +        	try {
      +        		tmpFile = File.createTempFile("hudson-remoting", "");
      +        	}catch(IOException e) {
      +        		lastException = e;
      +        	}
      +        }
      +        if(tmpFile == null) {
      +        	throw new IOException("Failed hard at creating a temp directory", lastException);
      +        }
               tmpFile.delete();
               File resource = new File(tmpFile, name);
               resource.getParentFile().mkdirs();
      

          [JENKINS-5314] Patch for bug 5313

          nhannebicque added a comment - - edited

          Hello

          For the problem I explained on issue http://issues.jenkins-ci.org/browse/JENKINS-4768, your patch, applied to the 1.340 sources is giving us very good results ! No more failed build.

          Please could someone integrate this patch on Hudson's next release ?

          nhannebicque added a comment - - edited Hello For the problem I explained on issue http://issues.jenkins-ci.org/browse/JENKINS-4768 , your patch, applied to the 1.340 sources is giving us very good results ! No more failed build. Please could someone integrate this patch on Hudson's next release ?

          Code changed in hudson
          User: : kohsuke
          Path:
          trunk/hudson/main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java
          trunk/www/changelog.html
          http://jenkins-ci.org/commit/26274
          Log:
          [FIXED JENKINS-5313 JENKINS-5314] Applied a patch in 5314 to fix 5313.

          SCM/JIRA link daemon added a comment - Code changed in hudson User: : kohsuke Path: trunk/hudson/main/remoting/src/main/java/hudson/remoting/RemoteClassLoader.java trunk/www/changelog.html http://jenkins-ci.org/commit/26274 Log: [FIXED JENKINS-5313 JENKINS-5314] Applied a patch in 5314 to fix 5313.

          scm_issue_link didn't close this because I put two issues in the bracket.

          Kohsuke Kawaguchi added a comment - scm_issue_link didn't close this because I put two issues in the bracket.

            Unassigned Unassigned
            jnegre jnegre
            Votes:
            2 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: