-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
NPE warning in native mode #37956
Comments
Can you please share a small reproducer? |
@gastaldi thanks for your help. # java version
openjdk version "21.0.1" 2023-10-17
OpenJDK Runtime Environment GraalVM CE 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.1+12.1 (build 21.0.1+12-jvmci-23.1-b19, mixed mode, sharing)
# generate keystore
keytool -genkey -keyalg RSA -alias selfsigned -keystore keystore.jks -storepass changeit -validity 365 -keysize 2048
# build
./mvnw clean install \
-Dmaven.test.skip=true \
-Dnative \
-Dquarkus.native.additional-build-args=-J--enable-preview
# run (ref to application.yaml)
DB_USER=<> DB_PASS=<> DB_NAME=<> KEYSTORE_PASS=changeit ./target/37956-reproducer-1.0.0-SNAPSHOT-runner |
It seems that you're using H2 and that the server isn't running when the runner JAR is invoked? |
No, h2 is used for the dev profile. the runner jar is with db2. the db2 is up and running when the runner is starting |
I've run your reproducer locally against a running DB2 instance and I don't see the stacktrace you mentioned. This is my output: DB_USER=user DB_PASS=password DB_NAME=quarkus DB_HOST=my.host.com KEYSTORE_PASS=changeit ./target/37956-reproducer-1.0.0-SNAPSHOT-runner
Hibernate: create table TestEntity (id bigint not null, name varchar(255), primary key (id))
__ ____ __ _____ ___ __ ____ ______
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
2024-01-09 11:03:11,239 INFO [com.tes.Startup] (main) Startup.init
2024-01-09 11:03:11,348 INFO [io.quarkus] (main) 37956-reproducer 1.0.0-SNAPSHOT native (powered by Quarkus 3.6.4) started in 2.047s. Listening on: http://0.0.0.0:8080 and https://0.0.0.0:8443
2024-01-09 11:03:11,348 INFO [io.quarkus] (main) Profile prod activated.
2024-01-09 11:03:11,348 INFO [io.quarkus] (main) Installed features: [agroal, cdi, config-yaml, hibernate-orm, hibernate-orm-panache, hibernate-validator, jdbc-db2, jdbc-h2, kafka-client, kubernetes, narayana-jta, rest-client, rest-client-jackson, rest-client-mutiny, resteasy, resteasy-jackson, security, security-jpa, smallrye-context-propagation, smallrye-fault-tolerance, smallrye-health, smallrye-jwt, smallrye-openapi, smallrye-reactive-messaging, smallrye-reactive-messaging-kafka, vertx] |
i tried with postgres the warn issue will be gone, for db2 it will come for always (db2 on our lab and db2 on my podman) could it be something wrong in the driver? podman run -d --name db2server --restart=always --detach --privileged=true -p 50000:50000 --env-file env_list.txt icr.io/db2_community/db2 cat env_list.txt
LICENSE=accept
DB2INSTANCE=db2inst1
DB2INST1_PASSWORD=password
DBNAME=quarkus
BLU=false
ENABLE_ORACLE_COMPATIBILITY=false
UPDATEAVAIL=NO
TO_CREATE_SAMPLEDB=true
REPODB=true
IS_OSXFS=false
PERSISTENT_HOME=false
HADR_ENABLED=false
ETCD_ENDPOINT=
ETCD_USERNAME=
ETCD_PASSWORD= |
Can you post the complete output? It looks like the output in the issue description is caused by another error? |
|
I tried my reproducer again and I don't see this error. Maybe this is a dumb question, but can you connect to the DB in |
yes, i am 100% sure it is connectable. |
hey, Do you only see this error in native mode? Could you please try to use DB2 in dev and see if you get the error there? |
hi, sorry for the late response, the error comes for native only. |
@marko-bekhta Is there already a Quarkus version that includes the fix you did for hibernate/hibernate-orm#7865? If so maybe @yanxuehe can try and see what he sees now? |
Hey, the fix we are talking about is for https://hibernate.atlassian.net/browse/HHH-17872, which is included in Hibernate ORM 6.4.5 and 6.5.0... 6.4.5 is not yet released and 6.5.0 is a CR2 (#40102) so for now it won't be trivial to test it 😔 |
@marko-bekhta We just merged an upgrade to Hibernate ORM 6.4.5 in Quarkus. Snapshots of Quarkus should get deployed by tomorrow 2AM UTC. Testing may be easier now? Here are instructions to use Quarkus snapshots: https://github.com/quarkusio/quarkus/blob/main/CONTRIBUTING.md#using-snapshots |
Nice! Let's ping @yanxuehe to see if that can be done. |
Closing due to being unable to reproduce, and lack of update. |
Describe the bug
Expected behavior
no warnings.
Actual behavior
No response
How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
21
Mandrel or GraalVM version (if different from Java)
with docker builder
Quarkus version or git rev
3.6.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: