Maven Sync failing with error : Could not acquire lock(s)
Answered
I have a multimodule Maven project
On a recurring basis, when i try to sync/reload a maven project it fails with below mentioned error without any further detail
Could not acquire lock(s)
Intellij version : 2024.3.6 (Ultimate Edition)
Maven version : Maven 3.9.9

Please sign in to leave a comment.
How can i debug, resolve this issue ?
Already checked that
1) There is no file lock in .m2 repository
2) No other java process is running
Thanks for the report!
To look into this further, could you share a few details:
1. Collect the IDE logs via Help | Collect Logs and Diagnostic Data and attach them here( Please upload it to https://uploads.jetbrains.com/ and share the upload ID here). The log should capture what happens around the time of the sync failure.
2. When the error occurs, is there an external Maven process running at the same time (e.g., a mvn command in a terminal)? Maven can fail to acquire locks when two processes try to access the local repository at the same moment.
3. Are you using IntelliJ IDEA's bundled Maven or an external Maven installation? (You can check under Settings | Build, Execution, Deployment | Build Tools | Maven | Maven home path.)
4. Does the issue reproduce in a newer version of IntelliJ IDEA? The current release is 2026.1 — it's worth testing if upgrading changes anything.
1) Sharing relevant stack trace from logs here
2) No other mvn process
3) Bundled maven v3.9.9
4) I have a license for 2024.3.6 (Ultimate Edition). Don't have access to newer versions for ultimate
I did some experimentation
i) The issue stopped occuring if i specify the maven installation ex - 3.9.15 (Externally downloaded maven version)
ii) When i revert to bundled maven it starts occuring again
iii) I downloaded maven version 3.9.9 externally and linked it. Sync failed with acquire locks
The issues seems correlated to maven version but i can't confirm
This is the exact error log from Intellij Log collection
Stack Trace 1
Stack Trace 2
We've logged this as a bug in our tracker: https://youtrack.jetbrains.com/issue/IDEA-388616
Kindly follow it for the update.
Hi Swing
Can you try
mvn clean installfor this project from the OS command line using the downloaded 3.9.9 Maven?If it works, go back to the IDE and try File | Invalidate Caches → check first three boxes → Invalidate & Restart
If the issue persists:
IDE STARTEDevent)Files can be uploaded securely to https://uploads.jetbrains.com (share Upload ID here so that we can find it).