Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368343 - Wipe out workspace before build causes git job to fail
Summary: Wipe out workspace before build causes git job to fail
Status: CLOSED FIXED
Alias: None
Product: Hudson
Classification: Technology
Component: GIT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Winston Prakash CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-11 09:07 EST by Geoff Waymark CLA
Modified: 2012-01-13 09:58 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff Waymark CLA 2012-01-11 09:07:14 EST
Build Identifier: #43 Eclipse build

Started by user geoff
Building on master
Checkout:workspace / D:\HUDSON-3\jobs\Git test\workspace - hudson.remoting.LocalChannel@13a2c0d7
Using strategy: Default
Last Built Revision: Revision 18315b73865db9f62d143253702f9d523efead99 (origin/master)
Checkout:workspace / D:\HUDSON-3\jobs\Git test\workspace - hudson.remoting.LocalChannel@13a2c0d7
Wiping out workspace first.
FATAL: com/sun/jna/TypeMapper
java.lang.NoClassDefFoundError: com/sun/jna/TypeMapper
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.defineClass(Unknown Source)
	at java.net.URLClassLoader.access$100(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:392)
	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
	at org.jruby.ext.posix.POSIXFactory$1.<init>(POSIXFactory.java:13)
	at org.jruby.ext.posix.POSIXFactory.<clinit>(POSIXFactory.java:12)
	at hudson.util.jna.PosixAPI.<clinit>(PosixAPI.java:32)
	at hudson.util.jna.JnaNativeUnixSupport.makeFileWritable(JnaNativeUnixSupport.java:133)
	at hudson.util.jna.NativeUtils.makeFileWritable(NativeUtils.java:206)
	at hudson.Util.makeWritable(Util.java:281)
	at hudson.Util.deleteFile(Util.java:228)
	at hudson.Util.deleteRecursive(Util.java:291)
	at hudson.Util.deleteContentsRecursive(Util.java:213)
	at hudson.Util.deleteRecursive(Util.java:290)
	at hudson.Util.deleteContentsRecursive(Util.java:213)
	at hudson.Util.deleteRecursive(Util.java:290)
	at hudson.Util.deleteContentsRecursive(Util.java:213)
	at hudson.Util.deleteRecursive(Util.java:290)
	at hudson.Util.deleteContentsRecursive(Util.java:213)
	at hudson.FilePath$10.invoke(FilePath.java:834)
	at hudson.FilePath$10.invoke(FilePath.java:832)
	at hudson.FilePath.act(FilePath.java:754)
	at hudson.FilePath.act(FilePath.java:736)
	at hudson.FilePath.deleteContents(FilePath.java:832)
	at org.eclipse.hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:890)
	at org.eclipse.hudson.plugins.git.GitSCM$3.invoke(GitSCM.java:877)
	at hudson.FilePath.act(FilePath.java:754)
	at hudson.FilePath.act(FilePath.java:736)
	at org.eclipse.hudson.plugins.git.GitSCM.gerRevisionToBuild(GitSCM.java:877)
	at org.eclipse.hudson.plugins.git.GitSCM.checkout(GitSCM.java:657)
	at hudson.model.AbstractProject.checkout(AbstractProject.java:1471)
	at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:500)
	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:417)
	at hudson.model.Run.run(Run.java:1357)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:39)
	at hudson.model.ResourceController.execute(ResourceController.java:81)
	at hudson.model.Executor.run(Executor.java:138)
Caused by: java.lang.ClassNotFoundException: com.sun.jna.TypeMapper
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:401)
	at org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:363)
	... 44 more

Reproducible: Always

Steps to Reproduce:
On windows
1. Create a simple job that clones a git repos
2. Select the 'Wipe out workspace before build' flag
3. Build
4. The consoe log above appears and the job fails.

Without the flag the job succeeds
Comment 1 Winston Prakash CLA 2012-01-11 12:53:39 EST
Fixed. The function makeFileWritable is not available for windows. So the fix is to guard the block on windows. 

I tested the fix on my Virtualbox Windows XP 

http://git.eclipse.org/c/hudson/org.eclipse.hudson.core.git/commit/?id=07071a718dce951aae35bba2b8f61b0f3aa8e727
Comment 2 Geoff Waymark CLA 2012-01-13 09:58:44 EST
Tested in candidte M0