IBM Support

PI83159: JAX-RS resource methods report as not found when using scientific notation as path parameters

Fixes are available

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

  • JAX-RS resource methods that take a floating point number as
    a path parameter variable (float or double) are not found
    when the URI contains a number in scientific notation - such
    as 1.2E3.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server Liberty - JAX-RS                     *
    ****************************************************************
    * PROBLEM DESCRIPTION: JAX-RS resource methods report as not   *
    *                      found when using scientific notation as *
    *                      path parameters                         *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    If a user's JAX-RS resource method uses path parameters for a
    floating point number (i.e. double, potentially also float),
    valid parameters that use scientific notation will not be
    recognized as a floating point number, and the resource method
    will not be found.
    
    For example, if a user had the following code in their resource
    class:
    
        @GET
        @Path("/value/{someValue}")
        @Produces(MediaType.APPLICATION_JSON)
        public MyResult getMyResult(@PathParam("someValue") double
    someValue) {
            // ...
        }
    
    and the end user issued a GET request like:
    http://myserver:9080/myApp/myPath/value/1.00000123E7
    
    they would see a response code of 404, indicating that the
    resource could not be found. This is because the logic that
    determines what constitutes a floating point number does not
    check for scientific notation - it assumes that the parameter is
    a String rather than a double.
    
    In the above example, the user would likely see something
    similar to the following in their console.log:
    [WARNING ] No operation matching request path
    "/value/1.00000123E7" is found, Relative Path: 1.00000123E7,
    HTTP Method: GET, ContentType: */*, Accept:
    text/html,image/gif,image/jpeg,*/*;q=.2,*/*;q=.2,. Please enable
    FINE/TRACE log level for more details.
    

Problem conclusion

  • The fix for this APAR adjusts the resource matching logic to
    detect that exponents and other forms of scientific notation
    should be matched as a floating point number.
    
    The fix for this APAR is currently targeted for inclusion in fix
    pack 17.0.0.3.  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

    PI83159

  • Reported component name

    WAS LIBERTY COR

  • Reported component ID

    5725L2900

  • Reported release

    CD0

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2017-06-15

  • Closed date

    2017-09-25

  • Last modified date

    2017-09-25

  • 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

  • RCD0 PSY

       UP

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

Document Information

Modified date:
19 October 2021