Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-9790

CLONE - bulkimport fails when there is a very large LastModified timestamp.

    Details

    • Type: Service Pack Request
    • Status: Closed (View Workflow)
    • Resolution: Fixed
    • Affects Version/s: 4.1.3
    • Fix Version/s: 4.1.7
    • Component/s: Repository
    • Labels:
      None

      Description

      How to reproduce?
      ==================
      1) create a plain vanilla 4.1.3 (linux tomcat pg)
      2) in a folder e.g. /home/madon/tmp/largetimestamp
      a) put the attached python program:

      ----------------------------------
      #!/usr/bin/python3.2
      import os
      fname="tmp3/test.txt"
      os.utime(fname,(1381677187000,1381677187000))
      stat=os.stat(fname)
      print(stat)
      ----------------------------------

      this script update the file timestamps to a very large date (year 45753)

      b) create a directory tmp3
      c) and this directory a file test.txt
      d) add in tmp3 6 other test files with a different names
      3) execute the script
      4) check your linux can still get the stats using ls -alh
      5) log in alfresco explorer as 'admin' and create a folder 'import' under 'company home'
      6) go to
      http://localhost:8080/alfresco/service/bulkfsimport
      put as Import directory:
      /home/madon/tmp/largetimestamp/tmp3
      and as Target Space:
      /Company Home/import
      7) press initiate Bulk Import

      Result:
      =======
      Imports fails, see screen shot and in the logs we can see:

      2013-10-13 16:33:59,409 ERROR [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk Filesystem Import: 2 error(s) detected. Last error from entry "org.alfresco.repo.bulkimport.ImportableItem@63a31a1c[HeadRevision=org.alfresco.repo.bulkimport.ImportableItem$ContentAndMetadata@6907575e[contentFile=/home/madon/tmp/largetimestamp/tmp3/test5.txt,metadatafile=<null>],Versions=<null>]"
      org.alfresco.service.cmr.repository.datatype.TypeConversionException: Failed to convert date 45753-08-10T03:36:40.000+01:00 to string
      at org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter$13.convert(DefaultTypeConverter.java:198)
      at org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter$13.convert(DefaultTypeConverter.java:188)
      at org.alfresco.service.cmr.repository.datatype.TypeConverter.convert(TypeConverter.java:112)
      at org.alfresco.repo.domain.node.AuditablePropertiesEntity.getAuditableProperties(AuditablePropertiesEntity.java:205)
      at org.alfresco.repo.domain.node.AbstractNodeDAOImpl.getNodeProperties(AbstractNodeDAOImpl.java:2026)

      .....

      Exception in thread "BulkFilesystemImport-BackgroundThread" org.alfresco.error.AlfrescoRuntimeException: 09131920 org.alfresco.service.cmr.repository.datatype.TypeConversionException: Failed to convert date 45753-08-10T03:36:40.000+01:00 to string
      at org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter$13.convert(DefaultTypeConverter.java:198)

      full stack attached.

      Expected Result:
      =================
      The imports keeps going and WARNs in the logs and status page about the funny date.

      Notes:
      ======
      1) customer mounts using SMB the remote folder on alfresco to do the import. It is not clear why the timestamps are so large on some files.

      2) date is set in root/projects/repository/source/java/org/alfresco/repo/bulkimport/ImportableItem.java

      contentFileModified = new Date(contentFile.lastModified());

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                amadon Alex Madon [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 days, 4 hours, 30 minutes
                  3d 4h 30m