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

Cannot convert buffer types in platform-http #2838

Closed
nicolaferraro opened this issue Jun 23, 2021 · 3 comments
Closed

Cannot convert buffer types in platform-http #2838

nicolaferraro opened this issue Jun 23, 2021 · 3 comments
Assignees
Milestone

Comments

@nicolaferraro
Copy link
Member

I'm using the following service in a Camel K integration (My test was with Quarkus 1.x):

      rest().post("/{currency}")
        .route()
        .log("Asking the internal department to BUY ${header.currency}...");

I expected the service to echo the message back (it was working this way), but I get a conversion error:

cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration 2021-06-23 16:45:00,677 ERROR [io.qua.ver.htt.run.QuarkusErrorHandler] (vert.x-eventloop-thread-1) HTTP Request to /BTC failed, error id: a90c1bee-809d-4eac-b71f-cd80ce31c762-1: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: io.vertx.core.buffer.impl.BufferImpl to the required type: java.nio.ByteBuffer with value {"value":33521.23,"operation":"buy"}
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at org.apache.camel.impl.converter.CoreTypeConverterRegistry.mandatoryConvertTo(CoreTypeConverterRegistry.java:275)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at org.apache.camel.impl.converter.CoreTypeConverterRegistry.mandatoryConvertTo(CoreTypeConverterRegistry.java:207)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at org.apache.camel.component.platform.http.vertx.VertxPlatformHttpSupport.writeResponse(VertxPlatformHttpSupport.java:181)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer.lambda$handleRequest$3(VertxPlatformHttpConsumer.java:198)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at io.vertx.core.impl.ContextImpl.lambda$null$0(ContextImpl.java:327)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at io.vertx.core.impl.ContextImpl.executeTask(ContextImpl.java:366)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at io.vertx.core.impl.EventLoopContext.lambda$executeAsync$0(EventLoopContext.java:38)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
cautious-investor-service-00004-deployment-6bbd6bbdf-zq8rw integration  at java.base/java.lang.Thread.run(Thread.java:829)
@jamesnetherton jamesnetherton self-assigned this Jun 24, 2021
@jamesnetherton
Copy link
Contributor

I can reproduce this in CQ 1.8.1 / Camel 3.9.0, but not with CQ 2.x / Camel 3.10.

I'll add a test to verify.

@jamesnetherton
Copy link
Contributor

Actually I'm wrong - I can reproduce with CQ 2.x.

jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Jun 24, 2021
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Jun 24, 2021
jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Jun 24, 2021
@jamesnetherton
Copy link
Contributor

I proposed a workaround in #2846 for CQ 2.0.0. I opened a Camel ticket to fix properly in later releases.

https://issues.apache.org/jira/browse/CAMEL-16756

jamesnetherton added a commit to jamesnetherton/camel-quarkus that referenced this issue Aug 5, 2021
@ppalaga ppalaga closed this as completed in a3df3f5 Aug 5, 2021
@ppalaga ppalaga added this to the 2.2.0 milestone Oct 22, 2021
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

No branches or pull requests

3 participants