-
Notifications
You must be signed in to change notification settings - Fork 198
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
NonUniqueBeanException: Multiple possible bean candidates found: [DefaultInternalConstraintValidatorFactory, DefaultConstraintValidatorFactory] #2793
Comments
@dstepanov I see you were the author of the |
@kareemelzayat is this a duplicated of micronaut-projects/micronaut-sql#1266 |
@sdelamo yes! that definitely seems like a duplicate. I suppose it will be fixed with Micronaut 4.3.2? |
Yes. |
@sdelamo I am still experiencing the same exact issue on Micronaut 4.3.2. Are you sure the problem got solved? |
@kareemelzayat Make sure you don't have Micronaut Validation and Micronaut Hibernate Validation on the classpath |
@dstepanov why not? I use them both 🤔 |
How?? |
Without the |
Also, without the |
Please create issues when you need correct results. |
But I don't understand why I have to use one or the other 🤔 Because I have been using both since forever |
Micronaut Validation implements the Jakarta validation API so that it doesn't use reflection, etc. It looks like we need to correct the bother use-case. |
@dstepanov yeah I think both libraries should be available to use without an issue. Do you need a ticket? |
@kareemelzayat you should use either Micronaut Validation or Micronaut Hibernate Validator. Both are implementations of the bean validation specification. |
the problem will be solved in 4.3.3. We found: micronaut-projects/micronaut-hibernate-validator#370 |
Expected Behavior
After upgrading to Micronaut 4.3.1, I should be able to have the app running locally without issues
Actual Behaviour
I am getting the following error when trying to run the Micronaut app locally:
From checking, it seems that Hibernate is confused which concrete Bean to use for validation. And it seems to be that
DefaultInternalConstraintValidatorFactory
was introduced lately.Is there any configuration that needs to be coded?
Steps To Reproduce
Run a Micronaut app locally with the environment set up below.
Environment Information
Environment:
Example Application
No response
Version
4.3.X
The text was updated successfully, but these errors were encountered: