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

Blazebit EntityView not serialized in Native image #21930

Closed
chrigiansen opened this issue Dec 4, 2021 · 10 comments
Closed

Blazebit EntityView not serialized in Native image #21930

chrigiansen opened this issue Dec 4, 2021 · 10 comments
Labels
kind/bug Something isn't working

Comments

@chrigiansen
Copy link

Describe the bug

Hello

When running Quarkus as Native image, calling a rest endpoint results in a json array of the right size but with empty elements. running the same code in quarkus:dev works fine. The single element is a blaze EntityView, which when logged, shows the correct state of the objects.

I have marked the views with @RegisterForReflection, but i don't think it's necessary.
The project also uses Lombok. After removing it from the entity doesn't make a difference

Expected behavior

An array with the correct data:
[ { "id": 1, "tournamentEnd": "2022-01-31T23:00:00Z", "tournamentName": "EM 2020", "tournamentStart": "2021-11-30T23:00:00Z", "winnerTeamSelectionEnd": "2021-12-07T23:00:00Z" }, { "id": 2, "tournamentEnd": "2022-01-31T23:00:00Z", "tournamentName": "EM 2016", "tournamentStart": "2021-11-30T23:00:00Z", "winnerTeamSelectionEnd": "2021-12-07T23:00:00Z" } ]

Actual behavior

An array with empty elements:
[ {}, {} ]

How to Reproduce?

reproducer.zip

when running, change this params:
MP_JWT_VERIFY_PUBLICKEY_LOCATION=https://demo.identityserver.io/.well-known/openid-configuration/jwks
QUARKUS_HTTP_CORS=true
QUARKUS_DATASOURCE_JDBC_URL=<your_db>
QUARKUS_DATASOURCE_PASSWORD=<your_pw>
QUARKUS_DATASOURCE_USERNAME=<your_user>

on your postgresql db run:
INSERT INTO TOURNAMENT (ID, TOURNAMENTNAME, TOURNAMENTSTART, TOURNAMENTEND, WINNERTEAMSELECTIONEND) VALUES (nextval('hibernate_sequence'), 'EM 2016', CURRENT_DATE - interval '2 day', CURRENT_DATE + interval '60 day', CURRENT_DATE + interval '5 day');

get a token from demo.identityserver.io and call GET api/tournament

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

GraalVM 21.3.0 Java 17 CE (Java Version 17.0.1+12-jvmci-21.3-b05)

Quarkus version or git rev

2.5.1.Final

Build tool (ie. output of mvnw --version or gradlew --version)

maven 3.8.1

Additional information

No response

@chrigiansen chrigiansen added the kind/bug Something isn't working label Dec 4, 2021
@famod
Copy link
Member

famod commented Dec 4, 2021

/cc @beikov

@beikov
Copy link
Contributor

beikov commented Dec 4, 2021

Thanks for the ping @famod, I'll take a look ASAP.

@beikov
Copy link
Contributor

beikov commented Dec 12, 2021

Hey @chrigiansen,
I created Blazebit/blaze-persistence#1406 for this and have a fix in the pipeline. I'll ping you again when I release the next version with the fix.

@chrigiansen
Copy link
Author

Hello @beikov,
Thanks for the fast reply. Will this fix be available for 2.6.0?

@beikov
Copy link
Contributor

beikov commented Dec 21, 2021

I'm planning to do a release this week and will then update the version in Quarkus, so I guess that 2.6.0 or 2.6.1 will update to the new version. Note though that the Quarkus integration of Blaze-Persistence works with all Quarkus versions, so you can simply update the version of Blaze-Persistence in your library to without having to wait for a new Quarkus release.

@gsmet
Copy link
Member

gsmet commented Dec 21, 2021

@beikov FYI, cut off dates for the Platform:

  • this evening for 2.6.0.Final
  • Thursday evening for 2.6.1.Final
    (Paris time)

@beikov
Copy link
Contributor

beikov commented Dec 27, 2021

Will be fixed by updating to 1.6.4 which was just released. Also, here is the BOM update: quarkusio/quarkus-platform#417

@chrigiansen
Copy link
Author

I have tested my case and it now works as I expect it. thanks @beikov

@beikov
Copy link
Contributor

beikov commented Dec 27, 2021

Awesome, thanks for verifying!

@gsmet
Copy link
Member

gsmet commented Jan 1, 2022

This has been fixed upstream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants