IBM Support

PI59157: USING @REPORTASSINGLEVIOLATION WITH CUSTOM CONSTRAINT RESULTS IN ERRORS.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • User created several custom composite constraints for use with
    the Bean Validation framework.  These constraints used the
    annotation @ReportAsSingleViolation to override the violation
    reporting from the individual constraints.
    
    When a Java class where several fields are annotated with these
    custom constraints, it showed unusual behavior.  If a field
    results in a  violation, all remaining fields are also flagged
    as violation.
    
    This issue appears to be related to the following BVAL JIRA:
    https://issues.apache.org/jira/browse/BVAL-116
    

Local fix

  • No work around can be done at this time,
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server V8.0 who make use of                 *
    *                  Bean Validation and the annotation          *
    *                  @ReportAsSingleViolation.                   *
    ****************************************************************
    * PROBLEM DESCRIPTION: Using @ReportAsSingleViolation causes   *
    *                      multiple errors to be reported.         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    Take the following example:
    @NotNull
    @Size(min = 2, max = 10)
    ......
    @ReportAsSingleViolation
    public @interface MyInterface {
    Because @ReportAsSingleViolation is being used, only
    one violation should be reported for a violation such as null
    values.  However, the potential exists for multiple violations
    to occur when just one violation occurs.
    

Problem conclusion

  • With this fix, code has been added to Bean Validation to
    ensure that the @ReportAsSingleViolation operations function
    as expected.
    .
    The fix for this APAR is currently targeted for
    inclusion in Service Level (Fix Pack) 8.0.0.13 of WebSphere
    Application Server versions 8.0.
    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

    PI59157

  • Reported component name

    WEBSPHERE FOR Z

  • Reported component ID

    5655I3500

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2016-03-15

  • Closed date

    2016-08-25

  • Last modified date

    2016-08-25

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

    PM86762

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

    PI65677

Fix information

  • Fixed component name

    WEBSPHERE FOR Z

  • Fixed component ID

    5655I3500

Applicable component levels

  • R800 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS7K4U","label":"WebSphere Application Server for z\/OS"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"800","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
13 October 2021