IBM Support

PI77976: ConstraintViolationException when using @Valid annotation

Fixes are available

17.0.0.2: WebSphere Application Server Liberty 17.0.0.2
17.0.0.3: WebSphere Application Server Liberty 17.0.0.3
17.0.0.4: WebSphere Application Server Liberty 17.0.0.4
18.0.0.1: WebSphere Application Server Liberty 18.0.0.1
18.0.0.2: WebSphere Application Server Liberty 18.0.0.2
18.0.0.3: WebSphere Application Server Liberty 18.0.0.3
18.0.0.4: WebSphere Application Server Liberty 18.0.0.4
19.0.0.1: WebSphere Application Server Liberty 19.0.0.1
19.0.0.2: WebSphere Application Server Liberty 19.0.0.2
19.0.0.3: WebSphere Application Server Liberty 19.0.0.3
19.0.0.4: WebSphere Application Server Liberty 19.0.0.4
19.0.0.5: WebSphere Application Server Liberty 19.0.0.5
19.0.0.6: WebSphere Application Server Liberty 19.0.0.6
19.0.0.7: WebSphere Application Server Liberty 19.0.0.7
19.0.0.8: WebSphere Application Server Liberty 19.0.0.8
19.0.0.9: WebSphere Application Server Liberty 19.0.0.9
19.0.0.10: WebSphere Application Server Liberty 19.0.0.10
19.0.0.11: WebSphere Application Server Liberty 19.0.0.11
19.0.0.12: WebSphere Application Server Liberty 19.0.0.12
20.0.0.1: WebSphere Application Server Liberty 20.0.0.1
20.0.0.2: WebSphere Application Server Liberty 20.0.0.2
20.0.0.3: WebSphere Application Server Liberty 20.0.0.3
20.0.0.4: WebSphere Application Server Liberty 20.0.0.4
20.0.0.5: WebSphere Application Server Liberty 20.0.0.5
20.0.0.6: WebSphere Application Server Liberty 20.0.0.6
20.0.0.7: WebSphere Application Server Liberty 20.0.0.7
20.0.0.8: WebSphere Application Server Liberty 20.0.0.8
20.0.0.9: WebSphere Application Server Liberty 20.0.0.9
20.0.0.10: WebSphere Application Server Liberty 20.0.0.10
20.0.0.11: WebSphere Application Server Liberty 20.0.0.11
20.0.0.12: WebSphere Application Server Liberty 20.0.0.12

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • [WARNING ] Interceptor for
    {http://<application_url>/}ApplicationResource has thrown
    exception, unwinding now
    javax.validation.ConstraintViolationException
    
    In cxf, there is org.apache.cxf.jaxrs.validation.
    JAXRSBeanValidationFeature which should avoid this warning
    in
    the log. This feature creates request interceptor which will
    catch ValidationException and add  NoOpFaultListener to
    disable
    exception logging, but for some reason liberty never
    initializes this feature.
    

Local fix

  • N/A
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of the beanValidation feature     *
    *                  within IBM WebSphere Application Server     *
    *                  Liberty - JAX-RS                            *
    ****************************************************************
    * PROBLEM DESCRIPTION: ConstraintViolationException in logs    *
    *                      when BeanValidation feature is enabled  *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    With the beanValidation feature enabled,
    ConstraintViolationExceptions will be thrown when
    parameters are not valid,  however the following messages
    should not be written to the log files:
    [WARNING
    ]
    Interceptor
    for
    {http://<application_url>/}ApplicationResource has thrown
    exception, unwinding now
    javax.validation.ConstraintViolationException
    
    In cxf, there is org.apache.cxf.jaxrs.validation.
    JAXRSBeanValidationFeature which should avoid this warning in
    the log.
    

Problem conclusion

  • The code has been changed to disable exception logging related
    to validation when the beanValidation feature is in force.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 17.0.0.2.  Please refer to the Recommended Updates page for
    delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • The following could be added to the server.xml to not log these
    messages:
    <logging hideMessage="FFDC1015I: An FFDC Incident has been
    created: &quot;javax.validation.ConstraintViolationException
    com.ibm.ws.jaxrs20.server.LibertyJaxRsInvoker
    215&quot;,Interceptor for {http://" />
    

Comments

APAR Information

  • APAR number

    PI77976

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    855

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-03-10

  • Closed date

    2017-05-11

  • Last modified date

    2017-05-11

  • 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

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

  • R855 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"855","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
19 October 2021