PUBLIC - Liferay Portal Community Edition
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-24692

Upgrade to 6.1 failed on Document Library migration when using AdvancedFileSystemHook and generating thumbnails

    Details

    • Similar Issues:
      Show 4 results 

      Description

      I'm testing upgrade from 6.0.6 to 6.1 RC1, I'm getting a java.io.FileNotFoundException when the migration process is trying to generate the thumbnails for images stored on the document library.
      After some debug I found that it's caused for a piece of code that doesn't set the extension for the DLFileVersion object, and on the ImageProcessor class it's building the path based on the extension, but the extension is null, so the generated path for the AdvancedFileSystemHook is invalid for the OS, so the parent folder for the file isn't generated. These are the code pieces. You can see the wrong path generated on the image attached.

      //This is UpgradeDocumentLibrary.java line 448
      // NOT SETTING THE extension PROPERTY
      dlFileVersion.setFileVersionId(fileVersionId);
      dlFileVersion.setUserId(userId);
      dlFileVersion.setFileEntryId(fileEntryId);
      dlFileVersion.setMimeType(mimeType);
      dlFileVersion.setVersion(version);
      
      //This is ImageProcessor.java line 280
      // Using the getExtension() method from the FileVersion created before, but it returns null.
      private String _getType(FileVersion fileVersion) {
      		String type = fileVersion.getExtension();
      
      		if (type.equals("jpeg")) {
      			type = "jpg";
      		}
      
      		return type;
      	}
      
      //This is DLPreviewableProcessor.java line 331
      // Generating the path for the thumbnail using the concat(StringPool.PERIOD).concat(type) but type is null because the previous method returns null
      protected String getThumbnailFilePath(
      		FileVersion fileVersion, String type) {
      
      		return getPathSegment(fileVersion, false).concat(
      			StringPool.PERIOD).concat(type);
      	}
      

        Activity

        No builds found.
        Cristhian C Lopez created issue -
        Hide
        Cristhian C Lopez added a comment -

        Tested on the just released Liferay 6.1CE GA1 and it's no longer reproducible, this issue can be closed.

        Show
        Cristhian C Lopez added a comment - Tested on the just released Liferay 6.1CE GA1 and it's no longer reproducible, this issue can be closed.
        Hide
        Mika Koivisto added a comment -

        Resolving as no longer reproducible based on Cristhians last comment.

        Show
        Mika Koivisto added a comment - Resolving as no longer reproducible based on Cristhians last comment.
        Mika Koivisto made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 6.1.0 GA1 [ 10910 ]
        Resolution No Longer Reproducible [ 5 ]
        Hide
        Michael Saechang added a comment -

        Closed as per comments below.

        Show
        Michael Saechang added a comment - Closed as per comments below.
        Michael Saechang made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        QA Cannot be tested [ 10411 ]
        Fix Version/s 6.2.X [ 11316 ]
        Fix Version/s --Sprint 1/12 [ 11315 ]
        Fix Version/s 6.1.0 GA1 [ 10910 ]
        Andrew Kim made changes -
        Workflow LPS Workflow [ 289275 ] Copy of LPS Workflow [ 429955 ]
        Andrew Kim made changes -
        Workflow Copy of LPS Workflow [ 429955 ] LPS Workflow [ 461564 ]
        Edward Gonzales made changes -
        Component/s DM [ 14491 ]
        Andrew Kim made changes -
        Workflow LPS Workflow [ 461564 ] Copy 2 of LPS Workflow [ 493937 ]
        Andrew Kim made changes -
        Workflow Copy 2 of LPS Workflow [ 493937 ] LPS Workflow [ 525823 ]
        Edward Gonzales made changes -
        Component/s Tools > Plugins SDK > Hook [ 15291 ]
        Component/s Hooks [ 10299 ]
        Randy Zhu made changes -
        Workflow LPS Workflow [ 525823 ] PUBLIC - LPS Generic Workflow [ 577754 ]
        Randy Zhu made changes -
        Workflow PUBLIC - LPS Generic Workflow [ 577754 ] Copy of PUBLIC - LPS Generic Workflow [ 612063 ]
        Randy Zhu made changes -
        Workflow Copy of PUBLIC - LPS Generic Workflow [ 612063 ] PUBLIC - LPS Generic Workflow [ 643991 ]
        Randy Zhu made changes -
        Workflow PUBLIC - LPS Generic Workflow [ 643991 ] PUBLIC - LPS General Workflow [ 737309 ]
        Randy Zhu made changes -
        Workflow PUBLIC - LPS General Workflow [ 737309 ] PUBLIC - LPS Bugs Workflow [ 832618 ]
        Esther Sanz made changes -
        Component/s Tools > Plugins SDK [ 11769 ]
        Component/s Tools > Plugins SDK > Hook [ 15291 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2d 18h 39m 1 Mika Koivisto 09/Jan/12 10:43 AM
        Resolved Resolved Closed Closed
        20m 58s 1 Michael Saechang 09/Jan/12 11:03 AM

          People

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

            Dates

            • Created:
              Updated:
              Resolved:
              Days since last comment:
              3 years, 19 weeks, 4 days ago

              Development

                Structure Helper Panel