Buildscript class cache error using gradlew

I’m getting on odd error while trying to run Gradle using:

Could not open buildscript class cache for build file ‘/opt/anthillpro/work_dirs/aacom_Acceleration/package.gradle’ (/home/buildadm/.gradle/caches/1.2/scripts/package_7n9p3kk8fudisrf1ihu4drhc7g/ProjectScript/buildscript).

java.io.IOException: Input/output error

Could not open buildscript class cache for build file ‘/opt/anthillpro/work_dirs/aacom_Acceleration/package.gradle’ (/home/buildadm/.gradle/caches/1.2/scripts/package_7n9p3kk8fudisrf1ihu4drhc7g/ProjectScript/buildscript).

java.io.IOException: Input/output error

Caused by: java.io.IOException: Input/output error

at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.lockRegion(DefaultFileLockManager.java:319)

at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.lockStateRegion(DefaultFileLockManager.java:310)

at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.lock(DefaultFileLockManager.java:230)

at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.(DefaultFileLockManager.java:106)

at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:70)

… 49 more

I’ve tried removing the the .gradle directory containing the cache file, but it doesn’t make any difference. A listing of the directory in question is:

$ ls -l /home/buildadm/.gradle/caches/1.2/scripts/package_7n9p3kk8fudisrf1ihu4drhc7g/ProjectScript/buildscripttotal 0

-rw-r–r-- 1 buildadm buildadm 0 Oct 12 08:31 cache.properties.lock

The lock file is empty, but I can open and edit it from the command line.

We’re running gradle 1.2 under java 1.6 on a Linux system.

Can anyone help with this?

Could this be a permission problem? Which OS user does Anthill run under?

It looks like this was an issue with the Linux OS. For some reason we weren’t able to properly obtain locks on from our NAS connection.