-
Notifications
You must be signed in to change notification settings - Fork 344
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
Trying to use bean method call #class:com.mongodb.client.MongoClients#create("mongodb://foo") throws ClassNotFoundException #2444
Comments
Yeah unfortunately using factory methods is not supported yet when using |
Created a ticket |
Instead you can use a script to create the bean
|
@lburgazzoli did we get rid of the duplicate code in camel-quarkus that setup local beans, eg I think in the past we had some code from camel-core copied over to camel-quarkus. I am asking because I update the camel-core to add support for the #class with factory method in the The stacktrace in the top refers to a |
Camel 3.12 now supports the factory method (must be public static). You can include the return type class of the created bean (if you want) as that allows Camel to know its type for dependency injection, otherwise it becomes a Object type. You do this with the
|
As far as I remember yes we don't hvae the duplication anymore, but @jamesnetherton knows better |
Yeah, there is no duplication anymore. I don't think that change made it into CQ 2.0.0-M2, so it'll be there from 2.0.0 onwards. |
This issue has been automatically marked as stale due to 90 days of inactivity. |
To create a custom mongodb connection using MongoClient in a kamelet throws a
ClassNotFoundException
The MongoClient is created like:
Setting the bean in a kamelet
Also tried with
#type
in place of#class
, but same error occurs.Causes
The text was updated successfully, but these errors were encountered: