Take the 2-minute tour ×

I have project in Jenkins (running on linux) that polls SCM at defined interval and builds on new changes. I am getting build failures intermittently with the following Console Output:

Started by user MyUser User
Building on master in workspace <http://ci.mybuild.com:8080/job/temp-project/ws/>
Checkout:workspace / <http://ci.mybuild.com:8080/job/temp-project/ws/> - hudson.remoting.LocalChannel@5f2c402a
Using strategy: Default
Cloning the remote Git repository
Cloning repository origin
FATAL: hudson/FilePath$11
java.lang.NoClassDefFoundError: hudson/FilePath$11
    at hudson.FilePath.deleteRecursive(FilePath.java:980)
    at hudson.plugins.git.GitAPI.clone(GitAPI.java:211)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1121)
    at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:1063)
    at hudson.FilePath.act(FilePath.java:851)
    at hudson.FilePath.act(FilePath.java:824)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1063)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1308)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:676)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:581)
    at hudson.model.Run.execute(Run.java:1516)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
    at hudson.model.ResourceController.execute(ResourceController.java:88)
    at hudson.model.Executor.run(Executor.java:236)

I tried creating a new job with similar configurations, but the first build failed with this error.

Can someone please help me with some pointers on this?

share|improve this question
add comment

3 Answers

See in the log - deleteRecursive is failing:

java.lang.NoClassDefFoundError: hudson/FilePath$11
    at hudson.FilePath.deleteRecursive(FilePath.java:980)
    at hudson.plugins.git.GitAPI.clone(GitAPI.java:211)

It probably means your file-system prevents deleting of files in that area -
please check file-permissions there (also on folders).

share|improve this answer
Thanks for the pointer Gonen, I suspected the permissions too, but as I mentioned, this is intermittent, for some time the build runs successfully, but sometimes it fails with this error. –  Noman Amir Nov 19 '12 at 8:03
Jenkins really should be the only entity that uses that local workspace. Do you have any developers or other applications that are using the same local workspace and are trying to do SVN operations on it? –  Slav Nov 19 '12 at 14:03
Well actually no, none of the developers have access to the system. I have enabled a periodic backup which runs every hour, but I suspect if that could be the reason for failure. –  Noman Amir Nov 20 '12 at 20:55
Maybe something is locking your file system dynamically - it may well be the backup system or some other process of a similar kind. –  Gonen Nov 23 '12 at 16:41
Why, when you say you are trying to just poll, is it doing a git clone? –  Todd Murray Nov 27 '12 at 18:51
show 1 more comment

This is almost certainly happening because Jenkins is trying to clean up/delete a file which is concurrently being accessed by another process.

Try running the following command right after you see this error:

lsof /my/repo/dir

This will tell you which files are locked in your repo directory and what is locking them.

share|improve this answer
add comment

The problem

The nature of the exception is one of classloading. Based on the actual exception:

java.lang.NoClassDefFoundError: hudson/FilePath$11

Means that the JVM cannot find the class definition (obviously). The dollar sign and number ($11) after "FilePath" indicates that it cannot find an anonymous inner class defined within the FilePath class, which can be seen at:


This supports this theory, since there are anonymous implementations of "FileCallable".

The solution

Now for the hard part, what to do about it.

I suspect that you are running jenkins in some form of web container (not known in the present form of the question). Web containers are notorious for their classloading idiosyncrasies. If you can, try running jenkins standalone, or in another container.

Also, are you doing any fiddling with the classpath in the startup of your container? Does it use builder slaves on the same machine? I suggest investigating these issues first.

share|improve this answer
Thanks a lot for such a detailed answer. Yes, you are right. Jenkins is run inside apache tomcat. Based on other responses, I think it could be conflicting with periodic backup that I have scheduled hourly. I will disable that and see if this error is still happening. –  Noman Amir Nov 27 '12 at 20:45
add comment

Your Answer


