eclipse-ee4j / eclipse-ee4j/jersey
In multithreaded call to a REST endpoint, while sending response, the code hits HeaderValueException intermittently
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
Issue 1:
While multiple calls are made simultaneously to an API, we hit this issue intermittently and seems to be a jersey issue.
Error message: Org.glassfish.jersey.message.internal.HeaderValueException: Too many "Content-Type" header values: "[application/json, application/json]"
This occurs at this line in code: Response.created(uriinfo.getAbsolutePathBuilder().scheme("https").path(newId.toString()).build()).build();
Issue 2:
While multiple calls are made simultaneously to the same API (let's say 30 calls are made to a REST endpoint) only 28/29 calls reach this API and it fails with NullPointerException. The code from our side seems fine.
Can not reproduce any of the 2 issues when a single call is made. Only reproduced over multiple threads are run together to make the calls simultaneously, that too intermittently.
Contributor guide
Assessment
This issue has not been assessed yet.