In a Java Application using DataDirect with Hibernate 5.4.18. Since the DataDirect driver (branded) needs to be unlocked, wrote a customer ConnectionProvider implementation. But the implementation is not getting invoked. Getting the following error:
Dec 02, 2020 7:56:13 AM org.hibernate.Version logVersion INFO: HHH000412: Hibernate ORM core version 5.4.18.Final
Dec 02, 2020 7:56:14 AM org.hibernate.engine.jdbc.spi.TypeInfo extractTypeInfo WARN: HHH000362: Unable to retrieve type info result set : java.sql.SQLException: [PostgreSQL JDBC Driver]This driver is locked for use with embedded applications. Dec 02, 2020 7:56:15 AM org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl sequenceInformationList ERROR: Could not fetch the SequenceInformation from the database java.sql.SQLException: [PostgreSQL JDBC Driver]This driver is locked for use with embedded applications. at com.wm.dd.jdbc.postgresqlbase.ddcp.b(Unknown Source) at com.wm.dd.jdbc.postgresqlbase.ddcp.a(Unknown Source) at com.wm.dd.jdbc.postgresqlbase.ddco.b(Unknown Source) at com.wm.dd.jdbc.postgresqlbase.ddco.a(Unknown Source) at com.wm.dd.jdbc.postgresqlbase.BaseConnection.createStatement(Unknown Source) at com.wm.dd.jdbc.postgresqlbase.BaseConnection.createStatement(Unknown Source) at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:40) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.sequenceInformationList(JdbcEnvironmentImpl.java:403) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.(JdbcEnvironmentImpl.java:268) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:114) at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101) at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152) at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286) at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243) at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214) at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:176) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83) at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473) at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689) at com.venkat.jdbc.JDBCManager.(JDBCManager.java:44) at com.venkat.jdbc.JDBCManager.main(JDBCManager.java:55)
Dec 02, 2020 7:56:15 AM org.hibernate.engine.jdbc.spi.TypeInfo extractTypeInfo WARN: HHH000362: Unable to retrieve type info result set : java.sql.SQLException: [PostgreSQL JDBC Driver]This driver is locked for use with embedded applications. SessionImpl(802771878)
My Connection Provider implementation
private class HibernateConnProvider implements ConnectionProvider {
private static final long serialVersionUID = -7281450846523561184L;
private ConnectionProvider provider;
HibernateConnProvider(ConnectionProvider delegate) {
this.provider = delegate;
}
@Override
public boolean isUnwrappableAs(Class unwrapType) {
return this.provider.isUnwrappableAs(unwrapType);
}
@Override
public <T> T unwrap(Class<T> unwrapType) {
return this.provider.unwrap(unwrapType);
}
@Override
public Connection getConnection() throws SQLException {
try {
Connection result = this.provider.getConnection();
Class<?> clazz = Class.forName("com.ddtek.jdbc.extensions.ExtEmbeddedConnection");
Field field = result.getClass().getDeclaredField("inner");
field.setAccessible(true);
Object jdbcConnection = field.get(result);
if (clazz.isAssignableFrom(jdbcConnection.getClass())) {
System.out.println("Unlocking database embedded jdbc driver.");
Method method = clazz.getMethod("unlock", String.class);
method.invoke(jdbcConnection, "driver_passkey");
}
return result;
} catch (Exception e) {
throw new SQLException(e);
}
}
@Override
public void closeConnection(Connection conn) throws SQLException {
this.provider.closeConnection(conn);
}
@Override
public boolean supportsAggressiveRelease() {
return this.provider.supportsAggressiveRelease();
}
}
Connection Provider invocation snippet is as follows:
You need to share a stack trace, otherwise it’s hard to understand why class loading fails. Since it’s an inner class, make sure it’s a static inner class and also that it is public, otherwise Hibernate can’t instantiate the provider.
Whether the inner class is static or not, the error message is same.
The stacktrace is as follows:
Dec 08, 2020 2:35:38 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate ORM core version 5.4.18.Final
Dec 08, 2020 2:35:38 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager
INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
Dec 08, 2020 2:35:39 PM org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator initiateService
INFO: HHH000130: Instantiating explicit connection provider: dev.venkat.jdbc.JDBCManager.HibernateConnProvider
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:275)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:176)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689)
at dev.venkat.jdbc.JDBCManager.(JDBCManager.java:43)
at dev.venkat.is.jdbc.JDBCManager.main(JDBCManager.java:54)
Caused by: org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [dev.venkat.jdbc.JDBCManager.HibernateConnProvider] as strategy [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:156)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:138)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:41)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
… 21 more
Caused by: org.hibernate.boot.registry.classloading.spi.ClassLoadingException: Unable to load class [dev.venkat.jdbc.JDBCManager.HibernateConnProvider]
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:133)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:152)
… 25 more
Caused by: java.lang.ClassNotFoundException: Could not load requested class : dev.venkat.jdbc.JDBCManager.HibernateConnProvider
at org.hibernate.boot.registry.classloading.internal.AggregatedClassLoader.findClass(AggregatedClassLoader.java:210)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:130)
… 26 more
Now Hibernate is looking for init() method in ConnectionProvider implmentation.
The stacktrace is as follows:
Dec 09, 2020 8:28:23 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate ORM core version 5.4.18.Final
Dec 09, 2020 8:28:23 AM org.hibernate.annotations.common.reflection.java.JavaReflectionManager
INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
Dec 09, 2020 8:28:24 AM org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator initiateService
INFO: HHH000130: Instantiating explicit connection provider: dev.venkat.jdbc.JDBCManager$HibernateConnProvider
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:275)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:176)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689)
at dev.venkat.jdbc.JDBCManager.(JDBCManager.java:43)
at dev.venkat.jdbc.JDBCManager.main(JDBCManager.java:54)
Caused by: org.hibernate.HibernateException: Could not instantiate connection provider [dev.venkat.jdbc.JDBCManager$HibernateConnProvider]
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:146)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:41)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
… 21 more
Caused by: org.hibernate.HibernateException: Could not instantiate connection provider [dev.venkat.jdbc.JDBCManager$HibernateConnProvider]
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:253)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:143)
… 24 more
Caused by: java.lang.InstantiationException: dev.venkat.jdbc.JDBCManager$HibernateConnProvider
at java.lang.Class.newInstance(Class.java:427)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:250)
… 25 more
Caused by: java.lang.NoSuchMethodException: dev.venkat.jdbc.JDBCManager$HibernateConnProvider.()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.newInstance(Class.java:412)
… 26 more
So, I’ve changed the implementation from inner/static inner class to public class and defined settings as:
Yet the error stacktrace doesn’t have much change except the fully qualified name of HibernateConnProvider.
This is the reason why I’ve used ServiceRegistry to inject the custom ConnectionProvider implementation. Unfortunately that’s also not working.
Any help?
Added that. It’s failing in both the cases : inner/static inner class and public class.
Inner/Inner static class:
Dec 09, 2020 2:23:11 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate ORM core version 5.4.18.Final
Dec 09, 2020 2:23:12 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager
INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
Dec 09, 2020 2:23:12 PM org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator initiateService
INFO: HHH000130: Instantiating explicit connection provider: dev.venkat.jdbc.JDBCManager$HibernateConnProvider
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:275)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.buildJdbcConnectionAccess(JdbcEnvironmentInitiator.java:145)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:66)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.(InFlightMetadataCollectorImpl.java:176)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689)
at dev.venkat.jdbc.JDBCManager.(JDBCManager.java:43)
at dev.venkat.jdbc.JDBCManager.main(JDBCManager.java:54)
Caused by: org.hibernate.HibernateException: Could not instantiate connection provider [dev.venkat.jdbc.JDBCManager$HibernateConnProvider]
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:146)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:41)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
… 21 more
Caused by: org.hibernate.HibernateException: Could not instantiate connection provider [dev.venkat.jdbc.JDBCManager$HibernateConnProvider]
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:253)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:143)
… 24 more
Caused by: java.lang.InstantiationException: dev.venkat.jdbc.JDBCManager$HibernateConnProvider
at java.lang.Class.newInstance(Class.java:427)
at org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:250)
… 25 more
Caused by: java.lang.NoSuchMethodException: dev.venkat.jdbc.JDBCManager$HibernateConnProvider.()
at java.lang.Class.getConstructor0(Class.java:3082)
at java.lang.Class.newInstance(Class.java:412)
… 26 more
External Class:
Dec 09, 2020 2:16:09 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate ORM core version 5.4.18.Final
Dec 09, 2020 2:16:10 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager
INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
Dec 09, 2020 2:16:10 PM org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator initiateService
INFO: HHH000130: Instantiating explicit connection provider: dev.venkat.jdbc.util.HibernateConnProvider
Trying to unlock connection.
Trying to unlock connection.
Trying to unlock connection.
Trying to unlock connection.
I don’t know what else I can tell you. You simply don’t have a default constructor in that class. The static keyword on the class is important, as non-static inner classes get a parameter added to constructors that captures the outer object.
Wish I could get more, but thats what I’ve got for when the implementation is a public class.
Basically, the flow gets into getConnection() method in this case, but call gets into recursion and the message “Trying to unlock connection” goes on.
Modified snippet:
public Connection getConnection() throws SQLException {
try {
Connection result = this.getConnection();
Class<?> clazz = Class.forName("com.ddtek.jdbc.extensions.ExtEmbeddedConnection");
Field field = result.getClass().getDeclaredField("inner");
field.setAccessible(true);
Object jdbcConnection = field.get(result);
if (clazz.isAssignableFrom(jdbcConnection.getClass())) {
System.out.println("Unlocking database embedded jdbc driver.");
Method method = clazz.getMethod("unlock", String.class);
method.invoke(jdbcConnection, "driver_passkey");
}
return result;
} catch (Exception e) {
throw new SQLException(e);
}
}
Well, this line here results in a recursion, so you will see a StackOverflowError. I don’t know what class you are extending, but maybe you wanted to use super.getConnection() instead?
Thanks for the suggestion. I have updated and refactored the getConnection() method (in delegate implementation) with the unlocking code for driver.
Back to original problem that the refactored implementation is not invoked for connection. No logs introduced in the method is available in out.
Stacktrace:
Dec 11, 2020 8:29:26 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate ORM core version 5.4.18.Final
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
Dec 11, 2020 8:29:28 AM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.1.0.Final}
Dec 11, 2020 8:29:28 AM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.PostgreSQL95Dialect
Dec 11, 2020 8:29:28 AM org.hibernate.engine.jdbc.spi.TypeInfo extractTypeInfo
WARN: HHH000362: Unable to retrieve type info result set : java.sql.SQLException: [PostgreSQL JDBC Driver]This driver is locked for use with embedded applications.
Dec 11, 2020 8:29:28 AM org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl sequenceInformationList
ERROR: Could not fetch the SequenceInformation from the database
java.sql.SQLException: [PostgreSQL JDBC Driver]This driver is locked for use with embedded applications.
at com.wm.dd.jdbc.postgresqlbase.ddcp.b(Unknown Source)
at com.wm.dd.jdbc.postgresqlbase.ddcp.a(Unknown Source)
at com.wm.dd.jdbc.postgresqlbase.ddco.b(Unknown Source)
at com.wm.dd.jdbc.postgresqlbase.ddco.a(Unknown Source)
at com.wm.dd.jdbc.postgresqlbase.BaseConnection.createStatement(Unknown Source)
at com.wm.dd.jdbc.postgresqlbase.BaseConnection.createStatement(Unknown Source)
at org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl.extractMetadata(SequenceInformationExtractorLegacyImpl.java:40)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.sequenceInformationList(JdbcEnvironmentImpl.java:403)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.<init>(JdbcEnvironmentImpl.java:268)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:114)
at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)
at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:101)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices(DefaultIdentifierGeneratorFactory.java:152)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)
at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)
at org.hibernate.boot.internal.InFlightMetadataCollectorImpl.<init>(InFlightMetadataCollectorImpl.java:176)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:118)
at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:473)
at org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:84)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:689)
at dev.venkat.jdbc.JDBCManager.<init>(JDBCManager.java:44)
at dev.venkat.jdbc.JDBCManager.main(JDBCManager.java:55)
Dec 11, 2020 8:29:28 AM org.hibernate.engine.jdbc.spi.TypeInfo extractTypeInfo
WARN: HHH000362: Unable to retrieve type info result set : java.sql.SQLException: [PostgreSQL JDBC Driver]This driver is locked for use with embedded applications.
As you can see in org.hibernate.testing.jdbc.ConnectionProviderDelegate#configure it will initialize the delegate on startup. What is the problem you are facing? Have you tried debugging into the configure method to see what is happening?