<?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: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED] in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320723#M7724</link>
    <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;
&lt;P&gt;Here is my &lt;CODE&gt;CustomConcatenatePDFs&lt;/CODE&gt; from studio (cf : [Capture d’e´cran 2018-01-18 a` 10.11.21.png])&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;nuxeoClient.operation('CustomConcatenatePDFs')    
.params({        
filename : fileName,        
url : pdfUri    })    
.input(docs) //List of doc to have automatic loop
.execute()
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but when I get ressult client side I always have blob ([Capture d’e´cran 2018-01-18 a` 10.11.01 (2).png]) with no stream and name ? &lt;CODE&gt;MergedPdf : { type : 'text/plain', size : 13284832}&lt;/CODE&gt;
It supposed to be a pdf file ?&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jan 2018 10:08:10 GMT</pubDate>
    <dc:creator>freemann_</dc:creator>
    <dc:date>2018-01-18T10:08:10Z</dc:date>
    <item>
      <title>Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320716#M7717</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to merges blobs but when I try &lt;CODE&gt;nuxeoClient.operation('Blob.ConcatenatePDFs') .params({ filename: fileName }) .input(blobList) .execute()&lt;/CODE&gt;
, I get &lt;STRONG&gt;{"entity-type":"exception","code":"org.nuxeo.ecm.automation.InvalidChainException","status":500,"message":"Failed to invoke operation: Blob.ConcatenatePDFs"}&lt;/STRONG&gt; ?
And in nuxeo server side I have :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;****** chain ******
Name: Blob.ConcatenatePDFs
Exception: InvalidChainException
Caught error: Cannot find any valid path in operation chain - no method found for operation 'Blob.ConcatenatePDFs' and for first input type 'java.util.ArrayList'
Caused by: null
****** Hierarchy calls ******

	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:238)
	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:121)
	at org.nuxeo.ecm.automation.server.jaxrs.OperationResource.execute(OperationResource.java:58)
	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:68)
	... 115 more
Caused by: org.nuxeo.ecm.automation.InvalidChainException: Cannot find any valid path in operation chain - no method found for operation 'Blob.ConcatenatePDFs' and for first input type 'java.util.ArrayList'
	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.buildChain(CompiledChainImpl.java:166)
	at org.nuxeo.ecm.automation.core.impl.CompiledChainImpl.buildChain(CompiledChainImpl.java:146)
	at org.nuxeo.ecm.automation.core.impl.OperationServiceImpl.run(OperationServiceImpl.java:212)
	... 118 more
2018-01-16 14:04:25,476 WARN  [http-bio-X.X.X.X-8443-exec-88] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] Exception in JAX-RS processing
org.nuxeo.ecm.webengine.WebException: **Failed to invoke operation: Blob.ConcatenatePDFs**
	at org.nuxeo.ecm.webengine.WebException.newException(WebException.java:133)
	at org.nuxeo.ecm.webengine.WebException.newException(WebException.java:122)
	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:87)
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;According with &lt;A href="http://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20DM-8.3/viewOperation/Blob.ConcatenatePDFs" target="test_blank"&gt;http://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20DM-8.3/viewOperation/Blob.ConcatenatePDFs&lt;/A&gt;, We don't need Document path to use this OP ? blobList is enough ?&lt;/P&gt;
&lt;P&gt;Must I update my nuxeo platform to have Blob.ConcatenatePDFs Operation in REST API ?&lt;/P&gt;
&lt;P&gt;Thanks for your helps&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 10:18:41 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320716#M7717</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2018-01-16T10:18:41Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320717#M7718</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 13:13:01 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320717#M7718</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2018-01-16T13:13:01Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320718#M7719</link>
      <description>&lt;P&gt;I Thomas,&lt;/P&gt;
