My I know what is the input format if I defined new type as "d:date" instead of "d:datetime " ?
Closed this issue · 4 comments
GoogleCodeExporter commented
Hi Dude,
I'm trying to migrate the system from oracle UCM to alfresco 4.0.d Community
Version.
the input in xml file is:
<entry key="ucm:mydate">2011-23-10T16:00:33.507+08:00</entry>
It works well if I define new property with <type>d:datetime</type>
but it stopped work when I change <type>d:datetime</type> as
<type>d:date</type>
My I know what is the input format if I defined new type as "d:date" instead of
"d:datetime "
The errors are:
2012-10-23 18:32:25,991 ERROR [node.integrity.IntegrityChecker] [Bulk
Filesystem Import1] Found 1 integrity violations:
Invalid property value:
Node: workspace://SpacesStore/6ed01e12-5203-4a1a-9682-fdd94bc8f68f
Type: {http://www.alfresco.org/model/ucmdocument/1.0}info
Property: {http://www.alfresco.org/model/ucmdocument/1.0}doccategory
Constraint: 09230187 The value is not an allowed value: 2011-23-10T16:00:33.507+08:00
2012-10-23 18:32:26,296 ERROR [repo.bulkimport.BulkFilesystemImporter] [BulkFilesystemImport-BackgroundThread] Bulk Filesystem Import: 1 error(s) detected. Last error from entry "org.alfresco.repo.bulkimport.ImportableItem@211fe6f9[HeadRevision=org.alfresco.repo.bulkimport.ImportableItem$ContentAndMetadata@3574f66c[contentFile=/opt/bulkimport/a.xls,metadatafile=/opt/bulkimport/a.xls.metadata.properties.xml],Versions=[org.alfresco.repo.bulkimport.ImportableItem$VersionedContentAndMetadata@11de47df[version=1]]]"
org.alfresco.repo.node.integrity.IntegrityException: 09230188 Found 1 integrity violations:
Invalid property value:
Node: workspace://SpacesStore/6ed01e12-5203-4a1a-9682-fdd94bc8f68f
Type: {http://www.alfresco.org/model/ucmdocument/1.0}info
Property: {http://www.alfresco.org/model/ucmdocument/1.0}doccategory
Constraint: 09230187 The value is not an allowed value: 2011-23-10T16:00:33.507+08:00
at org.alfresco.repo.node.integrity.IntegrityChecker.checkIntegrity(IntegrityChecker.java:661)
at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:692)
at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:927)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:737)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:472)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:410)
at org.alfresco.repo.batch.BatchProcessor$TxnCallback.run(BatchProcessor.java:756)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
What version of the product are you using? On what operating system?
Ubuntu + Alfresco 4.0.d Community Version
Need your help . Thanks.
Original issue reported on code.google.com by gen...@gmail.com
on 23 Oct 2012 at 10:38
GoogleCodeExporter commented
Geng, you've provided a time component in the property value (the bit after the
letter "T"), but d:date properties only support dates (not times).
Can you try the following and report back?
<entry key="ucm:mydate">2011-23-10</entry>
Original comment by pmo...@gmail.com
on 23 Oct 2012 at 5:36
- Changed state: NeedMoreInfo
- Added labels: Type-Defect, Priority-Medium
- Removed labels: Type-Enhancement, Priority-Low
GoogleCodeExporter commented
Thank you for your quick response !
I tried several formats again and again. it returned:
Constraint: 09241996 The value is not an allowed value: 2012-10-24
Constraint: 09241990 The value is not an allowed value: 14 May 2012
onstraint: 09241981 The value is not an allowed value: Mon, 14 May 2012
13:56:38 GMT
....
I'm perl developer know a bit of java. I tried the input format reference to
these links:
http://dev.alfresco.com/resource/docs/java/core/org/alfresco/util/ISO8601DateFor
mat.html#parseDayOnly%28java.lang.String,%20java.util.TimeZone%29
http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
http://svn.alfresco.com/repos/alfresco-open-mirror/alfresco/HEAD/root/projects/c
ore/source/java/org/alfresco/util/CachingDateFormat.java
Good day..
Original comment by gen...@gmail.com
on 24 Oct 2012 at 1:37
GoogleCodeExporter commented
I'm foolish ...
Dude, I made mistake during the importing last time.
"2011-23-10T16:00:33.507+08:00" DOES work for d:date !
Really appreciate for your quick response .
I found great projects you contributed to alfresco including "groovy-webscripts"
You are the man !
Original comment by gen...@gmail.com
on 24 Oct 2012 at 8:15
GoogleCodeExporter commented
Well spotted! And thanks for taking the time to update the ticket with the
final resolution - it really helps anyone who runs into the same problem.
Original comment by pmo...@gmail.com
on 24 Oct 2012 at 2:31
- Changed state: Invalid