Fórum

LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Kim Zeevaarders, modificado 7 Anos atrás.

LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
Hello,

Since the upgrade to Liferay 7 I get a lot of user reports stating that the WEBDAV functionality in Liferay 7 is not properly working.

To analyse these problems I downloaded a vanilla LR7 GA3 instance (tomcat bundle) icw a mySQL 5.6 DB. I then placed a document library portlet on the dashboard of the standard test user (test@liferay.com) and created a WEBDAV connection on Windows 7 using following url: http://localhost:8080/webdav/test/document_library/.

This all works perfectly and I can access the document library over the windows explore as if it was a mapped network drive.

The first problem that i encountered is reproducible by following the following steps (all done from within the windows explorer):
  • Add 10 (empty) text files to the root of the document library (http://localhost:8080/webdav/test/document_library/)
  • Create an empty test folder in the document root (http://localhost:8080/webdav/test/document_library/testfolder)
  • Move the 10 files from the document root to this test folder
  • CTRL-X and CTRL-V (cut and paste) these moved files back in the root (http://localhost:8080/webdav/test/document_library/)


Expectation is that these files are copied back to the root without problems.

However, nothing happens and I get an exception that is logged with WARN (?!) log level stating No Repository exists with the primary key 0:

08:34:56,368 WARN  [http-nio-8080-exec-6][WebDAVServlet:136] com.liferay.portal.kernel.webdav.WebDAVException: com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the key {repositoryId=0}
com.liferay.portal.kernel.webdav.WebDAVException: com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the key {repositoryId=0}
	at com.liferay.document.library.web.webdav.DLWebDAVStorageImpl.moveSimpleResource(DLWebDAVStorageImpl.java:783)
	at com.liferay.portal.webdav.methods.MoveMethodImpl.process(MoveMethodImpl.java:78)
	at com.liferay.portal.webdav.WebDAVServlet.service(WebDAVServlet.java:117)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.security.sso.ntlm.internal.servlet.filter.NtlmPostFilter.processFilter(NtlmPostFilter.java:107)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:303)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:260)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:115)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: com.liferay.portal.kernel.exception.NoSuchGroupException: No Group exists with the key {repositoryId=0}
	at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.getRepository(DLAppServiceImpl.java:3045)
	at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.getFolderRepository(DLAppServiceImpl.java:3026)
	at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.moveFileEntry(DLAppServiceImpl.java:2078)
	at sun.reflect.GeneratedMethodAccessor1383.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
	at com.sun.proxy.$Proxy122.moveFileEntry(Unknown Source)
	at com.liferay.document.library.web.webdav.DLWebDAVStorageImpl.moveSimpleResource(DLWebDAVStorageImpl.java:747)
	... 78 more
Caused by: com.liferay.portal.kernel.repository.InvalidRepositoryIdException: No Repository exists with the primary key 0
	at com.liferay.portal.repository.RepositoryProviderImpl.checkRepository(RepositoryProviderImpl.java:350)
	at com.liferay.portal.repository.RepositoryProviderImpl.getRepository(RepositoryProviderImpl.java:272)
	at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.getRepository(DLAppServiceImpl.java:3036)
	... 98 more


This problem is 100% reproducible in a vanilla liferay 7GA3 instance. Can anybody from the Liferay staff please confirm this is a bug? If so, I will create a ticket for it.

Regards,

Kim
Kim Zeevaarders, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
I analzyed the problem a little bit further and pinpointed the exact location of the error.

The call stack is as follows:
  • first DLWebDAVStorageImpl.moveSimpleResource is called.
  • at the the end of this method _dlAppService.moveFileEntry is called (impl=DLAppServiceImpl)
  • this method first determines the fromRepository and toRepository and the determination of the toRepository throws an exception
  • for the determination of the toRepository the internal method method getFolderRepository() is called
  • because the folderId is 0 (default parent folder id) it then calls the internal method getRepository()
  • this method then tries to find a repository with repositoryId=0 since it uses the groupId from the servicecontext (this is 0) as the repositoryId.
  • because there is no repo with id= 0 in the db , it then throws a NoSuchGroupException: No Group exists with the key {repositoryId=0), and the mnove action is aborted. This exception is only visible with WARN logging,

    This confirms my expectation that the problem only occurs when moving resources back to the ROOT of the document library of the corresponding site. when moving files to anywhere other than the document library root, the problem does not occur.

    It is very clear in the code that a different path is taken for dertemining the repo if the root folder is involved:

    	
    protected Repository getFolderRepository(long folderId, long groupId)
    		throws PortalException {
    
    		if (folderId == DLFolderConstants.DEFAULT_PARENT_FOLDER_ID) {
    			return getRepository(groupId);
    		}
    
    		return repositoryProvider.getFolderRepository(folderId);
    	}


