cancel
Showing results for 
Search instead for 
Did you mean: 

REST calls do not work with Load agents: invalid JSON

SOLVED
Highlighted
Occasional Contributor

REST calls do not work with Load agents: invalid JSON

 

Hi!
I have my testcases with REST calls which work perfect when I run them locally.

 

But when I let them run by load agents I get a lot of http 500 errors.

The webserver shows

 

cnqq2wfzbrywrx304vgetyhy [39] FATAL Global - (153) 1> Exception: Invalid JSON primitive: .

 

Tthe dot is given by the webserver, not typed by me.

 

Anyone any idea about this?

 

Unfortunately I do not find a way to get a raw request when the load agents are running, I only can give a raw by executing the testcase manually.

 

Thx 🙂

 

 

POST https://myURL.com/en/ShoppingCart/AddToCart HTTP/1.1
Accept-Encoding: gzip,deflate
x-requested-with: XMLHttpRequest
Content-Type: application/json
cookie: ASP.NET_SessionId=4q0m1klo5zuxehm532i1552q
Content-Length: 212
Host: myURL.com
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.2 (Java/12.0.1)

{
"model": {
"Date": "2020-09-24",
"TicketTypeId": 275,
"ProjNr": 995,
"PoolNr": 1,
"PersonTypes[0].PersonTypeId": 70,
"PersonTypes[0].Quantity": 1,
"PersonTypes[0].Tariff.ExtMaterialNr": ""
}
}

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Contributor

Re: REST calls do not work with Load agents: invalid JSON

Found the problem:
- one property I used in the Login turned out to be empty sometimes - I am still wondering how it worked without locally, without Loadagent

- then also, there were some empty values when the datasource (jdbc) ran out of data and did not restart it. I has to check in the datasource checkbox "Skip loop on empty" in the options

View solution in original post

3 REPLIES 3
Highlighted
Community Manager

Re: REST calls do not work with Load agents: invalid JSON

Thanks for your question @Terkon !

 

Any ideas what can be done here @nmrao @richie @avidCoder?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Occasional Contributor

Re: REST calls do not work with Load agents: invalid JSON

I turned this to support.

Thx

Highlighted
Occasional Contributor

Re: REST calls do not work with Load agents: invalid JSON

Found the problem:
- one property I used in the Login turned out to be empty sometimes - I am still wondering how it worked without locally, without Loadagent

- then also, there were some empty values when the datasource (jdbc) ran out of data and did not restart it. I has to check in the datasource checkbox "Skip loop on empty" in the options

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements