Issue
- We configured the Advanced File System Store and performed the Documents Migration.
- At the end of the process we see that the directory structure was created, however, the folders are empty.
-
When starting Liferay, the following error is written to the log file::
ERROR [https-openssl-apr-443-exec-10][ImageImpl:87] Unable to read image 41102
com.liferay.document.library.kernel.exception.NoSuchFileException: ...
...
Caused by: java.io.FileNotFoundException
Environment
- Liferay DXP 7.4
Resolution
WARNING! The error may happen due to several reasons, the one that follows is only one of the possible scenarios. If the below solution is not applicable to your case or it won't work, please, reach out to Liferay Support by raising a new ticket @ https://help.liferay.com/hc/requests/new.
- Please make sure you follow these steps:
- Stop the application server.
-
Create a file in
$LIFERAY_HOME/osgi/configs
folder calledcom.liferay.portal.store.file.system.configuration.AdvancedFileSystemStoreConfiguration.config
The content of this file points to the document_library folder where the store is created.
Its default value is:rootDir="data/document_library"
Set the appropriate value for your environment, for example:
rootDir="afss/document_library"
Note that the value must be enclosed in quotation marks and must not begin with slash. - Make sure you don't have this property set in the
portal-ext.properties
file:dl.store.impl=com.liferay.portal.store.file.system.AdvancedFileSystemStore
If the property exists and is defined this way, remove or comment it out. - Start the application server.
- In the Control Panel, navigate to Configuration → System Settings → File Storage
- In the Advanced File System Store screen, confirm that the Root Directory to your Liferay Home path is set correctly.
- In the Control Panel, navigate to Server Administration → Data Migration
- Select the repository hook (store implementation class):
com.liferay.portal.store.file.system.AdvancedFileSystemStore
-
Click Execute.
The UI will show the following message during the process:The system is currently undergoing maintenance.
When the process is complete, the portal will return to the home screen and the log will show this message:
Finished conversion for com.liferay.document.library.internal.convert.document.library.DocumentLibraryConvertProcess in 158450 ms
- Stop the application server.
- Clean up the cache folders within DXP's
{$LIFERAY_HOME}
:-
Delete the
$LIFERAY_HOME/osgi/state
folder. -
Empty the
$LIFERAY_HOME/Work
folder -
Empty the
$LIFERAY_HOME/tomcat-version/temp
folder -
Empty the
$LIFERAY_HOME/tomcat-version/work
folder
-
Delete the
- Set the following property in the
portal-ext.properties
file:dl.store.impl=com.liferay.portal.store.file.system.AdvancedFileSystemStore
- Start the application server.