-
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
-
Backlog priority:1,000
-
Sprint:nxcore 9.10.2
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" />