Hoping anyone from the liferay team can confirm this problem and point me to a potential solution. Is it correct that the groupId is 0 in the servicecontext?

Hope to hear from you all.

Regards,

Kim

Ps. This is not the only problem i've encountered with the document library. I also get optimisticlockexceptions when moving multiple files from one directory to the other. Unlike the problem in described in this thread this causes files to dissapear completely! Any other users experiencing WEBDAV problems in LR7? Please post them in this thread! I will start a new thread for this problem as soon as we get any further with the problem described in this thread..
Kim Zeevaarders, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
After some further testing I noticed that this problem does not occur while moving folders (instead of files). If I debug a move-folder operation, I can see the same exception occuring in the DLAppServiceImpl.moveCollectionResource() operation, but after this exception a second and third action are executed that subsequently insert the folder in the new location and delete the folder from the old location.


So summarize I see the following WEBDAV Methods being called in the move-folder scenario:
* MoveMethodImpl.process --> this throws an exception (leading to a http-412 webdav error)
* MkcolMethodImpl.process --> created the folder in the new location
* DeleteMethodImpl --> delete the folder from the old location

NB. If i move a folder to another directory that is not the root dir, only the MoveMethodImpl is called since the exception is not thrown in this case and the action executes succesfully

So in essence the second and third WEBDAV methods (MKcol, Delete) cloak the exception thrown in the Move action.

When I debug the same scenario (copy file to from dl-subdir to dl-root) with a file instead of a folder, I cannot see the second and third action being executed. Why is this? Is this part of the WEBDAV protocol and if so, why does it react different if the entity is a folder insead of a file?

This insert-delete action following a failed move action is probably the reason why the exception is logged with WARN, seeing that it is somewhat expected by the developer who probably knows that after the unsucessfull move a succesfull 'workaround" (insert-delete) is done.

Anyways, I have a hard time debugging this behaviour and the code flow is unintuitive at best.
Kim Zeevaarders, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
Does really nobody have this problem with WEBDAV on LR7?
thumbnail
Milen Dyankov, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Expert Postagens: 310 Data de Entrada: 30/10/12 Postagens Recentes
Kim Zeevaarders:
Does really nobody have this problem with WEBDAV on LR7?


I'd say it's very likely that not a lot of users deal with the exact flow you describe. That said, given the investigation you've done and having the exact steps to reproduce it, I'd encourage you to open an issue for this in https://issues.liferay.com
thumbnail
Sergio González, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Expert Postagens: 301 Data de Entrada: 07/01/10 Postagens Recentes
Hey Kim,

I'm sorry about the issue you're having regarding WebDav. Looking at the stacktrace and the information you provided (which is really useful btw) the issue seems to be located in the DLWebDAVStorageImpl.

In DLAppServiceImpl the method getFolderRepository(long folderId, long groupId) could receive a folderId 0 but the groupId should never be 0. That's the issue. We need to populate the serviceContext with the groupId information.

The fix should be easy: in DLWebDAVStorageImpl, in the method populateServiceContext we need to include the groupId information in the serviceContext. It should read something like this (the fix is the first line setting the scopeGroupId in the serviceContext):


	protected void populateServiceContext(
		ServiceContext serviceContext, FileEntry fileEntry) {
		
		serviceContext.setScopeGroupId(fileEntry.getGroupId());

		String className = DLFileEntryConstants.getClassName();

		long[] assetCategoryIds = _assetCategoryLocalService.getCategoryIds(
			className, fileEntry.getFileEntryId());

		serviceContext.setAssetCategoryIds(assetCategoryIds);

		AssetEntry assetEntry = _assetEntryLocalService.fetchEntry(
			className, fileEntry.getFileEntryId());

		List<assetlink> assetLinks = _assetLinkLocalService.getLinks(
			assetEntry.getEntryId());

		long[] assetLinkEntryIds = ListUtil.toLongArray(
			assetLinks, AssetLink.ENTRY_ID2_ACCESSOR);

		serviceContext.setAssetLinkEntryIds(assetLinkEntryIds);

		String[] assetTagNames = _assetTagLocalService.getTagNames(
			className, fileEntry.getFileEntryId());

		serviceContext.setAssetTagNames(assetTagNames);

		ExpandoBridge expandoBridge = fileEntry.getExpandoBridge();

		serviceContext.setExpandoBridgeAttributes(
			expandoBridge.getAttributes());
	}
