eclipse-kuksa / kuksa.cloud

Kuksa Cloud repo
Eclipse Public License 2.0
17 stars 18 forks source link

Missing Hibernate validator dependency #149

Closed yolier closed 4 years ago

yolier commented 4 years ago

Hi,

I currently get the following error when I build and run the KUKSA-AppStore:

***************************
APPLICATION FAILED TO START
***************************

Description:

The Bean Validation API is on the classpath but no implementation could be found

Action:

Add an implementation, such as Hibernate Validator, to the classpath

I checked out the repo and build the appstore using mvn clean install. The error occurs when i start the app with java -jar target/kuksa.appstore-0.0.1-SNAPSHOT.jar

I could fix the issue by adding the following dependency:

<dependency>
    <groupId>org.hibernate.validator</groupId>
    <artifactId>hibernate-validator</artifactId>
    <version>6.1.0.Final</version>
</dependency>

Should this dependency be added? Or am I starting the app wrong etc?.

Thanks for your help!

yolier commented 4 years ago

I realized that the hibernate-validator is explicitly excluded from the org.vaadin.spring.extensions dependency. If I remove the exclude the application starts properly as well. Did the dependency cause problems in the past?

<dependency>
    <groupId>org.vaadin.spring.extensions</groupId>
    <artifactId>vaadin-spring-ext-boot</artifactId>
    <version>2.0.0.RELEASE</version>
    <exclusions>
        <exclusion>
            <groupId>org.hibernate.validator</groupId>
            <artifactId>hibernate-validator</artifactId>
        </exclusion>
    </exclusions>
</dependency>
ghost commented 4 years ago

We thought that hibernate-validator would be GPL-licensed and excluded it for that reason. We than ran into the trouble that you saw and figured out that it is licensed under Apache License 2.0. We therefore added it again and merged the change. The respective commit is not in the master branch, though. I'll check why that is the case.

Thanks for your feedback!

ghost commented 4 years ago

Thanks again for pointing this out, @YoLieR !