Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution of PUT caused exception 'null' #195

Closed
d-insig opened this issue Jul 21, 2016 · 5 comments
Closed

Execution of PUT caused exception 'null' #195

d-insig opened this issue Jul 21, 2016 · 5 comments

Comments

@d-insig
Copy link

d-insig commented Jul 21, 2016

Hi,
I get this error when only when i run my fitnesse test to a particular server. the same test pointing to all other hosts work fine. This is a new server we have set up.
Execution of PUT caused exception 'null'

Below is my request and stacktrace of the error i get
!***< Import fixtures

| import |
| smartrics.rest.fitnesse.fixture.RestFixture |
*!

!***< Configure the !-RestFixture-! for debug mode

!define REMOTE_DEBUG_COMMAND {java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -cp %p %m}
[[Debug Test][${PAGE_NAME}?responder=test&remote_debug=true]]

*!

!***> Configure the !-RestFixture-! with named configuration table of key value pairs+++

| Table: rest Fixture Config |
| http.client.connection.timeout | 50000 |
| http.socket.timeout | 20000 |
| restfixture.display.toggle.for.cells.larger.than | 20 |
| restfixture.default.headers |!- -! |
| %qID% | #FUNCTION[fitnesse.utils.RandomGenerator, getRandomInteger(), qID]|
*!

!1 Verify

| Table: Rest Fixture | https://services-qa.xx.com|
| Method | Url | Request Headers |Request Payload | Status | Response Headers | Response Payload | Variable |
| PUT |/q17/xxx|{{{
Authorization : Bearer ${accessToken_QA}
Content-Type : application/json
}}} | {{{
{
"resources": [
{
"deleted": false,
"cashBalance": 43343
}
]
}
}}} | 200 | {{{Server : Apache-Coyote/1.1
X-Application-Context : userprofile-service:10102
Content-Length : 0
}}}| | |


[main] ERROR com.uimirror.framework.http.CustomResponseErrorHandler - Response error: 400 BAD_REQUEST
[main] ERROR fitnesse.fixture.RestFixture - Exception occurred when processing method=PUTURL= /q17/xx
java.lang.NullPointerException
at com.uimirror.framework.http.CustomResponseErrorHandler.handleError(CustomResponseErrorHandler.java:30)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:614)

Please help me with this.

Thanks,

@smartrics
Copy link
Owner

smartrics commented Jul 22, 2016

hi - i don't recognise the error nor the structure of the RestFixture test

RestFixture expects

| Method | Url | Expected Status | Expected Response Headers | Expected Response Payload |

whilst you have

| Method | Url | Request Headers |Request Payload | Status | Response Headers | Response Payload | Variable |

Please clarify

@d-insig
Copy link
Author

d-insig commented Jul 25, 2016

Hi,
I have customised the fixture to support additional structure. Though I use your structure, i still get the same error. im still wondering if something needs to be done on the server itself, since im able to hit every API other than the new server.

@smartrics
Copy link
Owner

OK i understand but i can't comment as it it seems the issue is in your code.
you may want to compare request/response you get on the wire for both servers and see if there are differences that may cause the issue.

@d-insig
Copy link
Author

d-insig commented Jul 28, 2016

Hi, Would it be possible to meet over skype/webex. i'd love to show you my framework and discuss what i have in mind for fitnesse.

@smartrics
Copy link
Owner

If this is something related to fitnesse please post this question on the fitnesse yahoo group.
If it's for RestFixture please open a new issue and describe what the proposal is. I will be happy to comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants