Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23933

Impossible to import a document with a date property with the Scan Importer

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Not A Bug
    • Affects Version/s: 9.10-SNAPSHOT
    • Fix Version/s: 9.10
    • Component/s: Scan importer

      Description

      Environnement : MacOS + Redis + Mongo

      Step to reproduce:

      • Import a document with a date property : Even with the standard timestamp format, it still no work, and gives the following error :
      2017-12-12 11:25:30,010 ERROR [Nuxeo-Importer-1] [org.nuxeo.ecm.platform.scanimporter.processor.ScanedFileSourceNode] Error during properties parsing
      java.io.IOException: java.text.ParseException: Unparseable date: 
      	at org.nuxeo.ecm.platform.scanimporter.service.ScannedFileMapperComponent.parseMetaData(ScannedFileMapperComponent.java:126)
      	at org.nuxeo.ecm.platform.scanimporter.processor.ScanedFileSourceNode.getChildren(ScanedFileSourceNode.java:91)
      	at org.nuxeo.ecm.platform.importer.base.GenericThreadedImportTask.recursiveCreateDocumentFromNode(GenericThreadedImportTask.java:327)
      	at org.nuxeo.ecm.platform.importer.base.GenericThreadedImportTask.run(GenericThreadedImportTask.java:377)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      Caused by: java.text.ParseException: Unparseable date: 
      	at org.apache.commons.lang3.time.FastDateParser.parse(FastDateParser.java:367)
      	at org.apache.commons.lang3.time.FastDateFormat.parse(FastDateFormat.java:550)
      	at org.nuxeo.ecm.platform.scanimporter.service.ScannedFileMapperComponent.parseMetaData(ScannedFileMapperComponent.java:124)
      	... 6 more
      

      Nuxeo Studio contribution is:

      <fieldMapping sourceXPath="//date[@name='order_date']" targetXPath="foo:order_date" targetType="date"/>
      

      XML file to import is:

      <date name="order_date" label="Order date" value="2005-03-12T11:00:00.000Z" />
      

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 15 minutes
                  15m