掲示板

Checkin Fail when openoffice enable

9年前 に Muhammad Sarim によって更新されました。

Checkin Fail when openoffice enable

New Member 投稿: 1 参加年月日: 14/04/28 最新の投稿
Scenario detail
- Checkout RTF file
- Update RTF file
- CheckIn rtf file
- If OpenOffice is enable for thumbnail then throw Exception
- Otherwise update and checkin process working propely

com.liferay.portal.kernel.exception.SystemException: File name version file was not renamed from G:\liferay developer studio\liferay-portal-6.2.10.1-ee-ga1\data\document_library\10157\11423\4601\PWC to G:\liferay developer studio\liferay-portal-6.2.10.1-ee-ga1\data\document_library\10157\11423\4601\2.158
at com.liferay.portlet.documentlibrary.store.FileSystemStore.updateFileVersion(FileSystemStore.java:392)
at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.updateFileVersion(StoreProxyImpl.java:311)
at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.updateFileVersion(SafeFileNameStoreWrapper.java:461)
at com.liferay.portlet.documentlibrary.store.DLStoreImpl.updateFileVersion(DLStoreImpl.java:607)
at com.liferay.portlet.documentlibrary.store.DLStoreUtil.updateFileVersion(DLStoreUtil.java:698)
at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.checkInFileEntry(DLFileEntryLocalServiceImpl.java:404)
at sun.reflect.GeneratedMethodAccessor1449.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at $Proxy199.checkInFileEntry(Unknown Source)
at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryServiceImpl.checkInFileEntry(DLFileEntryServiceImpl.java:106)
at sun.reflect.GeneratedMethodAccessor1448.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at $Proxy200.checkInFileEntry(Unknown Source)
at com.liferay.portal.repository.liferayrepository.LiferayRepository.checkInFileEntry(LiferayRepository.java:204)
at com.liferay.portlet.documentlibrary.service.impl.DLAppServiceImpl.checkInFileEntry(DLAppServiceImpl.java:513)
at sun.reflect.GeneratedMethodAccessor1447.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:51)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:56)
at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
at $Proxy196.checkInFileEntry(Unknown Source)
at com.liferay.portlet.documentlibrary.service.DLAppServiceUtil.checkInFileEntry(DLAppServiceUtil.java:375)
at com.elixir.tango.helium.content.RtfContent.CheckInRTFContent(RtfContent.java:451)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1483)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1414)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1363)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1353)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:414)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
thumbnail
7年前 に Marco Azzalini によって更新されました。

RE: Checkin Fail when openoffice enable

Regular Member 投稿: 146 参加年月日: 14/11/18 最新の投稿
Hi, this thread is quite old but I have the very same problem with Liferay Portal 6.2 GA3.
I am investigating deeply the problem and I found that if the file is not too big (say, less 1 Mbyte), the process is completed successfully, otherwise it fails on renaming the PWC file.

Did you find any solution/workaround ? I need the OpenOffice preview generation so disabling it is not a solution for my business case.
If there were a way to instruct LR to make a copy of the file instead of renaming it, could be a solution.... but how ?

I saw that there is a bug still open on similar topic: https://issues.liferay.com/browse/LPS-53403

but it is 'in progress' since May 2015 :-(

Any help/ suggestion would be very very appreciable :-).
regards,
Marco
thumbnail
7年前 に Bryan Cheung によって更新されました。

RE: Checkin Fail when openoffice enable

Expert 投稿: 373 参加年月日: 04/08/27 最新の投稿
Hi Marco, thanks for putting out this issue with Liferay Portal 6.2 GA3. Did you get to search whether the issue is fixed in Liferay Portal 7.0?
thumbnail
7年前 に Marco Azzalini によって更新されました。

RE: Checkin Fail when openoffice enable

Regular Member 投稿: 146 参加年月日: 14/11/18 最新の投稿
Bryan Cheung:
Hi Marco, thanks for putting out this issue with Liferay Portal 6.2 GA3. Did you get to search whether the issue is fixed in Liferay Portal 7.0?


Hi Bryan, no I didn't check if the issue is fixed in LR 7.0 and at the moment I don't have time to set a 7.0 environment to test it by myself (maybe next week) but in the LPS-53403 is stated:

Affects Version/s: 6.2.10 EE GA1, 6.2.X EE, 7.0.0 M4

so also LR 7 could be affected by the same problem.
Unfortunately it seems also that there isn't (still) a version planned for the fix :-( so I am stuck on this problem and I really hope that this bug will be fix for both versions (6 and 7).

Regards,
Marco
thumbnail
7年前 に Bryan Cheung によって更新されました。

RE: Checkin Fail when openoffice enable

