-
Notifications
You must be signed in to change notification settings - Fork 52
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
Injecting a CDI bean managed by Quarkus into Camel K routes leads to a null reference #362
Comments
The reason of the failure is because of a wrong ordering of loading routes and post process them in camel-quarkus so the call to However, if you change the processor invocation from Opened an issue on camel-quarkus |
Thanks a lot! I confirm |
It seems however lookup by type does not work: There is no error, but the bean instances are not the same so the method handler interceptor does not work. |
yeah that is because under the hood the BeanReifier does
so it won't search for a bean of type |
That is what I suspected, but I find it a bit confusing that |
@astefanutti yeah we can make bean(class) lookup too and if there is a single bean of that type then use it. However Camel did not have lookup anonymous by type in the beginning, and hence why bean is like that. Would you create a JIRA ticket at Camel 3 project for this improvement |
@astefanutti the injection issue has been fixed in camel-quakrus and will be available in the next release |
@lburgazzoli awesome. I'll try it ASAP. Let me close this then. |
In this example https://github.com/astefanutti/camel-k-example-metrics, I've declared a CDI bean in an external beans archive, that I use in a Camel K route.
However, this leads to the following exception when the integration starts:
The text was updated successfully, but these errors were encountered: