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.
Not in the test output. Couldn’t find any reason. Just clone the git repository and build it using the default tasks, i.e. just call ‘gradle’ with 1.9-rc-1 or update the wrapper and use ‘gradlew’. I used ‘gradlew’ but reverted the changes since the build was failing.
The See also link doesn’t have a valid anchor so I don’t know what’s causing this. I add the logback-classic dependency as testRuntime to all my projects - so this shouldn’t happen at all.
We’re running into issues when including the ch.qos.logback:logback-class:1.0.13 jar into our projects.
It appears that 1.9-rc-1 isn’t resolving POM dependencies correctly. This is what the dependency report from 1.8 indicates: ±-- ch.qos.logback:logback-classic:1.0.13 |
±-- ch.qos.logback:logback-core:1.0.13 |
— org.slf4j:slf4j-api:1.7.5
But 1.9-rc-1 generates this: ±-- ch.qos.logback:logback-classic:1.0.13 ±-- org.slf4j:log4j-over-slf4j:1.7.2 |