# Cannot send the test request. Reason: java.lang.NullPointerException

**URL:** <https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313>\
**Category:** API Testing\
**Tags:** api-testing, katalon-studio\
**Created:** [April 17, 2018, 9:04am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313 "2018-04-17T09:04:48Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![xio](https://avatars.discourse-cdn.com/v4/letter/x/ed655f/32.png) [@xio](https://forum.katalon.com/u/xio)\
**Post date:** [April 17, 2018, 9:04am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/1 "2018-04-17T09:04:48Z")

</div>

![](https://s3.amazonaws.com/katalon-forum/editor/yl/d1k0vapptunh.png "Image: https://s3.amazonaws.com/katalon-forum/editor/yl/d1k0vapptunh.png")

(Stack trace: java.lang.NullPointerException

at com.kms.katalon.core.testobject.internal.impl.HttpBodyContentReader.fromSource(HttpBodyContentReader.java:33)

at com.kms.katalon.core.testobject.ObjectRepository.findRequestObject(ObjectRepository.java:282)

at com.kms.katalon.core.testobject.ObjectRepository.readTestObjectFile(ObjectRepository.java:167)

at com.kms.katalon.core.testobject.ObjectRepository.readTestObjectFile(ObjectRepository.java:154)

at com.kms.katalon.controller.WebServiceController.getRequestObject(WebServiceController.java:30)

at com.kms.katalon.controller.WebServiceController.sendRequest(WebServiceController.java:36)

at com.kms.katalon.composer.webservice.parts.RestServicePart$2$1.run(RestServicePart.java:132)

at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)

)

[image.png](https://s3.amazonaws.com/katalon-forum/editor/yl/d1k0vapptunh.png)

---

<div class="post-metadata">

**Author:** ![xio](https://avatars.discourse-cdn.com/v4/letter/x/ed655f/32.png) [@xio](https://forum.katalon.com/u/xio)\
**Post date:** [April 17, 2018, 9:22am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/2 "2018-04-17T09:22:22Z")

</div>

I didn`t understand what`s going on but problem resolves when I re-add url and after that restart Katalon Studio

---

<div class="post-metadata">

**Author:** ![xio](https://avatars.discourse-cdn.com/v4/letter/x/ed655f/32.png) [@xio](https://forum.katalon.com/u/xio)\
**Post date:** [April 17, 2018, 9:22am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/3 "2018-04-17T09:22:35Z")

</div>

So another question or suggestion. When resize console ![](https://s3.amazonaws.com/katalon-forum/editor/uq/0tm1e1bcdjcm.png)  
its cover Response window.  
 ![](https://s3.amazonaws.com/katalon-forum/editor/25/at9624axd9a2.png "Image: https://s3.amazonaws.com/katalon-forum/editor/25/at9624axd9a2.png")

Maybe scroll can fix it problem ?

[mb\_scroll.png](https://s3.amazonaws.com/katalon-forum/editor/25/at9624axd9a2.png)

[Console\_cover.png](https://s3.amazonaws.com/katalon-forum/editor/uq/0tm1e1bcdjcm.png)

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [April 18, 2018, 2:56am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/4 "2018-04-18T02:56:55Z")

</div>

Hi xio,

Thanks for your information. However I’m confused about what you are trying to say so it, can you provide some reproducible steps?

---

<div class="post-metadata">

**Author:** ![xio](https://avatars.discourse-cdn.com/v4/letter/x/ed655f/32.png) [@xio](https://forum.katalon.com/u/xio)\
**Post date:** [April 18, 2018, 6:58am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/5 "2018-04-18T06:58:12Z")

</div>

> Vinh Nguyen said:
> 
> Hi xio,
> 
> Thanks for your information. However I’m confused about what you are trying to say so it, can you provide some reproducible steps?

Hi [Vinh Nguyen](http://forum.katalon.com/profile/33/Vinh%20Nguyen),

Sure ! With pleasure. So when i start my project in Katalon Studio 5.3.1 as usual then I saw update message and download KS 5.4. After with new Katalon Studio 5.4 I opened my project with File → Open Project menu and when project was loaded I tried to start my RESTful tests and saw java.NullPointerException in every test and was really disapointed about it.

And when I decided to check the objects of the repository, I was pleasantly surprised to see the new interface, for which you guys have a special thank you. After finding the query that I wanted, I checked all the settings and tried to test the request and got the same error that I posted above

---

<div class="post-metadata">

**Author:** ![Ivan\_Gorchakov1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ivan_gorchakov1/32/425_2.png) [@Ivan\_Gorchakov1](https://forum.katalon.com/u/Ivan_Gorchakov1)\
**Post date:** [April 18, 2018, 7:04am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/6 "2018-04-18T07:04:45Z")

</div>

I think it’s the same problem as i mentioned here [http://forum.katalon.com/discussion/6158/http-body-of-ws-rest-requests-are-missed-when-you-migrate-from-5-3-1-to-5-4#latest](http://forum.katalon.com/discussion/6158/http-body-of-ws-rest-requests-are-missed-when-you-migrate-from-5-3-1-to-5-4#latest) just check your bodies/headers-they are probably empty. But I’ve discovered that properties migrates Ok.

---

<div class="post-metadata">

**Author:** ![xio](https://avatars.discourse-cdn.com/v4/letter/x/ed655f/32.png) [@xio](https://forum.katalon.com/u/xio)\
**Post date:** [April 18, 2018, 7:18am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/7 "2018-04-18T07:18:39Z")

</div>

Спасибо Вань ! Я уже разобрался. Во втором посте решение проблемы.

Thank you Ivan ! I already resolve problem. Answer is in the second post

You are rigth it same problems

1. [http://forum.katalon.com/discussion/6158/http-body-of-ws-rest-requests-are-missed-when-you-migrate-from-5-3-1-to-5-4#latest](http://forum.katalon.com/discussion/6158/http-body-of-ws-rest-requests-are-missed-when-you-migrate-from-5-3-1-to-5-4#latest "Link: http://forum.katalon.com/discussion/6158/http-body-of-ws-rest-requests-are-missed-when-you-migrate-from-5-3-1-to-5-4#latest")  
2 ) [http://forum.katalon.com/discussion/6139/always-get-error-java-lang-nullpointerexception-when-place-webservice-test-object-to-variable#latest](http://forum.katalon.com/discussion/6139/always-get-error-java-lang-nullpointerexception-when-place-webservice-test-object-to-variable#latest)

---

<div class="post-metadata">

**Author:** ![Ivan\_Gorchakov1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ivan_gorchakov1/32/425_2.png) [@Ivan\_Gorchakov1](https://forum.katalon.com/u/Ivan_Gorchakov1)\
**Post date:** [April 18, 2018, 3:57pm UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/8 "2018-04-18T15:57:01Z")

</div>

Same problem with the “Unable to send request (Root cause: java.lang.NullPointerException)” but this time it in one line of code: “def respRecStart = WSBuiltInKeywords.sendRequest(reqRecStart)” I’m going insane cuz hole code is a “CopyPaste” from another TestCase and there it works perfectly (after resolving stupid problems from my post 6158 & post 6139). Developers of KS, please let it work somehow… 😕

UPD: no such problems on 5.3.1(I wasted whole working day struggling with 5.4 & thought that I’m a fool 😑 ) - so wake me up when 5.4 will get update with all fixes! B)

---

<div class="post-metadata">

**Author:** ![Ivan\_Gorchakov1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/ivan_gorchakov1/32/425_2.png) [@Ivan\_Gorchakov1](https://forum.katalon.com/u/Ivan_Gorchakov1)\
**Post date:** [April 20, 2018, 11:54am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/9 "2018-04-20T11:54:04Z")

</div>

I’m sorry, dear KS DEV guys - the problem, described above by me - just a problem of my own inattention…

---

<div class="post-metadata">

**Author:** ![keithwalmar](https://avatars.discourse-cdn.com/v4/letter/k/a6a055/32.png) [@keithwalmar](https://forum.katalon.com/u/keithwalmar)\
**Post date:** [April 9, 2019, 9:44am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/10 "2019-04-09T09:44:29Z")

</div>

NullPointerException is a **RuntimeException**. Runtime exceptions are critical and cannot be caught at compile time. They crash the program at run time if they are not handled properly. When a class is instantiated, its object is stored in computer memory. The [NullPointerExceptions](http://net-informations.com/java/cjava/null.htm) occur when you try to use a reference that points to no location in memory (null) as though it were referencing an object. These include:

- Calling the instance method of a null object.
- Accessing or modifying the field of a null object.
- Throwing null as if it were a Throwable value.

---

<div class="post-metadata">

**Author:** ![pradyumna.varadpande](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/pradyumna.varadpande/32/16104_2.png) [@pradyumna.varadpande](https://forum.katalon.com/u/pradyumna.varadpande)\
**Post date:** [April 19, 2019, 8:02am UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/11 "2019-04-19T08:02:36Z")

</div>

I am facing the same problem, after analyzing the error log. I think it is not connecting to [http://update.katalon.com/](http://update.katalon.com/).

I am not sure what might be the cause, but I got the above findings.

1. I tried the rest test URL on Postman and it works fine.
2. Installed the latest version, but facing the same issue.
3. Re-added URL and Restart the Katalon, but it is still there.

Thanks,  
Pradyumna Varadpande

---

<div class="post-metadata">

**Author:** ![huynguyen](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/huynguyen/32/552_2.png) [@huynguyen](https://forum.katalon.com/u/huynguyen)\
**Post date:** [April 19, 2019, 4:18pm UTC](https://forum.katalon.com/t/cannot-send-the-test-request-reason-java-lang-nullpointerexception/10313/12 "2019-04-19T16:18:51Z")

</div>

@pradyumna.varadpande, would you mind sending us your request file (.rs) file? That will help much in investigating the issue
