IBM Support

PI35626: ApacheValidationProvider class not found when using third party packages that utilize Bean Validation.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • The required Bean Validation packages aren't visible when
    using certain third party packages that utilize Bean
    Validation, such as the Hibernate JPA provider.  The
    following exception will be seen in this scenario:
    
    javax.validation.ValidationException: Could not create
    Configuration.
    at
    javax.validation.Validation$GenericBootstrapImpl.configure(V
    alidation.java:175)
    at
    javax.validation.Validation.buildDefaultValidatorFactory(Val
    idation.java:50)
    at
    com.ibm.ws.beanvalidation.ValidatorFactoryAccessor.getValida
    torFactory(ValidatorFactoryAccessor.java:59)
    ... 39 more
    Caused by: javax.validation.ValidationException: Failed to
    load provider
    at
    javax.validation.Validation$DefaultValidationProviderResolve
    r.getValidationProviders(Validation.java:215)
    at
    javax.validation.Validation$GenericBootstrapImpl.configure(V
    alidation.java:173)
    ... 41 more
    Caused by: java.lang.ClassNotFoundException:
    org.apache.bval.jsr303.ApacheValidationProvider
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at
    org.apache.geronimo.osgi.locator.ProviderLocator.loadClass(P
    roviderLocator.java:195)
    at
    org.apache.geronimo.osgi.locator.ProviderLocator.locateServi
    ceClasses(ProviderLocator.java:524)
    at
    org.apache.geronimo.osgi.locator.ProviderLocator.getServices
    (ProviderLocator.java:315)
    at
    javax.validation.Validation$DefaultValidationProviderResolve
    r.getValidationProviders(Validation.java:209)
    ... 42 more
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty Profile - Bean Validation    *
    *                  API                                         *
    ****************************************************************
    * PROBLEM DESCRIPTION: ApacheValidationProvider class not      *
    *                      found when using third party packages   *
    *                      that utilize Bean Validation.           *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The required Bean Validation packages aren't visible when using
    certain third party packages that utilize Bean Validation, such
    as the Hibernate JPA provider.  The following exception will be
    seen in this scenario:
    
    javax.validation.ValidationException: Could not create
    Configuration.
    at
    javax.validation.Validation$GenericBootstrapImpl.configure(Valid
    ation.java:175)
    at
    javax.validation.Validation.buildDefaultValidatorFactory(Validat
    ion.java:50)
    at
    com.ibm.ws.beanvalidation.ValidatorFactoryAccessor.getValidatorF
    actory(ValidatorFactoryAccessor.java:59)
    ... 39 more
    Caused by: javax.validation.ValidationException: Failed to load
    provider
    at
    javax.validation.Validation$DefaultValidationProviderResolver.ge
    tValidationProviders(Validation.java:215)
    at
    javax.validation.Validation$GenericBootstrapImpl.configure(Valid
    ation.java:173)
    ... 41 more
    Caused by: java.lang.ClassNotFoundException:
    org.apache.bval.jsr303.ApacheValidationProvider
    at java.lang.Class.forNameImpl(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at
    org.apache.geronimo.osgi.locator.ProviderLocator.loadClass(Provi
    derLocator.java:195)
    at
    org.apache.geronimo.osgi.locator.ProviderLocator.locateServiceCl
    asses(ProviderLocator.java:524)
    at
    org.apache.geronimo.osgi.locator.ProviderLocator.getServices(Pro
    viderLocator.java:315)
    at
    javax.validation.Validation$DefaultValidationProviderResolver.ge
    tValidationProviders(Validation.java:209)
    ... 42 more
    

Problem conclusion

  • The Bean Validation packages are now made available on the
    appropriate thread when third party libraries make use of Bean
    Validation.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 8.5.5.5.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI35626

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2015-02-24

  • Closed date

    2015-02-25

  • Last modified date

    2015-03-10

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WAS LIBERTY COR

  • Fixed component ID

    5725L2900

Applicable component levels

  • R855 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSD28V","label":"WebSphere Application Server Liberty Core"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 April 2022