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

Cannot upgrade to 6.1 GA from 6.0.5 - com.liferay.portlet.documentlibrary.DuplicateFileException

    Details

      Description

      Steps to replicate :

      • Take clean liferay-portal-tomcat-6.0.5.zip, remove 7cogs, connect to a empty MySQL schema
      • portal-ext.properties

      image.hook.impl=com.liferay.portal.image.DatabaseHook

      ig.image.thumbnail.max.dimension=150
      #ig.image.custom1.max.dimension=100
      ig.image.custom2.max.dimension=600

      • Start
      • Login as test(admin), change the portrait
      • Create another user, use the Site Template with the Images to create pages, add an album, add some graphic files
      • Shutdown v6.0.5
      • Take liferay-portal-tomcat-6.1.0-ce-ga1-20120106155615760.zip, connect to same db, remove 7cogs, etc
      • portal-ext.properties

      image.hook.impl=com.liferay.portal.image.DatabaseHook
      image.hook.file.system.root.dir=${liferay.home}/data/images

      • Start
      • catalina.out
      07:34:07,139 INFO  [UpgradeProcess:205] Upgrading com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery
      07:34:08,283 ERROR [MainServlet:198] com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.DuplicateFileException: /opt/liferay/liferay-portal-6.1.0-ce-ga1.prod/data/document_library/10131/0/document_thumbnail/10435/248/10488/10501-2.jpg/1.0
      com.liferay.portal.kernel.events.ActionException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.DuplicateFileException: /opt/liferay/liferay-portal-6.1.0-ce-ga1.prod/data/document_library/10131/0/document_thumbnail/10435/248/10488/10501-2.jpg/1.0
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:58)
              at com.liferay.portal.servlet.MainServlet.processStartupEvents(MainServlet.java:1267)
              at com.liferay.portal.servlet.MainServlet.init(MainServlet.java:195)
              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:5001)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5289)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
              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)
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.DuplicateFileException: /opt/liferay/liferay-portal-6.1.0-ce-ga1.prod/data/document_library/10131/0/document_thumbnail/10435/248/10488/10501-2.jpg/1.0
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:211)
              at com.liferay.portal.upgrade.UpgradeProcessUtil._upgradeProcess(UpgradeProcessUtil.java:93)
              at com.liferay.portal.upgrade.UpgradeProcessUtil.upgradeProcess(UpgradeProcessUtil.java:46)
              at com.liferay.portal.events.StartupHelper.upgradeProcess(StartupHelper.java:81)
              at com.liferay.portal.events.StartupHelperUtil.upgradeProcess(StartupHelperUtil.java:40)
              at com.liferay.portal.tools.DBUpgrader.upgrade(DBUpgrader.java:119)
              at com.liferay.portal.events.StartupAction.doRun(StartupAction.java:144)
              at com.liferay.portal.events.StartupAction.run(StartupAction.java:52)
              ... 20 more
      Caused by: com.liferay.portal.kernel.upgrade.UpgradeException: com.liferay.portlet.documentlibrary.DuplicateFileException: /opt/liferay/liferay-portal-6.1.0-ce-ga1.prod/data/document_library/10131/0/document_thumbnail/10435/248/10488/10501-2.jpg/1.0
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:211)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:225)
              at com.liferay.portal.upgrade.UpgradeProcess_6_1_0.doUpgrade(UpgradeProcess_6_1_0.java:67)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:208)
              ... 27 more
      Caused by: com.liferay.portlet.documentlibrary.DuplicateFileException: /opt/liferay/liferay-portal-6.1.0-ce-ga1.prod/data/document_library/10131/0/document_thumbnail/10435/248/10488/10501-2.jpg/1.0
              at com.liferay.portlet.documentlibrary.store.FileSystemStore.addFile(FileSystemStore.java:76)
              at com.liferay.portlet.documentlibrary.store.BaseStore.addFile(BaseStore.java:105)
              at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.addFile(StoreProxyImpl.java:52)
              at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.addFile(SafeFileNameStoreWrapper.java:70)
              at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:98)
              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:184)
              at com.liferay.portlet.documentlibrary.util.ImageProcessorImpl._storeThumbnail(ImageProcessorImpl.java:269)
              at com.liferay.portlet.documentlibrary.util.ImageProcessorImpl.storeThumbnail(ImageProcessorImpl.java:130)
              at com.liferay.portlet.documentlibrary.util.ImageProcessorUtil.storeThumbnail(ImageProcessorUtil.java:87)
              at com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery.migrateImage(UpgradeImageGallery.java:359)
              at com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery.migrateImageFiles(UpgradeImageGallery.java:398)
              at com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery.doUpgrade(UpgradeImageGallery.java:248)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:208)
              ... 27 more
      Caused by: com.liferay.portlet.documentlibrary.DuplicateFileException: /opt/liferay/liferay-portal-6.1.0-ce-ga1.prod/data/document_library/10131/0/document_thumbnail/10435/248/10488/10501-2.jpg/1.0
              at com.liferay.portlet.documentlibrary.store.FileSystemStore.addFile(FileSystemStore.java:76)
              at com.liferay.portlet.documentlibrary.store.BaseStore.addFile(BaseStore.java:105)
              at com.liferay.portlet.documentlibrary.store.StoreProxyImpl.addFile(StoreProxyImpl.java:52)
              at com.liferay.portlet.documentlibrary.store.SafeFileNameStoreWrapper.addFile(SafeFileNameStoreWrapper.java:70)
              at com.liferay.portlet.documentlibrary.store.DLStoreImpl.addFile(DLStoreImpl.java:98)
              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:184)
              at com.liferay.portlet.documentlibrary.util.ImageProcessorImpl._storeThumbnail(ImageProcessorImpl.java:269)
              at com.liferay.portlet.documentlibrary.util.ImageProcessorImpl.storeThumbnail(ImageProcessorImpl.java:130)
              at com.liferay.portlet.documentlibrary.util.ImageProcessorUtil.storeThumbnail(ImageProcessorUtil.java:87)
              at com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery.migrateImage(UpgradeImageGallery.java:359)
              at com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery.migrateImageFiles(UpgradeImageGallery.java:398)
              at com.liferay.portal.upgrade.v6_1_0.UpgradeImageGallery.doUpgrade(UpgradeImageGallery.java:248)
              at com.liferay.portal.kernel.upgrade.UpgradeProcess.upgrade(UpgradeProcess.java:208)
              ... 30 more
      Stopping the server due to unexpected startup errors
      

      http://www.liferay.com/community/forums/-/message_boards/message/12188199

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              ginson.ren Ginson Ren
              Reporter:
              stanm Stan X
              Participants of an Issue:
              Recent user:
              Marta Elicegui
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 years, 27 weeks ago

                  Packages

                  Version Package
                  6.1.1 CE GA2
                  6.1.20 EE GA2
                  6.2.0 CE M2