<div dir="ltr">Hi<br>I am working on OpenCms 6.2.3 .I am trying to create a folder in
OPencms using java API call. but i am getting the following error.I
manually deleted the locks from CMS_EXCLUSIVE_LOCKS table but still i
am getting this exception .I am not getting why it its giving me the
error.Piece of code which is throwing this error is :-<br>
<br>websiteEntityFolderPath = userSitesUnderNode + FOLDER_SEPARATOR + modifiedWebsiteEntityName;<br> <br> if (!(cmsObj.existsResource(<div dir="ltr">websiteEntityFolderPath, CmsResourceFilter.IGNORE_EXPIRATION))) {<br>
<span style="color: rgb(255, 0, 0);"> cmsObj.createResource(websiteEntityFolderPath, CmsResourceTypeFolder.RESOURCE_TYPE_ID);</span><br><br> // Add folderName property to the newly created resources<br>
// -userfolder.<br> CmsProperty websiteEnityFolderNameProp = new CmsProperty();<br> websiteEnityFolderNameProp.setName(FOLDER_NAME);<br> websiteEnityFolderNameProp.setAutoCreatePropertyDefinition(true);<br>
websiteEnityFolderNameProp.setValue(modifiedWebsiteEntityName, CmsProperty.TYPE_INDIVIDUAL);<br> cmsObj.lockResource(websiteEntityFolderPath);<br> cmsObj.writePropertyObject(websiteEntityFolderPath, websiteEnityFolderNameProp);<br>
<br><br>------<br>--<br>--<br><br><br>The exception is given below-<br>If somone has already met with such problem please point me where i am wrong.<br><br><br>CmsException in creating WebsiteFolder<br>org.opencms.lock.CmsLockException: Error creating the resource "/sites/default/Root/usersites/web/".<br>
at org.opencms.lock.CmsLockException.createException(CmsLockException.java:78)<br> at org.opencms.db.CmsDbContext.throwException(CmsDbContext.java:213)<br> at org.opencms.db.CmsDbContext.report(CmsDbContext.java:197)<br>
at org.opencms.db.CmsSecurityManager.createResource(CmsSecurityManager.java:1094)<br> at org.opencms.file.types.A_CmsResourceType.createResource(A_CmsResourceType.java:303)<br> at org.opencms.file.types.A_CmsResourceTypeFolderBase.createResource(A_CmsResourceTypeFolderBase.java:171)<br>
at org.opencms.file.CmsObject.createResource(CmsObject.java:621)<br> at org.opencms.file.CmsObject.createResource(CmsObject.java:601)<br> at com.dorado.cmsserver.util.MyUtil.createWebsiteEntity(MyUtil.java:3195)<br>
at com.dorado.cmsserver.processor.CmsGatewayRequestProcessor.createWebsiteEntity(CmsGatewayRequestProcessor.java:419)<br> at com.dorado.cmsserver.servlet.CmsGatewayServlet.processRequest(CmsGatewayServlet.java:326)<br>
at com.dorado.cmsserver.servlet.CmsGatewayServlet.doPost(CmsGatewayServlet.java:359)<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)<br> at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)<br>
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)<br> at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)<br> at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)<br>
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)<br> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)<br> at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:164)<br>
at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:141)<br> at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:90)<br> at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:406)<br>
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)<br> at com.dorado.cmsserver.servlet.CmsGatewayFilter.doFilter(CmsGatewayFilter.java:39)<br> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)<br>
at com.dorado.cmsserver.servlet.SiteHandlerFilter.doFilter(SiteHandlerFilter.java:70)<br> at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)<br> at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3151)<br>
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)<br> at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)<br> at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)<br>
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)<br> at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)<br> at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)<br>
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)<br>Caused by: org.opencms.lock.CmsLockException: Resource "/sites/default/Root/usersites/web/" is already locked by another user.<br> at org.opencms.lock.CmsLockManager.addResource(CmsLockManager.java:184)<br>
at org.opencms.db.CmsDriverManager.lockResource(CmsDriverManager.java:4001)<br> at org.opencms.db.CmsDriverManager.createResource(CmsDriverManager.java:1703)<br> at org.opencms.db.CmsDriverManager.createResource(CmsDriverManager.java:1785)<br>
at org.opencms.db.CmsSecurityManager.createResource(CmsSecurityManager.java:1092)<br></div></div>