You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Christoph Schmid <se...@s-c-h.de> on 2014/10/20 15:29:24 UTC
camel-jclouds: StackOverflowError if body is FileInputStreamCache
Hi all,
I think I found a bug in the camel-jclouds implementation (tested in version
2.10.7 and 2.14.0)
If the body of the message an instance of FileInputStreamCache, the
Converter
toPayload(InputStream is, Exchange exchange)
in
org.apache.camel.component.jclouds.JcloudsPayloadConverter
runs into an endless recursion.
The following test case produces the error (add to the
JcloudsBlobStoreProducerTest)
@Test
public void testBlobStorePutFileInputStreamCache() throws
InterruptedException, CamelExecutionException, IOException {
MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results",
MockEndpoint.class);
mockEndpoint.expectedMessageCount(1);
File f = File.createTempFile("temp", ".txt");
FileInputStreamCache fis = new FileInputStreamCache(f);
template.sendBody("direct:put", fis);
mockEndpoint.assertIsSatisfied();
}
I ran into this issue when trying to send files (1MB) i got from camel-jetty
to camel-jclouds.
--
View this message in context: http://camel.465427.n5.nabble.com/camel-jclouds-StackOverflowError-if-body-is-FileInputStreamCache-tp5757810.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-jclouds: StackOverflowError if body is
FileInputStreamCache
Posted by Willem Jiang <wi...@gmail.com>.
It’s a bug of Camel, I just created a JIRA[1] for it.
[1]https://issues.apache.org/jira/browse/CAMEL-7935
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On October 20, 2014 at 10:34:34 PM, Christoph Schmid (servicemix@s-c-h.de) wrote:
> Hi all,
>
> I think I found a bug in the camel-jclouds implementation (tested in version
> 2.10.7 and 2.14.0)
> If the body of the message an instance of FileInputStreamCache, the
> Converter
> toPayload(InputStream is, Exchange exchange)
> in
> org.apache.camel.component.jclouds.JcloudsPayloadConverter
> runs into an endless recursion.
>
> The following test case produces the error (add to the
> JcloudsBlobStoreProducerTest)
>
> @Test
> public void testBlobStorePutFileInputStreamCache() throws
> InterruptedException, CamelExecutionException, IOException {
> MockEndpoint mockEndpoint = resolveMandatoryEndpoint("mock:results",
> MockEndpoint.class);
> mockEndpoint.expectedMessageCount(1);
>
> File f = File.createTempFile("temp", ".txt");
> FileInputStreamCache fis = new FileInputStreamCache(f);
> template.sendBody("direct:put", fis);
>
> mockEndpoint.assertIsSatisfied();
> }
>
>
> I ran into this issue when trying to send files (1MB) i got from camel-jetty
> to camel-jclouds.
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/camel-jclouds-StackOverflowError-if-body-is-FileInputStreamCache-tp5757810.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>