[ 
https://issues.apache.org/jira/browse/CAMEL-16252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17290978#comment-17290978
 ] 

Omar Al-Safi commented on CAMEL-16252:
--------------------------------------

Hi [~mueller110], 

How do you enable the stream caching, can you please share with me DSL 
code/steps that have you taken here? The way I see it in 
[FileInputStreamCache|https://github.com/apache/camel/blob/e53235ba80bb6ad43e786380edb207f526b105bc/core/camel-support/src/main/java/org/apache/camel/converter/stream/FileInputStreamCache.java],
 it doesn't support mark operation. 
The issue is, the {{InputStream}} implementation that is required by Azure SDK 
needs to implement both {{mark}} and {{reset}} and hence throwing this 
exception before processing the input stream. 

> camel-azure-storage-blob 3.7.0 stream caching bug
> -------------------------------------------------
>
>                 Key: CAMEL-16252
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16252
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-azure
>    Affects Versions: 3.7.0
>            Reporter: Christian Müller
>            Priority: Major
>
> Already asked the question in the mailing list. *Claus Ibsen stated that this 
> is actually a bug:* 
> *Ad 1)*
> *Yes that seems like a little bug. You are welcome to create a JIRA ticket.*
> Here is my description of the bug:
> <dependency>
>      <groupId>org.apache.camel.springboot</groupId>
>      <artifactId>camel-azure-storage-blob-starter</artifactId>
>     <version>3.7.0</version>
>  </dependency>
> We are currently trying to integrate azure cloud by using the 
> *camel-azure-storage-blob* component. Everything works fine until we activate 
> *stream caching* and camel starts to spool the payload. In this case we get 
> the following error:
>  Caused by: java.lang.IllegalArgumentException: InputStream of body exchange 
> does not support mark/rest operations.
>             at 
> org.apache.camel.component.azure.storage.blob.BlobStreamAndLength.createBlobStreamAndLengthFromExchangeBody(BlobStreamAndLength.java:52)
>             at 
> org.apache.camel.component.azure.storage.blob.operations.BlobOperations.uploadBlockBlob(BlobOperations.java:181)
> I have looked into the source and think that the component does not load the 
> stream properly from the FileInputStreamCache object. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to