10-16-2013 11:37 AM
Bonjour, dans studio, j'ai créé un event handler qui doit mettre à jour la version de mon document lorsque je le publie dans une section. Pour se faire, j'utilise Document.CreateVersion (Snapshot Version) dans studio sur un type de document file, seulement, lorsque je publie le document j'ai une erreur : version 5.7 de nuxeo
****** chain ****** Name: publication Exception: OperationException Caught error: Failed to invoke operation Document.CreateVersion Caused by: org.nuxeo.ecm.core.api.ClientException: failed to write document part ****** Hierarchy calls ****** org.nuxeo.ecm.automation.core.operations.FetchContextDocument org.nuxeo.ecm.automation.core.operations.document.CreateVersion at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:190) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:88) ... Caused by: org.nuxeo.ecm.automation.OperationException: Failed to invoke operation Document.CreateVersion at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:157) at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:122) at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:108) at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.doInvoke(CompiledChainImpl.java:125) at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.invoke(CompiledChainImpl.java:108) at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:165) ... 125 more Caused by: org.nuxeo.ecm.core.api.ClientException: failed to write document part at org.nuxeo.ecm.core.api.DocumentModelFactory.writeDocumentModel(DocumentModelFactory.java:305) at org.nuxeo.ecm.core.api.AbstractSession.writeModel(AbstractSession.java:558) at org.nuxeo.ecm.core.api.AbstractSession.saveDocument(AbstractSession.java:1981) at sun.reflect.GeneratedMethodAccessor1303.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.nuxeo.ecm.core.api.TransactionalCoreSessionWrapper.invoke(TransactionalCoreSessionWrapper.java:136) at $Proxy101.saveDocument(Unknown Source) at org.nuxeo.ecm.automation.core.util.DocumentHelper.saveDocument(DocumentHelper.java:60) at org.nuxeo.ecm.automation.core.operations.document.CreateVersion.run(CreateVersion.java:64) at sun.reflect.GeneratedMethodAccessor1577.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.nuxeo.ecm.automation.core.impl.InvokableMethod.doInvoke(InvokableMethod.java:142) at org.nuxeo.ecm.automation.core.impl.InvokableMethod.invoke(InvokableMethod.java:149) ... 130 more Caused by: org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentVersion$VersionNotModifiableException: Cannot set property on a version: dc:created = java.util.GregorianCalendar[time=1381930271011,areFieldsSet=true,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Paris",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=184,lastRule=java.util.SimpleTimeZone[id=Europe/Paris,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2013,MONTH=9,WEEK_OF_YEAR=42,WEEK_OF_MONTH=3,DAY_OF_MONTH=16,DAY_OF_YEAR=289,DAY_OF_WEEK=4,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=3,HOUR_OF_DAY=15,MINUTE=31,SECOND=11,MILLISECOND=11,ZONE_OFFSET=3600000,DST_OFFSET=3600000] at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentVersion.setPropertyValue(SQLDocumentVersion.java:254) at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.writeDocumentPart(SQLDocumentLive.java:178) at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentProxy.writeDocumentPart(SQLDocumentProxy.java:193) at org.nuxeo.ecm.core.api.DocumentModelFactory.writeDocumentModel(DocumentModelFactory.java:299)
une idée du soucis ? Merci d'avance
10-17-2013 02:19 PM
Bonjour,
Les versions sont par nature immutable -> vous ne pouvez pas changer les métadonnées d'une version:
Caused by: org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentVersion$VersionNotModifiableException:
10-18-2013 04:31 AM
ok merci beaucoup
10-21-2013 06:04 AM
Bonjour, j'ai le même type d'erreur lorsque je cherche à publier un document, j'aune chaine qui n'est censée se déclencher que lors de la création d'un document dans le workspace (j'ai mis "Document created" et start with "/default-domain/workspaces/" dans la chain), hors elle se déclenche aussi lors de la publication d'un document, et elle me renvoit une erreur :
****** chain ****** Name: creation_covention_test_uid Exception: OperationException Caught error: Failed to invoke operation Document.SetProperty Caused by: org.nuxeo.ecm.core.api.ClientException: failed to write document part ****** Hierarchy calls ****** org.nuxeo.ecm.automation.core.operations.FetchContextDocument org.nuxeo.ecm.automation.core.operations.document.SetDocumentProperty ... Caused by: org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentVersion$VersionNotModifiableException: Cannot set property on a version: is_dc:contenu = toto
alors que le champ is_dc:contenu est un champ que j'ai créé moi même. Merci
10-21-2013 10:30 AM
Merci d'amender votre question initiale plutôt que d'écrire ceci dans la section Réponses.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.