Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: No Longer Reproducible
-
Affects Version/s: 6.1.0 CE RC1
-
Fix Version/s: --Sprint 11/12, 6.2.0 CE M2
-
Labels:None
-
Environment:JBoss 7.1 CR1b
Centos 5
SqlServer 2008
-
Similar Issues:
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); }

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