<?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 OutOfMemoryError in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/outofmemoryerror/m-p/43308#M23565</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Salve,&lt;/P&gt;&lt;P&gt;in passato mi avete aiutato a risolvere dei problemi sulla share di alfresco, oggi voglio invece chiedervi dei suggerimenti su come risolvere un problema di&amp;nbsp;OutOfMemoryError relativo all'invio di video di dimensioni superiori a 500Mb; l'invio dei video lo eseguo attraverso un'app Android che tramite un task asincrono si connette al repository:&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; font-size: 9,0pt;"&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;-repoSession &lt;/SPAN&gt;= RepositorySession.&lt;SPAN&gt;connect&lt;/SPAN&gt;(&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;url&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;username&lt;/SPAN&gt;, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;password&lt;/SPAN&gt;);&lt;BR /&gt;&lt;BR /&gt;dopo aver ottenuto la sessione di alfresco eseguo una chiamata al repository:&lt;BR /&gt;&lt;PRE style="font-size: 9,0pt;"&gt;DocumentFolderService mDocumentFolderService = repoSession.getServiceRegistry().getDocumentFolderService();&lt;/PRE&gt;e sul riferimento&lt;BR /&gt;&lt;BR /&gt;&lt;PRE style="font-size: 9,0pt;"&gt;mDocumentFolderService.createDocument(folder, &lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;mFile&lt;/SPAN&gt;.getName(), mProperties, mContentFile);&lt;/PRE&gt;ora quest'ultima chiamata mi genera l'errore &lt;BR /&gt;E/System: java.lang.OutOfMemoryError: Failed to allocate a 36 byte allocation with 0 free bytes and 0B until OOM&lt;BR /&gt;&lt;BR /&gt;Ho fatto diverse ricerche e ho aggiunto nel file gradle l'istruzione&lt;BR /&gt;&lt;PRE style="font-size: 9,0pt;"&gt;dexOptions {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; incremental = &lt;SPAN style="color: #000043; font-weight: bold;"&gt;true&lt;/SPAN&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; javaMaxHeapSize &lt;SPAN style="color: #008000; font-weight: bold;"&gt;"4g"&lt;BR /&gt;&lt;/SPAN&gt;}&lt;BR /&gt;&lt;BR /&gt;nel manifest &lt;BR /&gt;&lt;BR /&gt;&lt;PRE style="background-color: #ffffff; font-size: 9,0pt;"&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:largeHeap=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"true"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:allowBackup=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"true"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:hardwareAccelerated=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"false"&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #660e7a; font-weight: bold;"&gt;android&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-weight: bold;"&gt;:supportsRtl=&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"true"&lt;/SPAN&gt;&lt;/PRE&gt;e infine nel gradle.properties&lt;BR /&gt;&lt;BR /&gt;&lt;PRE style="background-color: #ffffff; font-size: 9,0pt;"&gt;&lt;SPAN style="color: #000080; background-color: #e4e4ff; font-weight: bold;"&gt;org.gradle.jvmargs&lt;/SPAN&gt;=&lt;SPAN style="color: #008000; font-weight: bold;"&gt;-Xmx2048m&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;non sono riuscito a risolvere il problema, forse dovrei intervenire sul progetto alfresco ma non so;&lt;BR /&gt;&lt;BR /&gt;grazie in anticipo per eventuali suggerimenti&lt;BR /&gt;&lt;BR /&gt;Pietro&lt;/PRE&gt;&lt;/PRE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Feb 2017 15:25:47 GMT</pubDate>
    <dc:creator>piter</dc:creator>
    <dc:date>2017-02-23T15:25:47Z</dc:date>
    <item>
      <title>OutOfMemoryError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/outofmemoryerror/m-p/43308#M23565</link>
      <description>Salve,in passato mi avete aiutato a risolvere dei problemi sulla share di alfresco, oggi voglio invece chiedervi dei suggerimenti su come risolvere un problema di&amp;nbsp;OutOfMemoryError relativo all'invio di video di dimensioni superiori a 500Mb; l'invio dei video lo eseguo attraverso un'app Android che t</description>
      <pubDate>Thu, 23 Feb 2017 15:25:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/outofmemoryerror/m-p/43308#M23565</guid>
      <dc:creator>piter</dc:creator>
      <dc:date>2017-02-23T15:25:47Z</dc:date>
    </item>
    <item>
      <title>Re: OutOfMemoryError</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/outofmemoryerror/m-p/43309#M23566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Forse il metodo che usi per creare il contenuto non fa streaming del binario o comunque fa qualcosa in più poiché il client effettua operazioni atomiche.&lt;/P&gt;&lt;P&gt;Suggerirei di creare prima il contenuto vuoto e poi di provare ad effettuare l'upload del binario utilizzando il metodo updateContent:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://docs.alfresco.com/mobile_sdk/android/references/client_api/services/DocumentFolderService-updateContent.html" title="http://docs.alfresco.com/mobile_sdk/android/references/client_api/services/DocumentFolderService-updateContent.html" rel="nofollow noopener noreferrer"&gt;updateContent | Alfresco Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Altrimenti devi andare ad utilizzare direttamente l'API REST con una chiamata PUT direttamente dalla tua applicazione.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Spero ti aiuti a risolvere.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Mar 2017 15:13:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/outofmemoryerror/m-p/43309#M23566</guid>
      <dc:creator>openpj</dc:creator>
      <dc:date>2017-03-02T15:13:28Z</dc:date>
    </item>
  </channel>
</rss>

