java.io.FileNotFoundException after migration to Advanced File System Store

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:
    1. Stop the application server.
    2. Create a file in $LIFERAY_HOME/osgi/configs folder called
      com.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.
    3. 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.
    4. Start the application server.
    5. In the Control Panel, navigate to Configuration  System Settings  File Storage
    6. In the Advanced File System Store screen, confirm that the Root Directory to your Liferay Home path is set correctly.
    7. In the Control Panel, navigate to Server Administration → Data Migration
    8. Select the repository hook (store implementation class):
      com.liferay.portal.store.file.system.AdvancedFileSystemStore
    9. 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
    10. Stop the application server.
    11. Clean up the cache folders within DXP's {$LIFERAY_HOME}:
      1. Delete the $LIFERAY_HOME/osgi/state folder.
      2. Empty the $LIFERAY_HOME/Work folder
      3. Empty the $LIFERAY_HOME/tomcat-version/temp folder
      4. Empty the $LIFERAY_HOME/tomcat-version/work folder
    12. Set the following property in the portal-ext.properties file:
      dl.store.impl=com.liferay.portal.store.file.system.AdvancedFileSystemStore
    13. Start the application server. 

Additional Information

这篇文章有帮助吗?
1 人中有 1 人觉得有帮助