You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by jdart <jd...@vmware.com> on 2010/11/18 23:52:53 UTC

Re: org.apache.servicemix.bundles.hibernate-validator: Unable to find a default provider

I think this still may be broken in the OSGi environment in the case where
you are configuring for a specific provider class (in my case I am using
Apache Bean Validation). I am getting an exception at

javax.validation.Validation$ProviderSpecificBootstrapImpl.configure(Validation.java:223)

When I step through the code I see that it is calling the default validation
provider resolver to get the list of validation providers - and neither the
Osgi loading mechanism nor the services file mechanism is returning a
provider.

But it does not make sense to me that it is calling the resolver at all
because in this part of the code it already has the specific validator class
instance, so all it should have to do is instantiate it.


-- 
View this message in context: http://servicemix.396122.n5.nabble.com/org-apache-servicemix-bundles-hibernate-validator-Unable-to-find-a-default-provider-tp3205442p3271630.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: org.apache.servicemix.bundles.hibernate-validator: Unable to find a default provider

Posted by Bengt Rodehav <be...@rodehav.com>.
It sounds like I have to take a look at Apache Bean Validation then.

2010/11/19 jdart <jd...@vmware.com>

>
> FYI - I used a workaround similar to that detailed here:
>
> http://katastrophos.net/magnus/blog/2009/07/18/having-fun-with-jsr-303-beans-validation-and-osgi-spring-dm/
>
> (substituting the Apache provider for Hibernate) and it worked - but I
> think
> if the JSR-303 Validation code did the right thing this should not be
> necessary.
>
> > Out of curiosity, how would you compare Apache Bean Validation with
> > Hibernate validator - is it good?
>
> It has more functionality because it supports the method parameter and
> return value validation methods that are in an appendix of the JSR-303
> spec.
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/org-apache-servicemix-bundles-hibernate-validator-Unable-to-find-a-default-provider-tp3205442p3272801.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>

Re: org.apache.servicemix.bundles.hibernate-validator: Unable to find a default provider

Posted by jdart <jd...@vmware.com>.
FYI - I used a workaround similar to that detailed here:
http://katastrophos.net/magnus/blog/2009/07/18/having-fun-with-jsr-303-beans-validation-and-osgi-spring-dm/ 

(substituting the Apache provider for Hibernate) and it worked - but I think
if the JSR-303 Validation code did the right thing this should not be
necessary.

> Out of curiosity, how would you compare Apache Bean Validation with
> Hibernate validator - is it good? 

It has more functionality because it supports the method parameter and
return value validation methods that are in an appendix of the JSR-303 spec.
-- 
View this message in context: http://servicemix.396122.n5.nabble.com/org-apache-servicemix-bundles-hibernate-validator-Unable-to-find-a-default-provider-tp3205442p3272801.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: org.apache.servicemix.bundles.hibernate-validator: Unable to find a default provider

Posted by Bengt Rodehav <be...@rodehav.com>.
I've only used the hibernate validator (default) so this is a new area to
me.

Out of curiosity, how would you compare Apache Bean Validation with
Hibernate validator - is it good?

/Bengt

2010/11/18 jdart <jd...@vmware.com>

>
> I think this still may be broken in the OSGi environment in the case where
> you are configuring for a specific provider class (in my case I am using
> Apache Bean Validation). I am getting an exception at
>
>
> javax.validation.Validation$ProviderSpecificBootstrapImpl.configure(Validation.java:223)
>
> When I step through the code I see that it is calling the default
> validation
> provider resolver to get the list of validation providers - and neither the
> Osgi loading mechanism nor the services file mechanism is returning a
> provider.
>
> But it does not make sense to me that it is calling the resolver at all
> because in this part of the code it already has the specific validator
> class
> instance, so all it should have to do is instantiate it.
>
>
> --
> View this message in context:
> http://servicemix.396122.n5.nabble.com/org-apache-servicemix-bundles-hibernate-validator-Unable-to-find-a-default-provider-tp3205442p3271630.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>