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

Upgrade to 6.1 throws FileExtensionException in v6_0_12_to_6_1_0.UpgradeDocumentLibrary

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: 6.1.10 EE GA1, 6.2.0 CE M2
    • Component/s: None
    • Labels:
    • Environment:
      Oracle Enterprise Linux 5.5, Oracle 11.2 Database, Tomcat 6.0.32 (tcServer 2.6.1), JDK 1.6.0 Update 29

      Description

      Problem finding files as no extension value has been set on the dlFileVerssion object around line 216. This only shows up later once the system is validating the file for the DL Store (see stack trace).

      • Fix (works for me patch will be provided):
      Index: portal-impl/src/com/liferay/portal/upgrade/v6_0_12_to_6_1_0/UpgradeDocumentLibrary.java
      ===================================================================
      --- portal-impl/src/com/liferay/portal/upgrade/v6_0_12_to_6_1_0/UpgradeDocumentLibrary.java	(revision 102319)
      +++ portal-impl/src/com/liferay/portal/upgrade/v6_0_12_to_6_1_0/UpgradeDocumentLibrary.java	(working copy)
      @@ -214,6 +214,7 @@
       				dlFileVersion.setFileEntryId(fileEntryId);
       				dlFileVersion.setMimeType(mimeType);
       				dlFileVersion.setVersion(version);
      +				dlFileVersion.setExtension(extension);
       
       				if (_imageMimeTypes.contains(mimeType)) {
       					FileVersion fileVersion = new LiferayFileVersion(
      
      • Original stack trace:
      2012-03-01 06:21:10,488 [INFO ] [pool-2-thread-1] com.liferay.portal.kernel.upgrade.UpgradeProcess:? - Upgrading com.liferay.portal.upgrade.v6_0_12_to_6_1_0.UpgradeDocumentLibrary
      2012-03-01 06:21:30,098 [ERROR] [pool-2-thread-1] com.liferay.portlet.documentlibrary.util.ImageProcessorImpl:? - com.liferay.portlet.documentlibrary.FileExtensionException: document_thumbnail/0/181/93/1858997/1858998.
      com.liferay.portlet.documentlibrary.FileExtensionException: document_thumbnail/0/181/93/1858997/1858998.
      	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.validate(DLStoreImpl.java:517)
      	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.validate(DLStoreImpl.java:541)
      	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:92)
      	at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:171)
      	at com.liferay.portlet.documentlibrary.store.DLStoreUtil.addFile(DLStoreUtil.java:186)
      	at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.addFileToStore(DLPreviewableProcessor.java:200)
      	at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.storeThumbnailmage(DLPreviewableProcessor.java:1001)
      	at com.liferay.portlet.documentlibrary.util.DLPreviewableProcessor.storeThumbnailImages(DLPreviewableProcessor.java:959)
      	at com.liferay.portlet.documentlibrary.util.ImageProcessorImpl._generateImages(ImageProcessorImpl.java:263)
      	at com.liferay.portlet.documentlibrary.util.ImageProcessorImpl.generateImages(ImageProcessorImpl.java:85)
      	at com.liferay.portlet.documentlibrary.util.ImageProcessorUtil.generateImages(ImageProcessorUtil.java:38)
      	at com.liferay.portal.upgrade.v6_0_12_to_6_1_0.UpgradeDocumentLibrary.updateThumbnails(UpgradeDocumentLibrary.java:222)
      	at com.liferay.portal.upgrade.v6_0_12_to_6_1_0.UpgradeDocumentLibrary.updateThumbnails(UpgradeDocumentLibrary.java:178)
      	at com.liferay.portal.upgrade.v6_0_12_to_6_1_0.UpgradeDocumentLibrary.doUpgrade(UpgradeDocumentLibrary.java:81)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:227)
      	at com.liferay.portal.upgrade.UpgradeProcess_6_0_12_to_6_1_0.doUpgrade(UpgradeProcess_6_0_12_to_6_1_0.java:54)
      	at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:210)
      	at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:103)
      	at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:56)
      	at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:36)
      	at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:81)
      	at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:48)
      	at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:119)
      	at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:144)
      	at com.liferay.portal.ee.license.StartupAction.doRun(Unknown Source)
      	at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
      	at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1284)
      	at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:198)
      	at javax.servlet.GenericServlet.init(GenericServlet.java:160)
      	at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
      	at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1185)
      	at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1080)
      	at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5015)
      	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5302)
      	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:897)
      	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:873)
      	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
      	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
      	at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1581)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      	at java.lang.Thread.run(Thread.java:662)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              pani.gui Pani Gui (Inactive)
              Reporter:
              g.steyn Graeme Steyn
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 18 weeks, 4 days ago

                  Packages

                  Version Package
                  6.1.10 EE GA1
                  6.1.20 EE GA2
                  --Sprint 11/12
                  6.2.0 CE M2