cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies (JIRA)" <>
Subject [jira] [Commented] (CXF-6706) Bean validation seems to not be working in OSGi
Date Wed, 16 Dec 2015 19:52:46 GMT


Benson Margulies commented on CXF-6706:

[] So, that PR still need a classloader trick to avoid a problem with
EL, and I'm really unsure as to how to get the small test case to try to follow along.

Here's the pattern: when you create a JAX-RS service, you cause some jetty bundle to call
your resource class, and then the resource class calls validate(), and that goes 'poof'. I
am going to try to cook up something with a TinyBundle to do this, but if you happen to see
this and have an idea of a shorter cut, I'd be grateful. I'm at end of day in this time zone.

[~gunnar.morling] I continue to strive to make you a self-contained test case :-)

> Bean validation seems to not be working in OSGi
> -----------------------------------------------
>                 Key: CXF-6706
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.4, 3.2.0
>            Reporter: Benson Margulies
>            Assignee: Benson Margulies
>             Fix For: 3.1.5, 3.2.0
> Using Karaf 4.0.2, 
> if you take this repo:
> and checkout the use-cxf-support branch, it will build you a Karaf assembly that, when
you poke the service (http://localhost:8181/cxf/validate)
> will yield the following backtrace. This assumes that you are up to date with my fix
to cxf-6705 which is on master and the 3.1.x branch.
> {noformat}
> javax.validation.ValidationException: Unable to find a default provider
> 	at javax.validation.Validation$GenericBootstrapImpl.configure(
> 	at javax.validation.Validation.buildDefaultValidatorFactory(
> 	at org.apache.cxf.validation.BeanValidationProvider.<init>(
> 	at com.basistech.ts.impl.TrivialService.validate(
> {noformat}

This message was sent by Atlassian JIRA

View raw message