You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Willem Jiang (JIRA)" <ji...@apache.org> on 2010/10/12 06:56:40 UTC

[jira] Commented: (SMX4-605) jsr303 api bundle doesn't support find the ValidatorProvider in the OSGi out of box

    [ https://issues.apache.org/activemq/browse/SMX4-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=62509#action_62509 ] 

Willem Jiang commented on SMX4-605:
-----------------------------------

Here is way to workaround the issue by providing the OSGi version ProviderResolver and using it when you create the Validate instance.
You can take a look the  DefaultValidationProviderResolver part of SMX4-605.patch

{code}
    GenericBootstrap bootstrap =  Validator.byDefaultProvider();
    bootstrap.providerResolver( YourProviderResolver );
    ValidatorFactory factory = bootstrap.configure().buildValidatorFactory();
    ......
{code}

Willem

> jsr303 api bundle doesn't support find the ValidatorProvider in the OSGi out of box
> -----------------------------------------------------------------------------------
>
>                 Key: SMX4-605
>                 URL: https://issues.apache.org/activemq/browse/SMX4-605
>             Project: ServiceMix 4
>          Issue Type: Bug
>          Components: Bundles
>            Reporter: Willem Jiang
>            Assignee: Freeman Fang
>             Fix For: specs-1.6.0
>
>         Attachments: SMX4-605.patch, validator-test.zip
>
>
> The JSR 303 API bundle doesn't use the service locator to load the ValidatorProvider in OSGi.
> Here  is the mail thread[1] which discuss about it.
> [1] http://servicemix.396122.n5.nabble.com/org-apache-servicemix-bundles-hibernate-validator-Unable-to-find-a-default-provider-td3205442.html;cid=1286857886956-126#a3205442

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.