You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A JAX-RS endpoint returns a Map instance to be serialized to JSON and returned. In some cases (I was not able to find the actual cause) the response returned to the client is truncated and does not contain the full JSON response.
The code behaves correctly with Quarkus 2.4.1, but when built with a newer version (tried 2.5.1 and 2.6.2), it produces the truncated response. I was able to reproduce the behavior reliably on different systems (Oracle on Windows, Eclipse Temurin on Alpine) with the given example. The interesting thing is that even small changes of the response may cause the response to be rendered correctly. I could not figure out the reason for the behavior. A notable point is that the response chunk that is returned, has 8192 bytes.
Expected behavior
The response returned by the reproducing example should be complete, not truncated.
Actual behavior
The example returns the truncated response, which is truncated at 8192 bytes (ends with {"fileName":"tome2.pdf","modifiedAt":"2021-12-14T09:53:).
How to Reproduce?
Build the example mvn clean package, JDK 17 assumed (toolchains profile may be used to choose the JDK if toolchains is configured).
Run the example application.
Get the response: curl --request GET --url http://localhost:8080/objects
Changes in the POM file's quarkus.version property may deliver different results as noted, the correct behavior should be observed when the property is changed to 2.4.1.
Describe the bug
A JAX-RS endpoint returns a
Map
instance to be serialized to JSON and returned. In some cases (I was not able to find the actual cause) the response returned to the client is truncated and does not contain the full JSON response.The code behaves correctly with Quarkus 2.4.1, but when built with a newer version (tried 2.5.1 and 2.6.2), it produces the truncated response. I was able to reproduce the behavior reliably on different systems (Oracle on Windows, Eclipse Temurin on Alpine) with the given example. The interesting thing is that even small changes of the response may cause the response to be rendered correctly. I could not figure out the reason for the behavior. A notable point is that the response chunk that is returned, has 8192 bytes.
Expected behavior
The response returned by the reproducing example should be complete, not truncated.
Actual behavior
The example returns the truncated response, which is truncated at 8192 bytes (ends with
{"fileName":"tome2.pdf","modifiedAt":"2021-12-14T09:53:
).How to Reproduce?
mvn clean package
, JDK 17 assumed (toolchains
profile may be used to choose the JDK if toolchains is configured).curl --request GET --url http://localhost:8080/objects
Changes in the POM file's
quarkus.version
property may deliver different results as noted, the correct behavior should be observed when the property is changed to2.4.1
.cut-off-bug.zip
Output of
uname -a
orver
Microsoft Windows [Version 10.0.19043.1415]
Output of
java -version
Java HotSpot(TM) 64-Bit Server VM (build 17.0.1+12-LTS-39, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.6.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.2 (ea98e05a04480131370aa0c110b8c54cf726c06f)
Additional information
As noted in the description, the problem was observed for the first time with the original code in Docker based on
eclipse-temurin:17-alpine
.The text was updated successfully, but these errors were encountered: