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

TCK HealthCheckResponseValidationTest fails with jdk17+ #324

Open
simonladen opened this issue Nov 28, 2023 · 0 comments
Open

TCK HealthCheckResponseValidationTest fails with jdk17+ #324

simonladen opened this issue Nov 28, 2023 · 0 comments

Comments

@simonladen
Copy link

Running the TCK with jdk17 (or higher), the test HealthCheckResponseValidationTest fails:

[ERROR] org.eclipse.microprofile.health.tck.HealthCheckResponseValidationTest.testValidateConcreteHealthCheckResponse  Time elapsed: 0.059 s  <<< FAILURE!
com.fasterxml.jackson.databind.exc.InvalidDefinitionException:
Cannot construct instance of `java.util.Optional` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
 at [Source: (String)"{"name":"successful-check","status":"UP","data":{}}"; line: 1, column: 50] (through reference chain: org.eclipse.microprofile.health.HealthCheckResponse["data"])
        at org.eclipse.microprofile.health.tck.HealthCheckResponseValidationTest.testValidateConcreteHealthCheckResponse(HealthCheckResponseValidationTest.java:71)

When running the same test with jdk11 (or anything lower than 16), the test throws this warning:

INFO: Running test: HealthCheckResponseValidationTest#testValidateConcreteHealthCheckResponse
[ERROR] WARNING: An illegal reflective access operation has occurred
[ERROR] WARNING: Illegal reflective access by com.fasterxml.jackson.databind.util.ClassUtil (file:/C:/Users/SimonLaden/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.15.0/jackson-databind-2.15.0.jar) to constructor java.util.Optional()
{"status":"UP","checks":[{"name":"successful-check","status":"UP","data":{}}]}
[ERROR] WARNING: Please consider reporting this to the maintainers of com.fasterxml.jackson.databind.util.ClassUtil
[ERROR] WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[ERROR] WARNING: All illegal access operations will be denied in a future release

This illegal reflective access operation is not allowed in more recent jdk, causing the error mentioned above.

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

1 participant