javax.jcr.lock.LockException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I recently upgraded from revision 642 1.2.1-SNAPSHOT to 1.2.1 final release. Things went pretty smooth for a while - however after running the server for a while ( several days, not much traffic) and then trying to deploy a pom artifact, I noticed Internal Error 500 being returned. Looking at the logs I see that the node is already locked. I have no idea what is causing the locks but it keeps happening. I will mention that after restarting the server the same pom can be deployed without problem as it seems that locks are removed upon restart. However it always happens that eventually nodes will become locked again for some unknown reason and prevent deployment and I am always forced to restart. {noformat} [] 2007-07-19 22:40:46,239 DEBUG NodeLock.lock(74) | Cannot lock node '/prefix-repo-dev-release/com/company/pom-root'.. Cause: javax.jcr.lock.LockException: Node already locked: /prefix-repo-dev-release/com/company/pom-root at org.apache.jackrabbit.core.lock.LockManagerImpl.internalLock(LockManagerImpl.java:274) at org.apache.jackrabbit.core.lock.XALockManager.lock(XALockManager.java:73) at org.apache.jackrabbit.core.NodeImpl.lock(NodeImpl.java:4060) at org.artifactory.jcr.NodeLock.lock(NodeLock.java:58) at org.artifactory.jcr.NodeLock.lock(NodeLock.java:39) at org.artifactory.jcr.JcrHelper.createFolder(JcrHelper.java:430) at org.artifactory.jcr.JcrHelper.getOrCreateFolderNode(JcrHelper.java:456) at org.artifactory.jcr.JcrHelper.createPath(JcrHelper.java:198) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:341) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:333) at org.artifactory.jcr.JcrHelper.doInSession(JcrHelper.java:184) at org.artifactory.repo.JcrRepo.saveResource(JcrRepo.java:331) at org.artifactory.engine.UploadEngine.process(UploadEngine.java:158) at org.artifactory.webapp.servlet.RepoFilter.handleUploadRequest(RepoFilter.java:106) at org.artifactory.webapp.servlet.RepoFilter.doFilterInternal(RepoFilter.java:75) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178) at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:72) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) [] 2007-07-19 22:40:46,240 ERROR RepoFilter.handleUploadRequest(108) | Upload request failed java.lang.RuntimeException: Failed to save resource '{prefix-repo-dev-release:com/company/pom-root/8/pom-root-8.pom}'. at org.artifactory.repo.JcrRepo.saveResource(JcrRepo.java:378) at org.artifactory.engine.UploadEngine.process(UploadEngine.java:158) at org.artifactory.webapp.servlet.RepoFilter.handleUploadRequest(RepoFilter.java:106) at org.artifactory.webapp.servlet.RepoFilter.doFilterInternal(RepoFilter.java:75) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178) at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:72) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: java.lang.RuntimeException: Failed to execute JcrCallback. at org.artifactory.jcr.JcrHelper.doInSession(JcrHelper.java:188) at org.artifactory.repo.JcrRepo.saveResource(JcrRepo.java:331) ... 25 more Caused by: java.lang.RuntimeException: Failed to acquire node lock on '/prefix-repo-dev-release/com/company/pom-root' after 15 retries. at org.artifactory.jcr.NodeLock.lock(NodeLock.java:88) at org.artifactory.jcr.NodeLock.lock(NodeLock.java:39) at org.artifactory.jcr.JcrHelper.createFolder(JcrHelper.java:430) at org.artifactory.jcr.JcrHelper.getOrCreateFolderNode(JcrHelper.java:456) at org.artifactory.jcr.JcrHelper.createPath(JcrHelper.java:198) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:341) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:333) at org.artifactory.jcr.JcrHelper.doInSession(JcrHelper.java:184) ... 26 more {noformat} Any ideas?
    via by Peter Lynch,
  • I recently upgraded from revision 642 1.2.1-SNAPSHOT to 1.2.1 final release. Things went pretty smooth for a while - however after running the server for a while ( several days, not much traffic) and then trying to deploy a pom artifact, I noticed Internal Error 500 being returned. Looking at the logs I see that the node is already locked. I have no idea what is causing the locks but it keeps happening. I will mention that after restarting the server the same pom can be deployed without problem as it seems that locks are removed upon restart. However it always happens that eventually nodes will become locked again for some unknown reason and prevent deployment and I am always forced to restart. {noformat} [] 2007-07-19 22:40:46,239 DEBUG NodeLock.lock(74) | Cannot lock node '/prefix-repo-dev-release/com/company/pom-root'.. Cause: javax.jcr.lock.LockException: Node already locked: /prefix-repo-dev-release/com/company/pom-root at org.apache.jackrabbit.core.lock.LockManagerImpl.internalLock(LockManagerImpl.java:274) at org.apache.jackrabbit.core.lock.XALockManager.lock(XALockManager.java:73) at org.apache.jackrabbit.core.NodeImpl.lock(NodeImpl.java:4060) at org.artifactory.jcr.NodeLock.lock(NodeLock.java:58) at org.artifactory.jcr.NodeLock.lock(NodeLock.java:39) at org.artifactory.jcr.JcrHelper.createFolder(JcrHelper.java:430) at org.artifactory.jcr.JcrHelper.getOrCreateFolderNode(JcrHelper.java:456) at org.artifactory.jcr.JcrHelper.createPath(JcrHelper.java:198) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:341) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:333) at org.artifactory.jcr.JcrHelper.doInSession(JcrHelper.java:184) at org.artifactory.repo.JcrRepo.saveResource(JcrRepo.java:331) at org.artifactory.engine.UploadEngine.process(UploadEngine.java:158) at org.artifactory.webapp.servlet.RepoFilter.handleUploadRequest(RepoFilter.java:106) at org.artifactory.webapp.servlet.RepoFilter.doFilterInternal(RepoFilter.java:75) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178) at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:72) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) [] 2007-07-19 22:40:46,240 ERROR RepoFilter.handleUploadRequest(108) | Upload request failed java.lang.RuntimeException: Failed to save resource '{prefix-repo-dev-release:com/company/pom-root/8/pom-root-8.pom}'. at org.artifactory.repo.JcrRepo.saveResource(JcrRepo.java:378) at org.artifactory.engine.UploadEngine.process(UploadEngine.java:158) at org.artifactory.webapp.servlet.RepoFilter.handleUploadRequest(RepoFilter.java:106) at org.artifactory.webapp.servlet.RepoFilter.doFilterInternal(RepoFilter.java:75) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178) at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:72) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442) Caused by: java.lang.RuntimeException: Failed to execute JcrCallback. at org.artifactory.jcr.JcrHelper.doInSession(JcrHelper.java:188) at org.artifactory.repo.JcrRepo.saveResource(JcrRepo.java:331) ... 25 more Caused by: java.lang.RuntimeException: Failed to acquire node lock on '/prefix-repo-dev-release/com/company/pom-root' after 15 retries. at org.artifactory.jcr.NodeLock.lock(NodeLock.java:88) at org.artifactory.jcr.NodeLock.lock(NodeLock.java:39) at org.artifactory.jcr.JcrHelper.createFolder(JcrHelper.java:430) at org.artifactory.jcr.JcrHelper.getOrCreateFolderNode(JcrHelper.java:456) at org.artifactory.jcr.JcrHelper.createPath(JcrHelper.java:198) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:341) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:333) at org.artifactory.jcr.JcrHelper.doInSession(JcrHelper.java:184) ... 26 more {noformat} Any ideas?
    via by Peter Lynch,
    • javax.jcr.lock.LockException: Node already locked: /prefix-repo-dev-release/com/company/pom-root at org.apache.jackrabbit.core.lock.LockManagerImpl.internalLock(LockManagerImpl.java:274) at org.apache.jackrabbit.core.lock.XALockManager.lock(XALockManager.java:73) at org.apache.jackrabbit.core.NodeImpl.lock(NodeImpl.java:4060) at org.artifactory.jcr.NodeLock.lock(NodeLock.java:58) at org.artifactory.jcr.NodeLock.lock(NodeLock.java:39) at org.artifactory.jcr.JcrHelper.createFolder(JcrHelper.java:430) at org.artifactory.jcr.JcrHelper.getOrCreateFolderNode(JcrHelper.java:456) at org.artifactory.jcr.JcrHelper.createPath(JcrHelper.java:198) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:341) at org.artifactory.repo.JcrRepo$9.doInJcr(JcrRepo.java:333) at org.artifactory.jcr.JcrHelper.doInSession(JcrHelper.java:184) at org.artifactory.repo.JcrRepo.saveResource(JcrRepo.java:331) at org.artifactory.engine.UploadEngine.process(UploadEngine.java:158) at org.artifactory.webapp.servlet.RepoFilter.handleUploadRequest(RepoFilter.java:106) at org.artifactory.webapp.servlet.RepoFilter.doFilterInternal(RepoFilter.java:75) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:178) at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:72) at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:89) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:295) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:841) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:639) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)[]
    No Bugmate found.