Service Virtualization

 View Only
Expand all | Collapse all

NullPointerException when virtualize javax.naming.NamingEnumeration

  • 1.  NullPointerException when virtualize javax.naming.NamingEnumeration

    Posted Jul 15, 2019 07:53 AM
      |   view attached
    Hello,

    Using DevTest 10.1, I have recorded a call of java method that response with a javax.naming.NamingEnumeration (interface) object.

    In the .vsi file, the response looks like :
    <lisa.vse.java.response>
    <lisa.vse.java.response.args>
    <lisa.vse.java.response.arg>
    <string>&lt;string&gt;(&amp;amp;({{=request_arg1_STRING_ARRAY_STRING_2;/*typeInterApplication*/}}=aude)(typeEnvironnement=bench)(objectclass=webApplication))&lt;/string&gt;</string>
    </lisa.vse.java.response.arg>
    <lisa.vse.java.response.arg>
    <string>&lt;string-array&gt;
    &lt;string&gt;{{=request_arg1_STRING_ARRAY_STRING_0;/*uid*/}}&lt;/string&gt;
    &lt;string&gt;{{=request_arg1_STRING_ARRAY_STRING_1;/*description*/}}&lt;/string&gt;
    &lt;string&gt;{{=request_arg1_STRING_ARRAY_STRING_2;/*typeInterApplication*/}}&lt;/string&gt;
    &lt;string&gt;{{=request_arg1_STRING_ARRAY_STRING_3;/*webCommande*/}}&lt;/string&gt;
    &lt;/string-array&gt;</string>
    </lisa.vse.java.response.arg>
    </lisa.vse.java.response.args>
    </lisa.vse.java.response>
    But when playback, I met a NullPointerException when using the returned object (on line "myNamingEnumeration.hasMore()").

    Configuration of the agent on the jvm used for recording/playback is in attachment.

    What can I do in order to have the playback working without NullPointerException ?

    ------------------------------
    Best regards,

    Benoit
    ------------------------------

    Attachment(s)

    xml
    rules.xml   3 KB 1 version


  • 2.  RE: NullPointerException when virtualize javax.naming.NamingEnumeration

    Posted Jul 18, 2019 07:57 AM
    Hello,

    Any idea ?

    Best regards,

    Benoit