camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Inject multiple @JsonPath parameters to bean method
Date Fri, 20 May 2016 11:52:02 GMT
You can add a

covertBodyTo(string.class) before the bean so its not stream based.

It smells like the bean component need to reset the stream before
evaluation in case you have multiple parameters from the body which
you are doing, but which is otherwise rarely used.
https://issues.apache.org/jira/browse/CAMEL-9979

On Fri, May 20, 2016 at 1:45 PM, grzechol
<grzegorz.olszewski@outlook.com> wrote:
> Hi Claus,
> Thank your for very quick response. Unfortunately, stream caching didn't
> help - it just changed the exception type.
>
> I've enabled stream caching on CamelContext level, and set spool threshold
> to 1 (just to see what will happen). The message body is cached and spooled
> to disk:
> 2016.05.20 13:36:25.924 DEBUG Camel (camel-1) thread #0 - timer://foo
> org.apache.camel.impl.DefaultStreamCachingStrategy - Should spool cache 29
> -> true
>
> But then I got:
>
> ExpressionEvaluationException: java.io.IOException: Stream closed (full
> stacktrace: http://pastebin.com/idtpACVU)
>
> when evaluating jsonpath for the first argument...
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Inject-multiple-JsonPath-parameters-to-bean-method-tp5782825p5782831.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Mime
View raw message