valdar opened a new issue, #908:
URL: https://github.com/apache/camel-kamelets/issues/908

   Since 
https://github.com/apache/camel/commit/e5cf3d40881a225d5042d8652de951e6f1453026 
was included in camel 3.16 the line 
https://github.com/apache/camel-kamelets/blob/main/kamelets/aws-kinesis-source.kamelet.yaml#L106
 : 
   
   ```yaml
   - set-body:
             simple: "${body.data().asInputStream()}"
   ```
   result in an error: 
   
   ```
   2022-05-02 17:32:41,442 [c-kin-stream-49] ERROR 
org.apache.camel.processor.errorhandler.DefaultErrorHandler - Failed delivery 
for (MessageId: B4A51E4608514A0-0000000000000000 on ExchangeId: 
B4A51E4608514A0-0000000000000000). Exhausted after delivery attempt: 1 caught: 
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke 
method: data() on null due to: 
org.apache.camel.component.bean.MethodNotFoundException: Method with name: 
data() not found on bean: java.io.ByteArrayInputStream@55cdc0b0 of type: 
java.io.ByteArrayInputStream on the exchange: 
Exchange[B4A51E4608514A0-0000000000000000]
   
   Message History (complete message history is disabled)
   
---------------------------------------------------------------------------------------------------------------------------------------
   Source                                   ID                             
Processor                                          Elapsed (ms)
   aws-kinesis-source.kamelet.yaml:95       aws-kinesis-source-13/aws-kine 
from[aws2-kinesis://ckc-kin-stream-49?accessKey=RA           18
        ...
   aws-kinesis-source.kamelet.yaml:105      aws-kinesis-source-13/setBody1 
setBody[simple{${body.data().asInputStream()}}]               0
   
   Stacktrace
   
---------------------------------------------------------------------------------------------------------------------------------------
   org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to 
invoke method: data() on null due to: 
org.apache.camel.component.bean.MethodNotFoundException: Method with name: 
data() not found on bean: java.io.ByteArrayInputStream@55cdc0b0 of type: 
java.io.ByteArrayInputStream on the exchange: 
Exchange[B4A51E4608514A0-0000000000000000]
        at 
org.apache.camel.language.bean.BeanExpression.invokeOgnlMethod(BeanExpression.java:453)
 ~[camel-bean-3.16.0.jar:3.16.0]
        at 
org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:199) 
~[camel-bean-3.16.0.jar:3.16.0]
        at 
org.apache.camel.language.bean.BeanExpression.evaluate(BeanExpression.java:214) 
~[camel-bean-3.16.0.jar:3.16.0]
        at 
org.apache.camel.language.simple.SimpleExpressionBuilder$28.evaluate(SimpleExpressionBuilder.java:782)
 ~[camel-core-languages-3.16.0.jar:3.16.0]
        at 
org.apache.camel.support.ExpressionAdapter.evaluate(ExpressionAdapter.java:45) 
~[camel-support-3.16.0.jar:3.16.0]
        at 
org.apache.camel.processor.SetBodyProcessor.process(SetBodyProcessor.java:45) 
~[camel-core-processor-3.16.0.jar:3.16.0]
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to