AnsweredAssumed Answered

Problem - Writing content to childNode

Question asked by dark_rider on Mar 3, 2011
Latest reply on Mar 6, 2014 by saruqui
Hi all,

The problem about putContent method of ContentWriter class. I try to overwrite a content to a child node which is already associated with parent node (both of them are files).
I could change the content of parentNode without any exception. When I try to change the child content it changes but throws the following exception.

Any suggestion?

Regards



org.alfresco.service.cmr.repository.ContentIOException: 02030000 Failed to set content property on stream closure:
   node: workspace://SpacesStore/d2ad89f5-036e-4ff6-9da0-0cd05ff4bb5e
   property: {http://www.alfresco.org/model/content/1.0}content
   writer: ContentAccessor[ contentUrl=store://2011/3/3/13/49/d60529f8-2952-49d4-afd0-090248141fe5.bin, mimetype=application/octet-stream, size=49, encoding=utf-8, locale=en_US]
java.lang.UnsupportedOperationException: Entity deletion by key is not supported
   at org.alfresco.repo.content.ContentServiceImpl$WriteStreamListener.contentStreamClosedImpl(ContentServiceImpl.java:674)
   at org.alfresco.repo.content.AbstractContentStreamListener$1.execute(AbstractContentStreamListener.java:50)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:325)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:251)
   at org.alfresco.repo.content.AbstractContentStreamListener.contentStreamClosed(AbstractContentStreamListener.java:57)
   at org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel.fireChannelClosed(AbstractContentAccessor.java:333)
   at org.alfresco.repo.content.AbstractContentAccessor$CallbackFileChannel.implCloseChannel(AbstractContentAccessor.java:317)
   at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:97)
   at java.nio.channels.Channels$1.close(Channels.java:138)
   at java.io.FilterOutputStream.close(FilterOutputStream.java:143)
   at org.springframework.util.FileCopyUtils.copy(FileCopyUtils.java:126)
   at org.alfresco.repo.content.AbstractContentWriter.putContent(AbstractContentWriter.java:417)
   at tr.gov.tubitak.bte.byas.signature.SignatureConverter.convertToESA(Unknown Source)
   at tr.gov.tubitak.bte.byas.signature.SignatureConverter.execute(Unknown Source)
   at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:373)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:325)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:424)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:448)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:294)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
   at java.lang.Thread.run(Thread.java:619)

Outcomes