Jersey 2.6 REST Service upgraded to Java 8 tomcat 8 excpetion:java.lang.NoSuchMethodError: javax.validation.Configuration.getBootstrapConfiguration

classic Classic list List threaded Threaded
2 messages Options
ha
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Jersey 2.6 REST Service upgraded to Java 8 tomcat 8 excpetion:java.lang.NoSuchMethodError: javax.validation.Configuration.getBootstrapConfiguration

ha
My question is described in 

Your feedback will be appreciated.

Regards,
Haim   
--
Think Green - don't print this email unless you really need to
ha
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Jersey 2.6 REST Service upgraded to Java 8 tomcat 8 excpetion:java.lang.NoSuchMethodError: javax.validation.Configuration.getBootstrapConfiguration

ha
I debugged two cases one that works and one that does not. When the service works I noticed that ValidationBinder is injecting org.hibernate.validator.internal.engine.ConfigurationImpl.class to configuration field This implementation comes from the bean-validation-2.2.0 jar and implements the getBootstrapConfiguration() method When the service does not works I ValidationBinder is injectingorg.hibernate.validator.engine.ConfigurationImpl to configuration field Which comes from the hibernate-validation-4.2.0 jar.

I tried to force the setting by binding the Configuration to org.hibernate.validator.internal.engine.ConfigurationImpl.class
e.g. 
public class JerseyConfig extends ResourceConfig {

public JerseyConfig() {
register(new AbstractBinder() {
@Override
protected void configure() {
bind(org.hibernate.validator.internal.engine.ConfigurationImpl.class).to(Configuration.class);
}
});
}

but this did not resolved my issue.

On Mon, Mar 14, 2016 at 12:17 PM, ha <[hidden email]> wrote:
My question is described in 

Your feedback will be appreciated.

Regards,
Haim   
--
Think Green - don't print this email unless you really need to



--
Think Green - don't print this email unless you really need to
Loading...