Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-16890

Cannot convert buffer types in platform-http

XMLWordPrintable

    • False
    • False
    • % %
    • Todo
    • Undefined

      Detail cloned from upstream issue https://github.com/apache/camel-quarkus/issues/2838.

      The following service in a Camel K integration:

            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)
      

              jnethert@redhat.com James Netherton
              jnethert@redhat.com James Netherton
              Martin Muzikar Martin Muzikar
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: