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

DuplicateFileException occurred when upload two same files as attachment while creating a thread

    Details

      Description

      Steps to reproduce:

      1. Start portal and login.
      2. Add MB portlet into page, press "Post New Thread".
      3. Input the subject and body, select two same file as attachment and press publish.

      Expected result:
      User get an error message to show that there are two same files, or just upload one as attachment, no exception occurred.

      Actual result:
      DuplicateFileException occurred on terminal, and "Message Boards is temporarily unavailable." is printed on screen.

      07:39:56,298 ERROR [RuntimePageImpl-3][render_portlet_jsp:132] null
      com.liferay.portlet.documentlibrary.DuplicateFileException: 003.jpg
      	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.validateFile(DLFileEntryLocalServiceImpl.java:2448)
      	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.validateFile(DLFileEntryLocalServiceImpl.java:2488)
      	at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.addFileEntry(DLFileEntryLocalServiceImpl.java:184)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      	at com.liferay.portal.repository.liferayrepository.LiferayLocalRepository.addFileEntry(LiferayLocalRepository.java:126)
      	at com.liferay.portlet.documentlibrary.service.impl.DLAppLocalServiceImpl.addFileEntry(DLAppLocalServiceImpl.java:198)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:115)
      	at com.liferay.portal.spring.transaction.DefaultTransactionExecutor.execute(DefaultTransactionExecutor.java:62)
      	at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:55)
      	at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      	at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)
      	at com.liferay.portlet.documentlibrary.service.DLAppLocalServiceUtil.addFileEntry(DLAppLocalServiceUtil.java:152)
      	at com.liferay.portal.portletfilerepository.PortletFileRepositoryImpl.addPortletFileEntry(PortletFileRepositoryImpl.java:129)
      	at com.liferay.portal.portletfilerepository.PortletFileRepositoryImpl.addPortletFileEntry(PortletFileRepositoryImpl.java:155)
      	at com.liferay.portal.portletfilerepository.PortletFileRepositoryImpl.addPortletFileEntries(PortletFileRepositoryImpl.java:89)
      	at com.liferay.portal.portletfilerepository.PortletFileRepositoryUtil.addPortletFileEntries(PortletFileRepositoryUtil.java:48)
      07:40:07,984 INFO  [localhost-startStop-3][PortletHotDeployListener:523] Unregistering portlets for marketplace-portlet
      07:40:07,998 INFO  [localhost-startStop-3][PortletHotDeployListener:563] 3 portlets for marketplace-portlet were unregistered
      07:40:08,004 INFO  [localhost-startStop-3][HookHotDeployListener:944] Hook for marketplace-portlet was unregistered
      07:40:08,032 INFO  [localhost-startStop-3][PluginPackageUtil:1015] Reading plugin package for marketplace-portlet
      

      Note:
      In 6.1.x EE, only one file would be uploaded if we do same operation.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hong.zhao Hong Zhao
                Reporter:
                hong.zhao Hong Zhao
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 37 weeks, 2 days ago

                  Packages

                  Version Package
                  6.2.2 CE GA3
                  6.2.X EE
                  7.0.0 M1