Mark Rotteveel (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiMmYyMGJhOTdh...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-15775?atlOrigin=eyJpIjoiMmYyMG...
) HHH-15775 (
https://hibernate.atlassian.net/browse/HHH-15775?atlOrigin=eyJpIjoiMmYyMG...
) Connection error can result in UnknownServiceException, hiding actual exception (
https://hibernate.atlassian.net/browse/HHH-15775?atlOrigin=eyJpIjoiMmYyMG...
)
Issue Type: Bug Assignee: Unassigned Components: hibernate-core Created: 28/Nov/2022 04:45
AM Priority: Major Reporter: Mark Rotteveel (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
If an error occurs during connection creation, an UnknownServiceException can be thrown if
the JdbcServices implementation hasn't been registered yet. This hides the actual
exception in BasicConnectionCreator.convertSqlException :
org.hibernate.service.UnknownServiceException: Unknown service requested
[org.hibernate.engine.jdbc.spi.JdbcServices]
at
app//org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:212)
at
app//org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.convertSqlException(BasicConnectionCreator.java:121)
at
app//org.hibernate.engine.jdbc.connections.internal.DriverConnectionCreator.makeConnection(DriverConnectionCreator.java:43)
at
app//org.hibernate.engine.jdbc.connections.internal.BasicConnectionCreator.createConnection(BasicConnectionCreator.java:61)
The simplest solution seems to be to make UnknownServiceException extend ServiceException
(instead of HibernateException ).
(
https://hibernate.atlassian.net/browse/HHH-15775#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-15775#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210- sha1:4037f92 )