KilianB/JImageHash

3.0.0 conflicts with Spring Boot 2.1.1 Release

navykoo opened this issue · 1 comments

When adopting 3.0.0 release on a SPRING BOOT 2.1.1 RELEASE based project, it failed during web container start up with an error of - " org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.valueextraction.ValueExtractorManager
". It seemed like a conflict with hibernate validator while I have no idea why JImageHash would have any side affect of hibernate validator.

When I switched JImageHash version from 3.0.0 to 2.1.1, it all passed. Is it because JImageHash version aligns with SPRING BOOT version?

Thanks.

The library contains a lot of dependencies that are needed for the examples, but not if you only want to use the algorithms.

Try excluding these:

    <exclusions>  
        <exclusion>  
            <groupId>org.openjfx</groupId>  
            <artifactId>javafx-graphics</artifactId>  
        </exclusion>  
        <exclusion>  
            <groupId>org.openjfx</groupId>  
            <artifactId>javafx-swing</artifactId>  
        </exclusion>  
        <exclusion>  
            <groupId>org.openjfx</groupId>  
            <artifactId>javafx-web</artifactId>  
        </exclusion>  
        <exclusion>  
            <groupId>org.openjfx</groupId>  
            <artifactId>javafx-fxml</artifactId>  
        </exclusion>  
        <exclusion>  
            <groupId>org.jsoup</groupId>  
            <artifactId>jsoup</artifactId>  
        </exclusion>  
        <exclusion>  
            <groupId>org.json</groupId>  
            <artifactId>json</artifactId>  
        </exclusion>  
        <exclusion>  
            <groupId>com.h2database</groupId>  
            <artifactId>h2</artifactId>  
        </exclusion>  
    </exclusions>