Hello, I discovered in this PR the usage of javax validation api. I thought it was a very good approach and wanted to try it for a binding I’m currently working on in order to enhance validation handling for configuration and dto classes.
I see no specific dependency in the pom.xml of this PR and apparently jakarta.validation-api is already a dependency in openhab-core. Thought, well, it will be easy to give it a try.
I messed around in my pom.xml adding some variations of :
<dependencies> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>6.2.0.Final</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator-annotation-processor</artifactId> <version>6.2.0.Final</version> </dependency> <dependency> <groupId>jakarta.validation</groupId> <artifactId>jakarta.validation-api</artifactId> <version>2.0.2</version> </dependency> </dependencies>
and feature.xml :
but without any success to have it functioning.
I end up with this error :
20:43:28.483 [WARN ] [mmon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception: javax.validation.NoProviderFoundException: Unable to create a Configuration, because no Jakarta Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
Can someone more skilled on dependencies handling give me a hint ?