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

Portal throw exception when using WebDAV client to copy (duplicate) a folder that contains file with no extension



      user copying folders that contain the files without extensions and encountered error. The issue was hitting on an API that only used in the repository WebDAV settings.
      Below are reproduction steps:
      1. Boot up Liferay Portal
      2. Navigate to Amin->Content->Document and Media
      3. Add a folder name it Test Folder
      4. Click on Access from Desktop to obtain the WebDAV URL
      5. Add a subfolder name it "FileFolder"
      6. Add a file that has no extension under FileFolder and give a file title test_file.
      7. Install Cadaver on Linux system.
      8. Connect Cadaver with portal through WebDAV URL obtained in step 4.
      9. in cadaver, type in "cp FileFolder FileFolder2"
      Observed Behavior:
      1. The folder got copied and created, however test_file was not under FileFolder2.
      2. Tomcat Console threw error log as below:
      06:01:15,607 ERROR [http-bio-8080-exec-7][DLAppServiceImpl:3307] com.liferay.portlet.documentlibrary.FileNameException: A.
      com.liferay.portlet.documentlibrary.FileNameException: A.
      at com.liferay.portlet.documentlibrary.store.DLStoreImpl.validate(DLStoreImpl.java:617)
      at com.liferay.portlet.documentlibrary.store.DLStoreImpl.validate(DLStoreImpl.java:765)
      at com.liferay.portlet.documentlibrary.store.DLStoreImpl.validate(DLStoreImpl.java:805)
      at com.liferay.portlet.documentlibrary.store.DLStoreImpl.validate(DLStoreImpl.java:722)
      at com.liferay.portlet.documentlibrary.store.DLStoreUtil.validate(DLStoreUtil.java:802)
      at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.validateFile(DLFileEntryLocalServiceImpl.java:2521)
      at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.addFileEntry(DLFileEntryLocalServiceImpl.java:185)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      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:51)
      at com.liferay.portal.spring.aop.ServiceBeanMethodInvocation.proceed(ServiceBeanMethodInvocation.java:111)
      at com.liferay.portal.spring.aop.ServiceBeanAopProxy.invoke(ServiceBeanAopProxy.java:175)

      Desired Behavior: The folder and file are all copied and there would be no error thrown.

      The test case with Cadaver, was set up to test a specific API which is referred as below :

      public DLFileEntry copyFileEntry(
      long groupId, long repositoryId, long fileEntryId,
      long destFolderId, ServiceContext serviceContext)
      throws PortalException, SystemException {
      DLFileEntry dlFileEntry = getFileEntry(fileEntryId);
      String sourceFileName = "A." + dlFileEntry.getExtension();

      I tested the behavior with some other webdav client such as CyberDuck and one Windows 7 building WebDav client (by mapping the network folder). Each Client behaves a bit different. For CyberDuck, the copying action went into a loop hole and the copy was never complete. For Windows 7, the copy was successful.


          Issue Links



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


                • Created:
                  Days since last comment:
                  4 years, 46 weeks, 3 days ago


                  Version Package
                  6.2.4 CE GA5
                  6.2.X EE
                  7.0.0 M1