Project vaadin + h2 + hibernate + tomcat trying to access the database, but at the configuration stage gives an error
private static SessionFactory buildSessionFactory (Class paramClass) { return new Configuration() .configure("hibernate.cfg.xml") .addAnnotatedClass(paramClass) .buildSessionFactory(); } apparently, somehow connected with the wrong jdbc: url
##URL for connection to DB hibernate.connection.url = jdbc:h2:tcp://localhost:8080/~/public Errors:
org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] ... Caused by: org.hibernate.exception.JDBCConnectionException: Error calling DriverManager#getConnection ... Caused by: java.sql.SQLException: No suitable driver found for jdbc:h2:tcp://localhost:8080/~/public The problem is not exactly that there is no PUBLIC database, as migrations through flyway work correctly
Apparently, I do not understand something in the very foundation of interaction with the database, because no matter how I tried to google it I did not find the solution.