Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-37948

Liferay starts Data Migration eventhough incorrect settings to S3 are detected


    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 6.2.0 CE B1, 6.2.0 CE B3
    • Fix Version/s: 6.2.0 CE B1, 6.2.0 CE B3
    • Labels:
    • Environment:
      Tomcat 7 + MySQL 5. Portal 6.2.x GIT ID: ec77f5ae880599c1a977bd2f1f2990045d7f8ad5.
      Portal 6.2.0 CE B1 bundled with Tomcat 7.0.40, CentOS 2.6.32-358.6.2.el6.x86_64
    • Fix Priority:


      Data Migration from local storage to S3Store is started even though there is incorrect or missing setup for Amazon S3 in Liferay. Once migration completes, Liferay needs restart to get documents library back to operations.

      Steps to reproduce

      1. Set up clean Liferay portal (default file repository) and upload document to Documents Library. Verify that document is accessible.
      2. Don't setup or set incorrect login credentials to S3Store in portal-ext.properties.
      3. Launch Data migration to S3Store in Server / Server administration
      4. Watch logs/catalina.out:
        • If S3 aren't set
          07:33:59,621 ERROR [liferay/convert_process-1][S3Store:63] S3 access and secret keys are not set
        • If S3 has incorrect settings
          07:47:48,393 ERROR [liferay/convert_process-1][S3Store:63] S3 Error Message.
      5. Data migration is started although Liferay has detected the bad settings.
        • There are NullPointerExceptions thrown for
      6. Access originally uploaded document from Documents library.
      7. Once Data Migration is completed, it's not possible to use originally uploaded documents. #* At this point system throws NullPointerException.
         13:39:59,607 ERROR [http-bio-8080-exec-8][DLPreviewableProcessor:740] java.lang.NullPointerException
            at com.liferay.portlet.documentlibrary.store.S3Store.hasFile(S3Store.java:274) 

      Seems that system remembers that S3 should be used after migration, even though settings to S3 are not provided. User must restart whole Liferay in order to use default file repository again.

      First, it might be good to start migration process only when correct setup to S3 is provided.
      Second, if Data Migration fails, Liferay should not require restart in order for documents repository to be accessible.
      Third, NullPointerExceptions should be handled. (Will be reported as separate bugs).




            roberto.diaz Roberto Díaz
            jan.profiq Jan Hájovský (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            0 Vote for this issue
            3 Start watching this issue


              Days since last comment:
              7 years, 34 weeks, 5 days ago


                Version Package
                6.2.0 CE B1
                6.2.0 CE B3