weimeilin79 opened a new issue #1983:
URL: https://github.com/apache/camel-quarkus/issues/1983


   Making a simple demo on format convert, but was getting error msg: 
   This works with java main, so I am assuming it's an Quarkus problem? 
   
   ```
   
from("platform-http:/transfer?httpMethodRestrict=POST&consumes=application/json")
             .marshal().protobuf("demo.camel.TransactionProtos$Transaction")
             
.toD("kafka:weborder?brokers=localhost:9092&groupId=producergroup&serializerClass=org.apache.kafka.common.serialization.ByteBufferSerializer&key=${header.sender}")
   ```
   
   ```
   org.apache.camel.NoTypeConversionAvailableException: No type converter 
available to convert from type: byte[] to the required type: 
com.google.protobuf.Message with value [B@2eeab517
           at 
org.apache.camel.impl.converter.CoreTypeConverterRegistry.mandatoryConvertTo(CoreTypeConverterRegistry.java:220)
           at 
org.apache.camel.dataformat.protobuf.ProtobufDataFormat.convertGraphToMessage(ProtobufDataFormat.java:160)
           at 
org.apache.camel.dataformat.protobuf.ProtobufDataFormat.marshal(ProtobufDataFormat.java:129)
           at 
org.apache.camel.support.processor.MarshalProcessor.process(MarshalProcessor.java:64)
           at 
org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:404)
           at 
org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:148)
           at 
org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:60)
           at org.apache.camel.processor.Pipeline.process(Pipeline.java:147)
           at 
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:288)
           at 
org.apache.camel.quarkus.component.platform.http.runtime.QuarkusPlatformHttpConsumer.lambda$handleRequest$2(QuarkusPlatformHttpConsumer.java:397)
           at 
io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:313)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
           at 
java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
           at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
           at java.base/java.lang.Thread.run(Thread.java:834)
   ```
   
   
   Project repo:
   Java Main:
   
https://github.com/weimeilin79/avroprotobuf/tree/master/camel-demo-restprotobuf
   
   Quarkus:
   
https://github.com/weimeilin79/avroprotobuf/tree/master/camel-quarkus-restprotobuf
   


----------------------------------------------------------------
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.

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


Reply via email to