Expert 投稿: 373 参加年月日: 04/08/27 最新の投稿
Hi Marco, I talked to Jamie Sammons, our Community Manager, about this. He thought maybe this would provide the fix:

https://issues.liferay.com/browse/LPS-50958

What do you think?
thumbnail
7年前 に Marco Azzalini によって更新されました。

RE: Checkin Fail when openoffice enable

Regular Member 投稿: 146 参加年月日: 14/11/18 最新の投稿
Bryan Cheung:
Hi Marco, I talked to Jamie Sammons, our Community Manager, about this. He thought maybe this would provide the fix:

https://issues.liferay.com/browse/LPS-50958

What do you think?


Hi Bryan, first of all, thanks to your support!
I gave a try to Jamie suggestion but it didn't help on 6.2. In the meantime I drilled down in the source code, walking back through the stacktrace starting from the line 392 of FileSystemStore where the exception is thrown , till the DLStoreUtil where the move method is invoked and unfortunately the original IOException is lost

public boolean move(File source, File destination) {
try {
FileUtils.moveFile.....
}
catch (IOException ioe) {
return false;
}


I suspect the S.O. complains about that the file (PWC) is still lock/in use by someone else (maybe OpenOffice process) because the error happens only with large files.
Let me know if there are other things I can try to solve/alleviate the problem

Regards,
Marco
thumbnail
7年前 に Bryan Cheung によって更新されました。

RE: Checkin Fail when openoffice enable

Expert 投稿: 373 参加年月日: 04/08/27 最新の投稿
Hi Marco, so the issue only happens when you are trying to generate a preview on a large file check-in? I wonder if the preview could be generated after the check-in.
thumbnail
7年前 に Marco Azzalini によって更新されました。

RE: Checkin Fail when openoffice enable

Regular Member 投稿: 146 参加年月日: 14/11/18 最新の投稿
Bryan Cheung:
Hi Marco, so the issue only happens when you are trying to generate a preview on a large file check-in? I wonder if the preview could be generated after the check-in.


Hi Bryan, the postponing of the preview generation could help for sure but perhaps the problem concern the whole checkin operation with OO integration active.
I am saying this because in my portlet there is a custom action where the user, after locking the file, does these operations sequence:

1) the document is checked-out
2) some metadata are updated and other stuff
3) the document is checked-in (or it fails, if the file is big)

The content file is not even updated - so the preview could be already generated - but (probably) OpenOffice takes a look at the file anyway, preventing (3) to complete successfully.

Let me know what do you think about this my hypothesis

Marco
thumbnail
7年前 に Bryan Cheung によって更新されました。

RE: Checkin Fail when openoffice enable

Expert 投稿: 373 参加年月日: 04/08/27 最新の投稿
Hi Marco, I'm sorry that I don't have more ideas for now. Let me know if you discover anything in the source code!
thumbnail
7年前 に Marco Azzalini によって更新されました。

RE: Checkin Fail when openoffice enable

Regular Member 投稿: 146 参加年月日: 14/11/18 最新の投稿
Hi Bryan, I am sorry for the delay but I have been involved in some other projects. Anyway, in the meantime I got some time to further explore the problem and I found two major results:

1) OpenOffice integration is not the guilty or, at least, not the only one: we discovered indeed that the problem occurs also with OO integration switched off but using quite big MS Word or Excel file.
2)There is a sort of workaround! ;-) Using Linux on the Application server solves the problem! With Linux we are able to upload any file (no matter of the size) and get both succesfully checkin operation AND file preview.

This in some way seems confirm that it is related with the file system locking mechanism implemented on windows that prevents the checkin operation to complete (because the file rename operation from "PWC" to "2.0" fails).
In the next days I will try to examine deeper the problem on Windows...

bye
Marco
7年前 に Vlad Gets によって更新されました。

RE: Checkin Fail when openoffice enable

New Member 投稿: 8 参加年月日: 16/11/02 最新の投稿
Hi Marco Azzalini, thanks for this information
Marco Azzalini:
Hi Bryan, I am sorry for the delay but I have been involved in some other projects. Anyway, in the meantime I got some time to further explore the problem and I found two major results:

1) OpenOffice integration is not the guilty or, at least, not the only one: we discovered indeed that the problem occurs also with OO integration switched off but using quite big MS Word or Excel file.
2)There is a sort of workaround! ;-) Using Linux on the Application server solves the problem! With Linux we are able to upload any file (no matter of the size) and get both succesfully checkin operation AND file preview.

This in some way seems confirm that it is related with the file system locking mechanism implemented on windows that prevents the checkin operation to complete (because the file rename operation from "PWC" to "2.0" fails).
In the next days I will try to examine deeper the problem on Windows...

bye
Marco