You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/06/18 10:41:05 UTC
[GitHub] [camel-quarkus] juliuskrah opened a new issue, #3857: Camel TypeConverterLoader in native mode
juliuskrah opened a new issue, #3857:
URL: https://github.com/apache/camel-quarkus/issues/3857
Camel Quarkus: `2.9.2.Final`
Quarkus: `2.9.2.Final`
JDK: `17`
Extension: `camel-quarkus-jackson`
When quarkus is built in native mode, the Service Locator for `Camel TypeConverterLoader` is not loaded. Below is my `application.properties`
```properties
quarkus.log.min-level=TRACE
quarkus.log.category."org.apache.camel.impl.converter.CoreTypeConverterRegistry".level=TRACE
# Register org.apache.camel.component.jackson.converter.JacksonTypeConvertersLoader
quarkus.native.auto-service-loader-registration=true
quarkus.native.additional-build-args=-H:ReflectionConfigurationFiles=reflection-config.json
```
The class `JacksonTypeConverters` is also registered for reflection in `src/main/resources/reflection-config.json`
```json
[
{
"name": "org.apache.camel.component.jackson.converter.JacksonTypeConverters",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredFields": true,
"allPublicFields": true
}
]
```
The service registration of `camel-jackson-3.16.0.jar/META-INF/services/org/apache/camel/TypeConverterLoader` is not happening
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] juliuskrah commented on issue #3857: Camel TypeConverterLoader in native mode
Posted by GitBox <gi...@apache.org>.
juliuskrah commented on issue #3857:
URL: https://github.com/apache/camel-quarkus/issues/3857#issuecomment-1159683347
I get the error below in native mode; it is ok in JVM mode. I have uploaded a reproducer. The Readme contains the RabbitMQ payload
[reproducer.zip](https://github.com/apache/camel-quarkus/files/8935163/reproducer.zip)
```posh
2022-06-19 10:20:39,179 WARN [org.apa.cam.com.rab.RabbitMQConsumer] (Camel (camel-1) thread #3 - rabbitmq://IN.GEN.TPG.PAYMENTS) Error processing exchange. Exchange[3A9EFDB8E981AD2-0000000000000000]. Caused by: [org.apache.camel.component.bean.ParameterBindingException - Error during parameter binding on method: io.example.dto.AcknowledgementRequest io.example.components.RequestHandler.handleAcknowledgeRequest(io.example.dto.Acknowledgement) at parameter #0 with type: class io.example.dto.Acknowledgement with value type: class java.lang.String and value: {
"receiptNumber": "123456789",
"statusCode": 111,
"tokenService": 0,
"amount": 10.0,
"statusDescription": "A success",
"beepTransactionId": 123123123,
"payerTransactionId": "some random string"
}
]: org.apache.camel.component.bean.ParameterBindingException: Error during parameter binding on method: io.example.dto.AcknowledgementRequest io.example.components.RequestHandler.handleAcknowledgeRequest(io.example.dto.Acknowledgement) at parameter #0 with type: class io.example.dto.Acknowledgement with value type: class java.lang.String and value: {
"receiptNumber": "123456789",
"statusCode": 111,
"tokenService": 0,
"amount": 10.0,
"statusDescription": "A success",
"beepTransactionId": 123123123,
"payerTransactionId": "some random string"
}
at org.apache.camel.component.bean.MethodInfo$ParameterExpression.evaluateParameterValue(MethodInfo.java:723)
at org.apache.camel.component.bean.MethodInfo$ParameterExpression.evaluateParameterExpressions(MethodInfo.java:619)
at org.apache.camel.component.bean.MethodInfo$ParameterExpression.evaluate(MethodInfo.java:592)
at org.apache.camel.component.bean.MethodInfo.initializeArguments(MethodInfo.java:263)
at org.apache.camel.component.bean.MethodInfo.createMethodInvocation(MethodInfo.java:271)
at org.apache.camel.component.bean.BeanInfo.createInvocation(BeanInfo.java:277)
at org.apache.camel.component.bean.AbstractBeanProcessor.process(AbstractBeanProcessor.java:126)
at org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:81)
at org.apache.camel.component.bean.BeanProducer.process(BeanProducer.java:41)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:172)
at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler$SimpleTask.run(RedeliveryErrorHandler.java:471)
at org.apache.camel.impl.engine.DefaultReactiveExecutor$Worker.schedule(DefaultReactiveExecutor.java:193)
at org.apache.camel.impl.engine.DefaultReactiveExecutor.scheduleMain(DefaultReactiveExecutor.java:64)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:184)
at org.apache.camel.impl.engine.CamelInternalProcessor.process(CamelInternalProcessor.java:399)
at org.apache.camel.impl.engine.DefaultAsyncProcessorAwaitManager.process(DefaultAsyncProcessorAwaitManager.java:83)
at org.apache.camel.support.AsyncProcessorSupport.process(AsyncProcessorSupport.java:41)
at org.apache.camel.component.rabbitmq.RabbitConsumer.doHandleDelivery(RabbitConsumer.java:113)
at org.apache.camel.component.rabbitmq.RabbitConsumer.handleDelivery(RabbitConsumer.java:88)
at com.rabbitmq.client.impl.ConsumerDispatcher$5.run(ConsumerDispatcher.java:149)
at com.rabbitmq.client.impl.ConsumerWorkService$WorkPoolRunnable.run(ConsumerWorkService.java:104)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.lang.Thread.run(Thread.java:833)
at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:597)
at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:194)
Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.lang.String to the required type: io.example.dto.Acknowledgement
at org.apache.camel.impl.converter.CoreTypeConverterRegistry.mandatoryConvertTo(CoreTypeConverterRegistry.java:274)
at org.apache.camel.component.bean.MethodInfo$ParameterExpression.evaluateParameterValue(MethodInfo.java:712)
... 25 more
```
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] juliuskrah commented on issue #3857: Camel TypeConverterLoader in native mode
Posted by GitBox <gi...@apache.org>.
juliuskrah commented on issue #3857:
URL: https://github.com/apache/camel-quarkus/issues/3857#issuecomment-1159719687
> Add annotation `@RegisterForReflection` to `io.example.dto.Acknowledgement`.
This did the trick. Closing issue
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] jamesnetherton commented on issue #3857: Camel TypeConverterLoader in native mode
Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on issue #3857:
URL: https://github.com/apache/camel-quarkus/issues/3857#issuecomment-1159702422
Add annotation `@RegisterForReflection` to `io.example.dto.Acknowledgement`.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] juliuskrah closed issue #3857: Camel TypeConverterLoader in native mode
Posted by GitBox <gi...@apache.org>.
juliuskrah closed issue #3857: Camel TypeConverterLoader in native mode
URL: https://github.com/apache/camel-quarkus/issues/3857
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [camel-quarkus] jamesnetherton commented on issue #3857: Camel TypeConverterLoader in native mode
Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on issue #3857:
URL: https://github.com/apache/camel-quarkus/issues/3857#issuecomment-1159651196
What's the actual issue you are facing?
Camel Quarkus automatically discovers all `TypeConverterLoader` instances at build time. There is no need to register services or configure reflection for them.
--
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.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org