&lt;P&gt;I use latest version of JS client (3.4.1), nuxeo version 8.10 and my BlobList  (blob) look like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;let  file :Blob  = doc.properties['file:content'];
```  
such as 
```
blob : {data : "[https://server/nuxeo/nxfile/default/2c19d2f0-212e-4f84-9c56-f61c497e9ff9/file:content/CDE-2018-000021%20DEVIS%20MANUEL%20HAVAS.docx](https://server/nuxeo/nxfile/default/2c19d2f0-212e-4f84-9c56-f61c497e9ff9/file:content/CDE-2018-000021%20DEVIS%20MANUEL%20HAVAS.docx "https://server/nuxeo/nxfile/default/2c19d2f0-212e-4f84-9c56-f61c497e9ff9/file:content/CDE-2018-000021%20DEVIS%20MANUEL%20HAVAS.docx")"
digest : "c83dc99ad65f21c5095e2a64965e977f"
digestAlgorithm : "MD5"
encoding : null
length : "13273"
"mime-type" : "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
name : "CDE-2018-000021 DEVIS MANUEL HAVAS.docx"}
```
I tried doc.getBlobs() but I have `blob : { type : application/vnd.openxmlformats-officedocument.wordprocessingml.document, size : 13273}`, that's all.

But I always have 
```
2018-01-16 14:04:25,476 WARN  [http-bio-X.X.X.X-8443-exec-88] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] Exception in JAX-RS processing
org.nuxeo.ecm.webengine.WebException: Failed to invoke operation: Blob.ConcatenatePDFs
	at org.nuxeo.ecm.webengine.WebException.newException(WebException.java:133)
	at org.nuxeo.ecm.webengine.WebException.newException(WebException.java:122)
	at org.nuxeo.ecm.automation.server.jaxrs.ExecutableResource.doPost(ExecutableResource.java:87)
	at sun.reflect.GeneratedMethodAccessor224.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:497)
```

Thanks
`
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jan 2018 13:15:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320718#M7719</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2018-01-16T13:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320719#M7720</link>
      <description>&lt;P&gt;You can't use Blob JSON definition from a JSON document properties as input of an operation, Nuxeo won't be able to decode it.&lt;/P&gt;
&lt;P&gt;For your use case, I would create a custom chain &lt;CODE&gt;CustomConcatenatePDFs&lt;/CODE&gt; such as:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;- Document.GetBlob: {}
- Blob.ConcatenatePDFs: {}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And then call it through:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;nuxeoClient.operation('CustomConcatenatePDFs')
  .input(doc) // or just the document id/path if you don't event need to fetch the wole document
  .params({ xpath: 'file:content', filename: fileName })
  .execute()
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This way, everything will be done server side: the first operation will retrieve the Blob at &lt;CODE&gt;file:content&lt;/CODE&gt; from the given document as input and pass it to the &lt;CODE&gt;Blob.ConcatenatePDFs&lt;/CODE&gt; operatrion as input.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 10:07:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320719#M7720</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2018-01-17T10:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320720#M7721</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 10:19:48 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320720#M7721</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2018-01-17T10:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320721#M7722</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;
&lt;P&gt;If I use Automation scripting to do my merge operation server side, It will works ? It will return readable file (blob) in client side ?&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 12:59:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320721#M7722</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2018-01-17T12:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320722#M7723</link>
      <description>&lt;P&gt;Why doing an iteration? On your example `let  file&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 09:36:54 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320722#M7723</guid>
      <dc:creator>Thomas_Roger</dc:creator>
      <dc:date>2018-01-18T09:36:54Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320723#M7724</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;
&lt;P&gt;Here is my &lt;CODE&gt;CustomConcatenatePDFs&lt;/CODE&gt; from studio (cf : [Capture d’e´cran 2018-01-18 a` 10.11.21.png])&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;nuxeoClient.operation('CustomConcatenatePDFs')    
.params({        
filename : fileName,        
url : pdfUri    })    
.input(docs) //List of doc to have automatic loop
.execute()
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;but when I get ressult client side I always have blob ([Capture d’e´cran 2018-01-18 a` 10.11.01 (2).png]) with no stream and name ? &lt;CODE&gt;MergedPdf : { type : 'text/plain', size : 13284832}&lt;/CODE&gt;
It supposed to be a pdf file ?&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 10:08:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320723#M7724</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2018-01-18T10:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320724#M7725</link>
      <description>&lt;P&gt;Ok, I change my mind and do something clean but it merge the same file twice or more ?&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jan 2018 11:38:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320724#M7725</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2018-01-18T11:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Nuxeo REST API - Blob.ConcatenatePDFs - 500 Internal Server Error [SOLVED]</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320725#M7726</link>
      <description>&lt;P&gt;Hi Thomas,&lt;/P&gt;
&lt;P&gt;I solved my issue by creating a customScript server side in studio though automation chains and it works fine.&lt;/P&gt;
&lt;P&gt;Thanks a lot&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jan 2018 07:47:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/nuxeo-rest-api-blob-concatenatepdfs-500-internal-server-error/m-p/320725#M7726</guid>
      <dc:creator>freemann_</dc:creator>
      <dc:date>2018-01-30T07:47:16Z</dc:date>
    </item>
  </channel>
</rss>

