Images and document not visible after migration to liferay 6.1.0 GA1

青春壹個敷衍的年華 提交于 2019-12-12 00:57:24

问题


I upgrade from liferay 5.2.3 to 6.0.6 , it was successfully done without any error left; but when I upgrade from 6.0.6 to 6.1.0 GA1, unable to see the images and documents. Steps related to images and documents I have done during migration(only related to documents are described).

during migration to 6.0.6 I wrote following lines to my portal-ext.prropeties file

image.hook.impl=com.liferay.portal.image.FileSystemHook
image.hook.file.system.root.dir=${liferay.home}/data/images
dl.hook.impl=com.liferay.documentlibrary.util.FileSystemHook
dl.hook.file.system.root.dir=${liferay.home}/data/document_library

I know in liferay 5.2.3 we have saved the images and documents to file system. after this I start the server and migrated legacy permission to 6. It was successful , I was able to see the documents and images.

Now it turn to migrate from 6.0.6 to 6.1.0 GA1 , for that I wrote in these lines

image.hook.impl=com.liferay.portal.image.FileSystemHook
image.hook.file.system.root.dir=${liferay.home}/data/images
dl.hook.impl=com.liferay.documentlibrary.util.FileSystemHook
dl.hook.file.system.root.dir=${liferay.home}/data/document_library

start tomcat, migrate permissions to 6, after successful migration , re start the server but unable to see the documents and images. when ever trying to access the file in contents getting this error in tomcat console

 Current URL /c/document_library/get_file?uuid=be4eecc7-8e9a-416c-aa4d-f3cbd855d759&groupId=14 generates exception: No file versions found for fileEntryId 61901
05:50:48,093 INFO  [PortalImpl:4894] com.liferay.portlet.documentlibrary.NoSuchFileVersionException: No file versions found for fileEntryId 61901
com.liferay.portlet.documentlibrary.NoSuchFileVersionException: No file versions found for fileEntryId 61901
    at com.liferay.portlet.documentlibrary.service.impl.DLFileVersionLocalServiceImpl.getLatestFileVersion(DLFileVersionLocalServiceImpl.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

can any one suggest what I am missing ?


回答1:


image.hook.impl=com.liferay.portal.image.FileSystemHook
image.hook.file.system.root.dir=${liferay.home}/data/images
dl.hook.impl=com.liferay.documentlibrary.util.FileSystemHook
dl.hook.file.system.root.dir=${liferay.home}/data/document_library

is for telling liferay 6.1 from where to migrate documents and images

and to tell where to migrate them to you need to use new properties (this is what you were missing)

dl.store.impl=com.liferay.portlet.documentlibrary.store.FileSystemStore
dl.store.file.system.root.dir=/path/to/liferay6.1/document_library

Upgrade process will copy images and documents to new location (dl.store.file.system.root.dir) so be sure not to have same values for dl.hook.file.system.root.dir and dl.store.file.system.root.dir

EDIT

Above is for 6.1 EE.

For CE version only images should stay in original location and documents must manualy be moved/copied to new location.



来源:https://stackoverflow.com/questions/13303294/images-and-document-not-visible-after-migration-to-liferay-6-1-0-ga1

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!