mbknor / mbknor-jackson-jsonSchema

Generate JSON Schema with Polymorphism using Jackson annotations
MIT License
234 stars 79 forks source link

Generation throws java.lang.NoClassDefFoundError: javax/validation/constraints/NotBlank #170

Closed abhishiv closed 2 years ago

abhishiv commented 2 years ago

Hello,

trying to compile a simple example throws this error and I can't figure out what's the issue.

java.lang.reflect.InvocationTargetException
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.mojo.exec.ExecJavaMojo$1.run (ExecJavaMojo.java:297)
    at java.lang.Thread.run (Thread.java:829)
Caused by: java.lang.NoClassDefFoundError: javax/validation/constraints/NotBlank
abhishiv commented 2 years ago

My mistake - adding validation-api fixed it

    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>2.0.1.Final</version>
    </dependency>