</assetlink>


Could you please check if this fixes the issue? Did you create an LPS ticket for this in issues.liferay.com? If so, let us know so we can commit the code for the fix.

Thanks!
Kim Zeevaarders, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
Sergio González:


Could you please check if this fixes the issue? Did you create an LPS ticket for this in issues.liferay.com? If so, let us know so we can commit the code for the fix.


Hi Sergio, first of all thanks for your eloborate response! I am gonna try this asap (somewhere next week) and will also create a ticket for it in the process.

Hope it solves the problem emoticon

Are you in any case also familiar with the StaleStateException/OptimisticLockExceptions that are thrown (randomly) by Hibernate when moving multiple files? These exceptions are actually causing the most pain in our environment. Why? Because when these exceptions occur the relevant file(s) become corrupt. Meaning, I can still see the file listed over the WEB-GUI and over WEBDAV, but it's actual contents are gone. The exception looks like this:

07:09:29,991 ERROR [http-nio-8080-exec-8][GetMethodImpl:59] com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20116, repositoryId=20166, fileName=527, cause=java.io.FileNotFoundException: C:\liferay-ce-portal-7.0-ga3\data\document_library\20116\20166\527\1.0 (Das System kann den angegebenen Pfad nicht finden)}


I will try to reproduce and directly create as a ticket as this is causing me quite some pain and kritique at work...

Would there still be time for this to get fixed in LR7GA4 emoticon?

Regards,

Kim
The Netherlands
Kim Zeevaarders, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
Here's the exact stacktrace of the StaleStateException:

9:09:21,710 ERROR [http-nio-8080-exec-7][AbstractBatcher:73] Exception executing batch: 
org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
	at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85)
	at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70)
	at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:90)
	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:662)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:41)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:93)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
	at com.sun.proxy.$Proxy122.moveFileEntry(Unknown Source)
	at com.liferay.document.library.web.webdav.DLWebDAVStorageImpl.moveSimpleResource(DLWebDAVStorageImpl.java:747)
	at com.liferay.portal.webdav.methods.MoveMethodImpl.process(MoveMethodImpl.java:78)
	at com.liferay.portal.webdav.WebDAVServlet.service(WebDAVServlet.java:117)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.security.sso.ntlm.internal.servlet.filter.NtlmPostFilter.processFilter(NtlmPostFilter.java:107)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:303)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:260)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:115)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
09:09:21,725 ERROR [http-nio-8080-exec-7][DefaultTransactionExecutor:45] Application exception overridden by commit exception
org.springframework.orm.hibernate3.HibernateOptimisticLockingFailureException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested exception is org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
	at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:701)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:800)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:670)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.commit(DefaultTransactionExecutor.java:41)
	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:93)
	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
	at com.sun.proxy.$Proxy122.moveFileEntry(Unknown Source)
	at com.liferay.document.library.web.webdav.DLWebDAVStorageImpl.moveSimpleResource(DLWebDAVStorageImpl.java:747)
	at com.liferay.portal.webdav.methods.MoveMethodImpl.process(MoveMethodImpl.java:78)
	at com.liferay.portal.webdav.WebDAVServlet.service(WebDAVServlet.java:117)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.security.sso.ntlm.internal.servlet.filter.NtlmPostFilter.processFilter(NtlmPostFilter.java:107)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.uploadservletrequest.UploadServletRequestFilter.processFilter(UploadServletRequestFilter.java:93)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:303)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.jsoncontenttype.JSONContentTypeFilter.processFilter(JSONContentTypeFilter.java:42)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:142)
	at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:260)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
	at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)
	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
	at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:115)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1
	at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:85)
	at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:70)
	at org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:90)
	at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70)
	at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:268)
	at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:185)
	at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
	at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
	at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
	at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:383)
	at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:133)
	at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:662)
	... 95 more
Kim Zeevaarders, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
Sergio González:

Could you please check if this fixes the issue? Did you create an LPS ticket for this in issues.liferay.com? If so, let us know so we can commit the code for the fix.
Thanks!


Hi Sergio,

I tried it today and it indeeds fixes the problem! I created a ticket for this with your suggested solution here: LPS-70432

However, during my tests i am severely hindered by the StaleObjectExceptions thrown by hibernate. These exceptions are now reproducable by performing the exact same test step as for the problem in this ticket. They are driving me mad!

The Exception is thrown by the moveSimpleResourceMethod on line 747:

if (fileEntry.getFolderId() != newParentFolderId) {
				fileEntry = _dlAppService.moveFileEntry(
					fileEntry.getFileEntryId(), newParentFolderId,
					serviceContext);
			}


Hopwe you can point me into a ptoential solution, thanks!

PS. for the exact stacktrace see above post.
Kim Zeevaarders, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
Created a ticket for this problem also: LPS-70437
thumbnail
Sergio González, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Expert Postagens: 301 Data de Entrada: 07/01/10 Postagens Recentes
Hey Kim,

Thanks for the update and for creating those 2 tickets. I'm glad that the fix works for you emoticon We'll work on the ticket you created to include the solution in the code.

Regarding the other issue you're reporting it seems that is caused by a concurrency, that's why it seems pseudorandom. I have a few questions to understand more the issue:
  • In order to reproduce the issue, did you have to move files back and forth very quickly?
  • Did it also happen if you move the folders slowly, giving time to the server to process it?
  • Were you able to reproduce the issue in any other environment (any other windows version)?


It seems that when a thread is trying to update the database, the status of this changed, so the query fails.

Regarding the corrupted files, when the error has already occurred, what happens when you try to browse the folders? Can you see the documents? Can you see them from the browser? Can you download them? Do you get any console error that can give us more details about what's happening?

Thanks in advance for your time Kim!
Kim Zeevaarders, modificado 7 Anos atrás.

RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
Sergio González:
  • In order to reproduce the issue, did you have to move files back and forth very quickly?
  • Did it also happen if you move the folders slowly, giving time to the server to process it?
  • Were you able to reproduce the issue in any other environment (any other windows version)?



  • Hi Sergio,

    1. Nope. This is reproducable by selecting multiple files (i can reproduce with 10 file, perhaps also with less) with CTRL-A and "moving" them to a different folder at once.
    2. The problem occurs when moving the files to a different folder. It has nothing to do with the speed in which you perform the action. By moving ten files directly, ten WEBDAV Requests are fired and the order in which they are executed triggers some kind of race condition (i presume).
    3. No, I only reproduced this on Windows 7...



    Regarding the corrupted files, when the error has already occurred, what happens when you try to browse the folders? Can you see the documents? Can you see them from the browser? Can you download them? Do you get any console error that can give us more details about what's happening?


    The problem does not occur with folders, only with files. If the problem occurs, the file is still visible in the WEBDAV (as if it seems ok) but if you try to open you get the message that the file does not exist (view attachment "file corrupt")

    Furthermore if you look at the file over the GUI you can see that all metadata is available as if nothing is wrong (view "meta-data-still-available" attachment).

    However, if you click the download link you get the following exception (view attachment "click-on-download") and corresponding stacktrace:

    17:31:06,879 ERROR [http-nio-8080-exec-5][GetMethodImpl:59] com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20116, repositoryId=30860, fileName=117, cause=java.io.FileNotFoundException: C:\lr\liferay-ce-portal-7.0-ga3\da
    ta\document_library\20116\30860\117\1.0 (Das System kann den angegebenen Pfad nicht finden)}
    17:33:43,010 WARN  [liferay/document_library_raw_metadata_processor-1][RawMetadataProcessorMessageListener:38] Unable to save metadata for file version 33322
    com.liferay.document.library.kernel.exception.NoSuchFileException: {companyId=20116, repositoryId=30860, fileName=117, version=1.0}
            at com.liferay.portal.store.file.system.FileSystemStore.getFile(FileSystemStore.java:224)
            at com.liferay.document.library.internal.store.IgnoreDuplicatesStore.getFile(IgnoreDuplicatesStore.java:161)
            at com.liferay.portal.store.safe.file.name.wrapper.SafeFileNameStoreWrapper$SafeFileNameStore.getFile(SafeFileNameStoreWrapper.java:216)
            at com.liferay.portlet.documentlibrary.store.DLStoreImpl.getFile(DLStoreImpl.java:252)
            at com.liferay.document.library.kernel.store.DLStoreUtil.getFile(DLStoreUtil.java:325)
            at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:1087)
            at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.getFile(DLFileEntryLocalServiceImpl.java:1070)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:498)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:153)
            at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:85)
            at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:58)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.RetryAdvice.invoke(RetryAdvice.java:46)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.service.ServiceContextAdvice.invoke(ServiceContextAdvice.java:40)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
            at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:127)
            at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:173)
            at com.sun.proxy.$Proxy81.getFile(Unknown Source)
            at com.liferay.document.library.kernel.service.DLFileEntryLocalServiceUtil.getFile(DLFileEntryLocalServiceUtil.java:476)
            at com.liferay.portal.repository.liferayrepository.model.LiferayFileVersion.getFile(LiferayFileVersion.java:147)
            at com.liferay.portlet.documentlibrary.util.RawMetadataProcessorImpl.saveMetadata(RawMetadataProcessorImpl.java:131)
            at com.liferay.document.library.kernel.util.RawMetadataProcessorUtil.saveMetadata(RawMetadataProcessorUtil.java:113)
            at com.liferay.portlet.documentlibrary.messaging.RawMetadataProcessorMessageListener.doReceive(RawMetadataProcessorMessageListener.java:34)
            at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
            at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
            at com.liferay.portal.kernel.messaging.SerialDestination$1.run(SerialDestination.java:58)
            at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756)
            at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667)
    thumbnail
    Adolfo Pérez, modificado 7 Anos atrás.

    RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

    New Member Postagens: 4 Data de Entrada: 04/03/14 Postagens Recentes
    Hi Kim,

    I've been unable to reproduce this on my machine (using Win 7), but I think I have an idea of what is happening here. The StaleStateException may indicate an inconsistency between Hibernate's Session cache and the actual state in the database (i.e. another transaction modified and committed a change). So, it seems all WebDAV threads are trying to update an unknown row/object in parallel, and sometimes there's conflict.

    By examining the code, the main suspect is the target folder (when moving a file to a new folder, the target folder modifiedDate is updated). Problem is, as I cannot reproduce the problem I have no way of testing this. So I need your help :-)

    Could you apply this little change to the DLFileEntryLocalServiceImpl class and try to reproduce the problem again? You need to replace the block of code after the "// Folder" comment (The change goes around here )

    
    			// Folder
    
    			if (!checkedOut &amp;&amp;
    				(dlFileEntry.getFolderId() !=
    					DLFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
    
    				long folderId = dlFileEntry.getFolderId();
    
    				TransactionCommitCallbackUtil.registerCallback(() -&gt; {
    					dlFolderLocalService.updateLastPostDate(
    						folderId, serviceContext.getModifiedDate(now));
    
    					return null;
    				});
    			}
    


    Note that this change won't prevent the updateLastPostDate call from failing, but at least it won't abort the main transaction, and you won't lose any data. The worst that will happen is that the parent folder modifiedDate may not reflect the latest change, but that's not really a problem, as we can guarantee that at least 1 move operation will update the date.

    Thanks a lot and sorry for the trouble.
    Kim Zeevaarders, modificado 7 Anos atrás.

    RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

    Junior Member Postagens: 82 Data de Entrada: 07/09/12 Postagens Recentes
    Adolfo Pérez:

    I've been unable to reproduce this on my machine (using Win 7), but I think I have an idea of what is happening here.
    .


    Hi Adolfo,

    I find it very strange that you cannot reproduce the problem. In my vanilla setup it occurs almost direct when I try to move 10 files to a different folder.


    Adolfo Pérez:

    Could you apply this little change to the DLFileEntryLocalServiceImpl class and try to reproduce the problem again?
    .


    After applying your fix (which I needed to adjust slightly because some of the properties wheren't effectivly final in the lambda) the problem still occurs.

    This is what i made of your fix for it to compile:

    			if (!checkedOut &amp;&amp; (dlFileEntry.getFolderId() != DLFolderConstants.DEFAULT_PARENT_FOLDER_ID)) {
    
    				final long folderId = dlFileEntry.getFolderId();
    				final ServiceContext serviceContextFin = serviceContext;
    				final Date nowFin = now;
    
    				TransactionCommitCallbackUtil.registerCallback(() -&gt; {
    					dlFolderLocalService.updateLastPostDate(folderId, serviceContextFin.getModifiedDate(nowFin));
    
    					return null;
    				});
    			}
    


    Could you please tell me how your are exactly trying to reproduce the problem?

    Many thanks!
    thumbnail
    Sharon Choi, modificado 7 Anos atrás.

    RE: LR7 GA3: WEBDAV problems I: No Repository exists with the primary key 0

    New Member Mensagem: 1 Data de Entrada: 26/09/12 Postagens Recentes
    Hi Kim,

    Thanks for the detailed report, I have been able to reproduce your issue, and have made notes of the observations there: https://issues.liferay.com/browse/LPS-70437.