Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws-kinesis-source kamelets incompatible with camel 3.16 #908

Closed
valdar opened this issue May 2, 2022 · 0 comments · Fixed by #911
Closed

aws-kinesis-source kamelets incompatible with camel 3.16 #908

valdar opened this issue May 2, 2022 · 0 comments · Fixed by #911
Assignees

Comments

@valdar
Copy link
Member

valdar commented May 2, 2022

Since apache/camel@e5cf3d4 was included in camel 3.16 the line https://github.com/apache/camel-kamelets/blob/main/kamelets/aws-kinesis-source.kamelet.yaml#L106 :

- 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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants