Forum Discussion

GMSoapUI's avatar
GMSoapUI
Contributor
10 years ago

How to trace java.lang.NullPointerException error.

Can someone please tell me how to debug java.lang.NullPointerException errors? I have an automated solution written in groovy and every so often in the error log I get the line: ERROR:java.lang.NullPointerException. The error does not appear to affect the running of the script but I am really keen to resolve whatever might be causing the problem. I get no other information other than this and the script log gives me nothing extra to go off. There is nothing to tell me what line and in what script the error is occurring, which makes debugging very difficult and time consuming. If someone has experience of debugging issues of this nature I'd be very grateful if they could tell me how to go about determining the script and line responsible. Thank you.

 

err_001.png

 

  • nmrao's avatar
    nmrao
    Champion Level 3

    It is difficult to say unless there is more information like what is the reproducible steps along with soapui version, os etc.,

    • GMSoapUI's avatar
      GMSoapUI
      Contributor

      Hi and thanks for your reply.

       

      The OS is Windows 7 Pro 64-bit.

      SoapUI version is 5.1.2

       

      The steps to reproduce are simply running my groovy script. It occurs several times throughout the script because the script loops through many test cases each of which contain several test steps. I know this may not be particularly helpful as you would need my entire project but my employer very likely won't let me share it due to it being intellectual property. I can ask.

       

      I find the user-friendliness of SoapUI to be quite poor especially when it comes to debugging things. It never tells you the script or the line number and this makes debugging nearly impossible. It would be great to have a full IDE within it.

       

      Regards

      • nmrao's avatar
        nmrao
        Champion Level 3
        In general log files shows the error line of the groovy script, in my opinion. Have you checked soapui.log, soapui-error.log files?
        At least you could tell what script is doing, that would help to understand or post the script if possible.