Layer7 API Management

Expand all | Collapse all

XPath-Query 1.0 throws NullpointerException

Jump to Best Answer
  • 1.  XPath-Query 1.0 throws NullpointerException

    Posted 03-15-2017 09:19 AM


    Given an XML document without namespaces

    <?xml version="1.0" encoding="UTF-8" ?>

    and I query with XPath 1.0 for the namespace

    The XPath assertion fails, the policy immediately aborts and the client gets a NullpointerException:

    <?xml version="1.0" encoding="UTF-8"?>
        xmlns:xsd="" xmlns:xsi="">



    When I do exactly the same but with XPath 2.0, it works perfectly. 


    Throwing an Exception and therefore immediately aborting the policy is a bit rude :-)

    I guess the NPE is thrown by the underlying Java Library but it should be catched so that only the assertion fails. 


    PS: Happens like this on Gateway 8.3.01




  • 2.  Re: XPath-Query 1.0 throws NullpointerException

    Broadcom Employee
    Posted 03-23-2017 07:05 AM

    Hello Stephan,


    could you please address this in a Support Case.


    Support should have a look after this.




  • 3.  Re: XPath-Query 1.0 throws NullpointerException

    Posted 03-24-2017 03:32 AM

    Hi Heinz-Dirk


    Done, case 00707767




  • 4.  Re: XPath-Query 1.0 throws NullpointerException
    Best Answer

    Posted 04-04-2017 03:48 AM

    From Case notes 


    The described behavior is related to the XPath error handling and should be expected.
    The error handling has been enhanced in XPath 2.0.
    KB Article has been posted for this:
    TEC1784711 XPath-Query 1.0 throws NullPointerException




    Seenu Mathew