Open shawkins opened 3 days ago
/cc @gsmet (hibernate-orm), @yrodiere (hibernate-orm)
I think the most likely cause would be either the sqlExceptionConverter
being passed a null
exception (in which case the bug is in whatever called the sqlExceptionConverter
), or the sqlExceptionConverter
returning null
as the "converted" exception (in which case the bug is in the sqlExceptionConverter
)
Quoting https://github.com/keycloak/keycloak/issues/35014#issuecomment-2493780098 :
it seems caused by the exception converter returning null, which certainly looks like a bug, possibly caused by this line.
We probably need, at least, to check in Hibernate ORM that sqlExceptionConverter
implementations never return null
, because I think that would be a bug.
Also, thanks for creating the bug report @shawkins :)
Describe the bug
In some circumstances hibernate fails to report a meaningful error message and instead shows a nullpointerexception:
See https://github.com/keycloak/keycloak/issues/35181 - this error also appears in other Keycloak and Quarkus issues, such as https://github.com/quarkusio/quarkus/issues/31842
Expected behavior
A meaningful exception.
Actual behavior
A nullpointerexception.
How to Reproduce?
Keycloak is using a persistence.xml, I'm not sure if that's a requirement to reproduce this. If you then misconfigure the datasource, such as an invalid password, you should see the null pointer exception.
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
3.8.5
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response