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

NullPointerException when Accessing Legacy URLs to Document Library Assets in 6.1 GA2

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
    • Fix Version/s: 6.1.30 EE GA3, 6.2.0 CE M2
    • Component/s: DM
    • Labels:
    • Branch Version/s:
      6.1.x
    • Backported to Branch:
      Committed
    • Liferay Contributor's Agreement:
      Accept

      Description

      ISSUE
      Following an upgrade from Liferay 5.2 to 6.1 GA2, links generated by 5.2 to Document Library assets generates a NullPointerException and directs the browser to an "Internal Server Error" page.

      STEPS TO REPRODUCE
      Start off with clean Liferay 5.2 bundle connected to MySQL 5.5 db named "test"; portal-ext links db "test" and the following properties are added: "dl.hook.file.system.root.dir=F:/TEST" and "image.hook.impl=com.liferay.portal.image.DatabaseHook"

      1. Login with test
      2. Add Document Library (referenced hereafter as "DL Portlet")
      3. Add Folder to DL Portlet named Test
      4. Select Test folder, add document "test.pdf"
      5. test.pdf's URL is set as
      http://localhost:8080/c/document_library/get_file?p_l_id=10139&folderId=10166&name=DLFE-2.pdf
      6. Shutdown Server
      7. Copy portal-ext.properties to clean 6.1 GA 2 bundle, change the properties permissions.user.check.algorithm=5 and dl.store.file.system.root.dir=F:/TEST
      8. Upgrade takes place to db "test" as seen in console
      9. Convert via Data Migration in Control Panel, Shutdown Server after startup, change permissions.user.check.algorithm=6 and restart.
      10. "test.pdf" appears in Documents and Media Portlet ("DM Portlet") in their respective folders
      11. Attempt to access "test.pdf" via legacy link:
      http://localhost:8080/c/document_library/get_file?p_l_id=10139&folderId=10166&name=DLFE-2.pdf
      12. Internal Server Error appears and stack trace shows NPE:
      22:30:16,457 ERROR [http-bio-8080-exec-2][status_jsp:665] java.lang.NullPointerException
      java.lang.NullPointerException}}
      13. Check URL in DM Portlet, functional link to test.pdf exists at the following address:
      http://localhost:8080/documents/10136/10166/test.pdf/449a6b8b-6f2d-420f-b615-283099c3d752

      EXPECTED RESULTS
      Using legacy 5.2 link would reroute Document Library assets to new 6.1 link

      ACTUAL RESULTS
      Using legacy 5.2 link generates NullPointerException and shows Internal Server Error Page; however, the newly generated link works fine.

      TESTS IN TRUNK (124771)
      Not reproducible because I was unable to upgrade to Trunk.

      TESTS IN BRANCH (124771)
      Generates same behavior where we receive an NullPointerException and "Internal Server Error" page.

      OTHER NOTES
      I have tested a scenario upgrading 5.2 -> 6.0 -> 6.1. The legacy link generated in 5.2 works in 6.0, but once upgraded to 6.1 or Trunk, the legacy link no longer functions.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 39 weeks ago