IBM Support

PI27070: SUPPORT THIRD-PARTY JAX-RS PROVIDERS WHEN JAXRS-1.1 FEATURE IS CONFIGURED

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • If you put Jersey in your application and configured jaxrs-1.1
    you get this exception:
    .
    java.lang.NullPointerException
            at
    org.apache.wink.common.internal.http.Accept.valueOf(Accept.java:
    139)
            at
    org.apache.wink.server.internal.contexts.HttpHeadersImpl.getAcce
    ptHeader(HttpHeadersImpl.java:151)
            at
    org.apache.wink.server.internal.contexts.HttpHeadersImpl.getAcce
    ptableMediaTypes(HttpHeadersImpl.java:105)
            at
    org.apache.wink.server.internal.registry.ResourceRegistry.filter
    ByProduces(ResourceRegistry.java:573)
            at
    org.apache.wink.server.internal.registry.ResourceRegistry.filter
    DispatchMethods(ResourceRegistry.java:497)
            at
    org.apache.wink.server.internal.registry.ResourceRegistry.findMe
    thod(ResourceRegistry.java:359)
            at
    org.apache.wink.server.internal.handlers.FindResourceMethodHandl
    er.handleResourceMethod(FindResourceMethodHandler.java:138)
            at
    org.apache.wink.server.internal.handlers.FindResourceMethodHandl
    er.handleRequest(FindResourceMethodHandler.java:65)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:26)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:22)
            at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:75)
            at
    org.apache.wink.server.internal.handlers.FindRootResourceHandler
    .handleRequest(FindRootResourceHandler.java:95)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:26)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:22)
            at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:75)
            at
    org.apache.wink.server.internal.handlers.HeadMethodHandler.handl
    eRequest(HeadMethodHandler.java:53)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:26)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:22)
            at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:75)
            at
    org.apache.wink.server.internal.handlers.OptionsMethodWADLHandle
    r.handleRequest(OptionsMethodWADLHandler.java:51)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:26)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:22)
            at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:75)
            at
    org.apache.wink.server.internal.handlers.SearchResultHandler.han
    dleRequest(SearchResultHandler.java:33)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:26)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:22)
            at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:75)
            at
    org.apache.wink.server.internal.log.ResourceInvocation.handleReq
    uest(ResourceInvocation.java:92)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:26)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:22)
            at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:75)
            at
    org.apache.wink.server.internal.log.Requests.handleRequest(Reque
    sts.java:76)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:26)
            at
    org.apache.wink.server.handlers.RequestHandlersChain.handle(Requ
    estHandlersChain.java:22)
            at
    org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Ab
    stractHandlersChain.java:75)
            at
    org.apache.wink.server.handlers.AbstractHandlersChain.run(Abstra
    ctHandlersChain.java:60)
            at
    org.apache.wink.server.internal.RequestProcessor.handleRequestWi
    thoutFaultBarrier(RequestProcessor.java:207)
            at
    org.apache.wink.server.internal.RequestProcessor.handleRequest(R
    equestProcessor.java:154)
    
    This is because the Jersey RuntimeDelegate implementation is
    registered, but we try to go through the wink dispatching
    servlet for REST. Also the Jersey RuntimeDelegate is registered
    for the whole JVM rather than specifically for the app so
    putting Jersey in one app interferes with other apps.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  IBM WebSphere Application Server Liberty    *
    *                  profile users using jaxrs-1.1 or            *
    *                  restConnector-1.0 features and a third      *
    *                  party JAX-RS provider                       *
    ****************************************************************
    * PROBLEM DESCRIPTION: NullPointerException occurs when using  *
    *                      third-party JAX-RS provider with the    *
    *                      jaxrs-1.1 feature                       *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    The jaxrs-1.1 feature incorrectly intercepts REST requests for
    all applications even ones that contain their own JAX-RS
    provider. The jaxrs-1.1 feature then incorrectly attempts to
    integrate with the applications JAX-RS provider, but is unable
    to do so causing the exception.
    

Problem conclusion

  • The jaxrs-1.1 feature has been updated to detect when a third-
    party JAX-RS provider exists in the application and ensures that
    it does not get invoked as a result of the REST request, instead
    allowing the third-party JAX-RS provider to invoke the
    application.
    The fix for this APAR is currently targeted for inclusion in
    fix pack 8.5.5.4.  Please refer to the Recommended Updates
    page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

  • Ensure that the application using the third party JAX-RS
    provider contains both the JAX-RS implementation and JAX-RS
    API jars and that the META-INF/services within the application
    are properly configured to use the 3rd party's RuntimeDelegate.
    

Comments

APAR Information

  • APAR number

    PI27070

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2014-10-07

  • Closed date

    2014-11-11

  • Last modified date

    2017-04-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

  • R850 PSY

       UP



Document information

More support for: WebSphere Application Server

Software version: 850

Reference #: PI27070

Modified date: 11 April 2017


Translate this page: