Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Activator `.sbt.ivy.lock` is not available

I am trying to generate Eclipse and IDEA projects for a play project using activator. When I tried doing this, it does a little, but then it hangs at:

Waiting for lock on C:\Users\James\.ivy2\.sbt.ivy.lock to be available...

At first I thought my running session of Intellij IDEA may be conflicting, I killed IDEA and the issue persisted. I closed activator, deleted the lock file, and restarted activator, but then it recreated the lock file and gave me the same issue. This is the full log I have been getting.

[info] Loading project definition from C:\Users\James\play-java\project
[info] Set current project to play-java (in build file:/C:/Users/James/play-java/)
[info] Applying State transformations com.typesafe.sbtrc.SetupSbtChild from C:/Users/James/.sbt/boot/scala-2.10.2/com.typesafe.sbtrc/sbt-rc-probe-0-13/1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1/sbt-rc-probe-0-13-1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1.jar;C:/Users/James/.sbt/boot/scala-2.10.2/com.typesafe.sbtrc/sbt-rc-probe-0-13/1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1/sbt-rc-props-1.0-1a8f7afd5ba98b45834ff53dd349130c3ade22f1.jar
[info] Updating {file:/C:/Users/James/play-java/}root...
Waiting for lock on C:\Users\James\.ivy2\.sbt.ivy.lock to be available...

How can I fix the lockfile issue?

like image 982
James Parsons Avatar asked Dec 08 '14 01:12

James Parsons


3 Answers

The .sbt.ivy.lock file is used to synchronize access to your local ivy2 repository between several processes so they cannot modify the directory simultaneously. Usually the situation that you described happens when you have an IDE and Activator/sbt terminal running at the same time.

Even though you killed the Idea Process there could be another process spawned which was causing the lock so next time make sure that you kill all Java processes. However, the best solution for this issue is to avoid locking one process with another. So run only one process which uses the ivy2 repository at the same time.

like image 55
Daniel Olszewski Avatar answered Nov 15 '22 15:11

Daniel Olszewski


If nothing works, the last step is to kill the .lock file.

like image 23
Raj Avatar answered Nov 15 '22 15:11

Raj


I faced a similar issue, I was also getting the same error

Waiting for lock on C:\Users\ajain9\.ivy2\.sbt.ivy.lock to be available...

Then finally the issue was that there was another sbt process running on my system, and because of that the .sbt.ivy.lock file was not being available. As explained well by Daniel, lock file is used for synchronization purpose.

Once the previous process ended,I did not face this error again.

like image 2
Aklank Jain Avatar answered Nov 15 '22 17:11

Aklank Jain