Error when upgrading to 1.9-r-c1: Unexpected lock protocol found in lock file. Expected 3, found 2


(spencer_allain) #1

Unexpected lock protocol found in lock file. Expected 3, found 2.

Steps to cause this error are simple: gradlew init Uncomment block in build.gradle Create some empty class in src/main/java to force actual compilation and dependency resolution.

07:04:00.921 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Waiting to acquire exclusive lock on artifact cache (C:\Users\spencer.gradle\caches\modules-1). 07:04:00.931 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter

]

Finished executing task ‘:compileJava’ 07:04:00.939 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :compileJava (Thread[main,5,main]) completed. Took 0.106 secs. 07:04:00.946 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 0.106 secs, idle: 0.016 secs ask worker [Thread[main,5,main]] finished, busy: 0.106 secs, idle: 0.016 secs 07:04:00.958 [ERROR] [org.gradle.BuildExceptionReporter] 07:04:00.966 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception. 07:04:00.975 [ERROR] [org.gradle.BuildExceptionReporter] 07:04:00.981 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong: 07:04:00.987 [ERROR] [org.gradle.BuildExceptionReporter] Could not resolve all dependencies for configuration ‘:compile’. 07:04:00.994 [ERROR] [org.gradle.BuildExceptionReporter] > Unexpected lock protocol found in lock file. Expected 3, found 2.

modules-1.lock contains hex-code: 0283 46F9 B3

Moving the cache directory aside allowed it to work, but I’ve saved my old cache if necessary for analysis.

-Spencer Note: This topic was created from a reply on the Gradle 1.9-rc-1 is now available for testing topic.


(Adam Murdoch) #2

Were you upgrading from a nightly build?


(Luke Daley) #3

FYI - there’s a bug with this forum software that prevents us exporting this to JIRA right now. I’m trying to get it resolved.


(spencer_allain) #4

I was attempting to see whether a pending rpm plugin upgrade would break, and since there was no 1.9 nightly available at the time, I did use a 1.10 nightly. Otherwise, all other versions in use were 1.8 or prior.

-Spencer