<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can't save big files on repository using contentWriter.putContent in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305969#M259099</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Why are you using a scriptNode from within Java?&amp;nbsp;&amp;nbsp; Use the nodeService or FileFolder service directly.&amp;nbsp;&amp;nbsp; However I don't think that is your problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your exception processing is wrong.&amp;nbsp; In particular you are swallowing concurrency exceptions that may need to be retried.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Oct 2015 16:52:44 GMT</pubDate>
    <dc:creator>mrogers</dc:creator>
    <dc:date>2015-10-06T16:52:44Z</dc:date>
    <item>
      <title>Can't save big files on repository using contentWriter.putContent</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305968#M259098</link>
      <description>Hello,I've this piece of code like this in a custom JavaService (simplified in order to get to the point)&lt;IMG id="smileytongue" class="emoticon emoticon-smileytongue" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-tongue.png" alt="Smiley Tongue" title="Smiley Tongue" /&gt;ublic class CatalogManager extends BaseScopableProcessorExtension {….public void saveFileOnRepositoty(String fileName, File zipfile) {&amp;nbsp;&amp;nbsp;&amp;nbsp;File zipfile = File.createTempFile(fileName, ".zip");&amp;nbsp;&amp;nbsp;&amp;nbsp;</description>
      <pubDate>Tue, 06 Oct 2015 16:33:51 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305968#M259098</guid>
      <dc:creator>eradan</dc:creator>
      <dc:date>2015-10-06T16:33:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can't save big files on repository using contentWriter.putContent</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305969#M259099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Why are you using a scriptNode from within Java?&amp;nbsp;&amp;nbsp; Use the nodeService or FileFolder service directly.&amp;nbsp;&amp;nbsp; However I don't think that is your problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your exception processing is wrong.&amp;nbsp; In particular you are swallowing concurrency exceptions that may need to be retried.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 16:52:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305969#M259099</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2015-10-06T16:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can't save big files on repository using contentWriter.putContent</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305970#M259100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello, thanks for your reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Excuse me, why are you saying I'm swallowing the exception? I was just wrapping and re-throwing it as RuntimeException if it occurs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, as you suggested, I tried unboxing the Exceptions:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class CatalogManager extends BaseScopableProcessorExtension {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;….&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public void saveFileOnRepositoty(String fileName, File zipfile) throws FileNotFoundException, IOException {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;File zipfile = File.createTempFile(fileName, ".zip");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;InputStream in = new FileInputStream(zipfile);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ScriptNode node = parentDir.createFile(fileName + ".zip");;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;ContentWriter contentWriter = contentService.getWriter(node.getNodeRef(), ContentModel.PROP_CONTENT, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;contentWriter.putContent(in);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;IOUtils.closeQuietly(in);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;String nodeRefResult = "";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if (node != null) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;nodeRefResult = node.getNodeRef().toString();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;return nodeRefResult;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;….&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;/java&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I've the same behaviour: nothing in the log. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I get back a noderef but when I try to get the node it doesn't exist.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm wondering if there is something like a content limit that I've to set in order to create a node with a content bigger than a certain threshold.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 21:26:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305970#M259100</guid>
      <dc:creator>eradan</dc:creator>
      <dc:date>2015-10-06T21:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can't save big files on repository using contentWriter.putContent</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305971#M259101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;No there is no content limit.&amp;nbsp;&amp;nbsp; There may be quota, if set. But if you exceed quota you will get a fairly self explanatory exception to deal with.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What are the details of your statement. "I get back a noderef but when I try to get the node it doesn't exist."&amp;nbsp;&amp;nbsp; You are not using search are you ?&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 21:38:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305971#M259101</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2015-10-06T21:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Can't save big files on repository using contentWriter.putContent</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305972#M259102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;once node has been created and method returns I return to the client the parent folder and the noderef of the newly created file. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Browsing the parent folder I don't find the node. Neither programmatically nor - after a while - browsing the repository using explorer or share, nor searching it using the node browser. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Oct 2015 05:13:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/can-t-save-big-files-on-repository-using-contentwriter/m-p/305972#M259102</guid>
      <dc:creator>eradan</dc:creator>
      <dc:date>2015-10-07T05:13:26Z</dc:date>
    </item>
  </channel>
</rss>

