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

No type converter warning if final type of body is java.util.Map #390

Closed
igarashitm opened this issue Jul 13, 2020 · 0 comments · Fixed by #396
Closed

No type converter warning if final type of body is java.util.Map #390

igarashitm opened this issue Jul 13, 2020 · 0 comments · Fixed by #396
Assignees
Milestone

Comments

@igarashitm
Copy link

If a camel source consumer route carries java.util.Map type of body at the end, it gets following WARN.
It's just an eyesore and route itself works just fine, but probably better to silently ignore if body type is not usable for this KnativeHttpConsumer

2] 2020-07-13 13:29:19.866 WARN  [vert.x-eventloop-thread-1] KnativeHttpConsumer - Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: java.util.LinkedHashMap to the required type: byte[] with value {[email protected], Phone=123123123, Id=0031I0000198G43QAE, Name=asdf asdf}]
[2] org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.util.LinkedHashMap to the required type: byte[] with value {[email protected], Phone=123123123, Id=0031I0000198G43QAE, Name=asdf asdf}
[2] 	at org.apache.camel.impl.converter.CoreTypeConverterRegistry.mandatoryConvertTo(CoreTypeConverterRegistry.java:216) ~[org.apache.camel.camel-base-3.4.0.jar:3.4.0]
[2] 	at org.apache.camel.impl.converter.CoreTypeConverterRegistry.mandatoryConvertTo(CoreTypeConverterRegistry.java:168) ~[org.apache.camel.camel-base-3.4.0.jar:3.4.0]
[2] 	at org.apache.camel.component.knative.http.KnativeHttpConsumer.computeResponseBody(KnativeHttpConsumer.java:317) ~[org.apache.camel.k.camel-knative-http-1.3.1-SNAPSHOT.jar:1.3.1-SNAPSHOT]
[2] 	at org.apache.camel.component.knative.http.KnativeHttpConsumer.lambda$handleRequest$3(KnativeHttpConsumer.java:196) ~[org.apache.camel.k.camel-knative-http-1.3.1-SNAPSHOT.jar:1.3.1-SNAPSHOT]
[2] 	at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:330) ~[io.vertx.vertx-core-3.9.0.jar:3.9.0]
[2] 	at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:369) ~[io.vertx.vertx-core-3.9.0.jar:3.9.0]
[2] 	at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38) ~[io.vertx.vertx-core-3.9.0.jar:3.9.0]
[2] 	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [io.netty.netty-common-4.1.48.Final.jar:4.1.48.Final]
[2] 	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) [io.netty.netty-common-4.1.48.Final.jar:4.1.48.Final]
[2] 	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) [io.netty.netty-transport-4.1.48.Final.jar:4.1.48.Final]
[2] 	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [io.netty.netty-common-4.1.48.Final.jar:4.1.48.Final]
[2] 	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [io.netty.netty-common-4.1.48.Final.jar:4.1.48.Final]
[2] 	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty.netty-common-4.1.48.Final.jar:4.1.48.Final]
[2] 	at java.lang.Thread.run(Thread.java:834) [?:?]

This WARN could be avoided by converting to json at the end of the consumer route.

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