OverlappingFileLockException when trying to use Gradle on Windows 8

Upon attempting to walk through the Spring REST tutorial, which uses Gradle, I encountered an


when trying to run

./gradlew clean test

. When I tried to use a full installation of Gradle instead of the Gradle wrapper included with the project, I got the same exception. So, I decided to start much more simply, and follow Gradle’s own Hello World example, with the same result.

The stacktrace produced when running the simple Hello World example can be found in this Github Gist: https://gist.github.com/chrisramey/9117398. I’m sure this is some simple configuration issue on my Windows machine, but as a first time Gradle user, the solution escapes me. Thanks in advance!

It appears this was a problem writing to my default cache directory, which exists on a network location. To fix this, I added a ‘GRADLE_USER_HOME’ environment variable, pointing to a local drive instead: ‘C:\Users\ramc01.gradle’. Fixed!