title: Tomcat org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name
body: <p>I'm trying to run a tomcat server but I get the following error after the server starts:
  <a href="https://pastebin.com/CmcxsK3U" rel="nofollow noreferrer">https://pastebin.com/CmcxsK3U</a></p>
  <p>here is my build.gradle file:</p>
  <pre><code>allprojects {
      apply plugin: 'java'
  
      group 'ro'
      version '1.0-SNAPSHOT'
  
      repositories {
          mavenCentral()
      }
  
      ext {
          springVersion = '5.3.20'
          postgresqlVersion = '42.3.4'
  
          slf4jVersion = '1.7.36'
          log4jVersion = '2.17.2'
  
          springDataVersion = '2.7.0'
          hibernateVersion = '5.2.6.Final'
          caffeineVersion = '3.1.0'
          hikariVersion = '5.0.1'
          jaxbapiVersion = '2.3.0'
  
          jacksonDatabindVersion = '2.13.3'
          javaxServeletApiVersion = '4.0.1'
  
          lombokVersion = '1.18.24'
      }
  
      dependencies {
          testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
          testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
  
  
          implementation group: 'org.json', name: 'json', version: '20220320'
  
  
          // https://mvnrepository.com/artifact/org.springframework/spring-context
          implementation group: 'org.springframework', name: 'spring-context', version: &quot;$springVersion&quot;
  
          // https://mvnrepository.com/artifact/org.springframework/spring-jdbc
          implementation group: 'org.springframework', name: 'spring-jdbc', version: '5.3.20'
  
          // https://mvnrepository.com/artifact/org.apache.commons/commons-dbcp2
          implementation group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.9.0'
  
  
          // logging
          implementation group: 'org.slf4j', name: 'slf4j-api', version: &quot;$slf4jVersion&quot;
          testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: &quot;$slf4jVersion&quot;
  
          implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: &quot;$log4jVersion&quot;
          implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: &quot;$log4jVersion&quot;
          implementation group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: &quot;$log4jVersion&quot;
  
  
          implementation group: 'org.springframework', name: 'spring-webmvc', version: &quot;$springVersion&quot;
  
  
          implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: &quot;$jacksonDatabindVersion&quot;
          implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: &quot;$jacksonDatabindVersion&quot;
  
  
          // https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api
          implementation group: 'javax.servlet', name: 'javax.servlet-api', version:&quot;$javaxServeletApiVersion&quot;
  
  
          // jpa
          implementation group: 'org.springframework', name: 'spring-context-support', version: &quot;$springVersion&quot;
          implementation group: 'org.springframework', name: 'spring-orm', version: &quot;$springVersion&quot;
          implementation group: 'org.springframework.data', name: 'spring-data-jpa', version: &quot;$springDataVersion&quot;
  
          implementation group: 'org.hibernate', name: 'hibernate-core', version:&quot;$hibernateVersion&quot;
  
          implementation group: 'org.postgresql', name: 'postgresql', version: &quot;$postgresqlVersion&quot;
  
          implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: &quot;$caffeineVersion&quot;
          implementation group: 'com.zaxxer', name: 'HikariCP', version: &quot;$hikariVersion&quot;
  //
          implementation group: 'javax.xml.bind', name: 'jaxb-api', version: &quot;$jaxbapiVersion&quot;
  
          // lombok
          compileOnly group: 'org.projectlombok', name: 'lombok', version: &quot;$lombokVersion&quot;
          annotationProcessor group: 'org.projectlombok', name: 'lombok', version: &quot;$lombokVersion&quot;
  
          
          implementation 'javax.persistence:javax.persistence-api:2.2'
      }
  
      test {
          useJUnitPlatform()
      }
  }
  </code></pre>
  <p>Initally I had this configuration:</p>
  <pre><code>allprojects {
      apply plugin: 'java'
  
      group 'ro'
      version '1.0-SNAPSHOT'
  
      repositories {
          mavenCentral()
      }
  
      ext {
          springVersion = '5.3.20'
          postgresqlVersion = '42.3.4'
  
          slf4jVersion = '1.7.36'
          log4jVersion = '2.17.2'
  
          springDataVersion = '2.7.0'
          hibernateVersion = '6.0.1.Final'
  //        caffeineVersion = '3.1.0'
          hikariVersion = '5.0.1'
  //        jaxbapiVersion = '2.3.0' // TODO: choose last version
  
  //        jacksonDatabindVersion = '2.13.3'
          javaxServeletApiVersion = '4.0.1'
  
          lombokVersion = '1.18.24'
      }
  
      dependencies {
          testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
          testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
  
  
  //        implementation group: 'org.json', name: 'json', version: '20220320'
  
  
          // https://mvnrepository.com/artifact/org.springframework/spring-context
          implementation group: 'org.springframework', name: 'spring-context', version: &quot;$springVersion&quot;
  
          // https://mvnrepository.com/artifact/org.springframework/spring-jdbc
          implementation group: 'org.springframework', name: 'spring-jdbc', version: '5.3.20'
  
          // https://mvnrepository.com/artifact/org.apache.commons/commons-dbcp2
          implementation group: 'org.apache.commons', name: 'commons-dbcp2', version: '2.9.0'
  
  
          // logging
          implementation group: 'org.slf4j', name: 'slf4j-api', version: &quot;$slf4jVersion&quot;
          testImplementation group: 'org.slf4j', name: 'slf4j-simple', version: &quot;$slf4jVersion&quot;
  
          implementation group: 'org.apache.logging.log4j', name: 'log4j-slf4j-impl', version: &quot;$log4jVersion&quot;
          implementation group: 'org.apache.logging.log4j', name: 'log4j-core', version: &quot;$log4jVersion&quot;
          implementation group: 'org.apache.logging.log4j', name: 'log4j-1.2-api', version: &quot;$log4jVersion&quot;
  
  
          implementation group: 'org.springframework', name: 'spring-webmvc', version: &quot;$springVersion&quot;
  
  
  //        implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: &quot;$jacksonDatabindVersion&quot;
  //        implementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: &quot;$jacksonDatabindVersion&quot;
  
  
          // https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api
          implementation group: 'javax.servlet', name: 'javax.servlet-api', version:&quot;$javaxServeletApiVersion&quot;
  
  
          // jpa
          implementation group: 'org.springframework', name: 'spring-context-support', version: &quot;$springVersion&quot;
          implementation group: 'org.springframework', name: 'spring-orm', version: &quot;$springVersion&quot;
          implementation group: 'org.springframework.data', name: 'spring-data-jpa', version: &quot;$springDataVersion&quot;
  
          implementation group: 'org.hibernate', name: 'hibernate-core', version:&quot;$hibernateVersion&quot;
  
          implementation group: 'org.postgresql', name: 'postgresql', version: &quot;$postgresqlVersion&quot;
  
  //        implementation group: 'com.github.ben-manes.caffeine', name: 'caffeine', version: &quot;$caffeineVersion&quot;
          implementation group: 'com.zaxxer', name: 'HikariCP', version: &quot;$hikariVersion&quot;
  //
  //        implementation group: 'javax.xml.bind', name: 'jaxb-api', version: &quot;$jaxbapiVersion&quot;
  
          // lombok
          compileOnly group: 'org.projectlombok', name: 'lombok', version: &quot;$lombokVersion&quot;
          annotationProcessor group: 'org.projectlombok', name: 'lombok', version: &quot;$lombokVersion&quot;
      }
  
      test {
          useJUnitPlatform()
      }
  }
  </code></pre>
  <p>I use IntelliJ and it suggested me download the files for javax.persistence and they got downloaded into a <code>lib</code> folder. But when I ran the tomcat server it said that it javax.persistence could not be found.</p>
  <p>EDIT
  I removed the <code>lib</code> folder but I still get an error:</p>
  <pre><code>2022-05-31T22:27:35,094 WARN  [RMI TCP Connection(6)-127.0.0.1]: ProxyConnection                      - HikariPool-1 - Connection org.postgresql.jdbc.PgConnection@45021d91 marked as broken because of SQLSTATE(0A000), ErrorCode(0) 
  java.sql.SQLFeatureNotSupportedException: Method org.postgresql.jdbc.PgConnection.createClob() is not yet implemented.
      at org.postgresql.Driver.notImplemented(Driver.java:699) ~[postgresql-42.3.4.jar:42.3.4]
      at org.postgresql.jdbc.PgConnection.createClob(PgConnection.java:1347) ~[postgresql-42.3.4.jar:42.3.4]
      at com.zaxxer.hikari.pool.HikariProxyConnection.createClob(HikariProxyConnection.java) ~[HikariCP-5.0.1.jar:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
      at org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl.useContextualLobCreation(LobCreatorBuilderImpl.java:113) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.engine.jdbc.env.internal.LobCreatorBuilderImpl.makeLobCreatorBuilder(LobCreatorBuilderImpl.java:54) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentImpl.&lt;init&gt;(JdbcEnvironmentImpl.java:271) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:114) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:88) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:257) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:231) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:51) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:94) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:240) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:210) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.handleTypes(MetadataBuildingProcess.java:352) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:111) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.metadata(EntityManagerFactoryBuilderImpl.java:858) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:885) ~[hibernate-core-5.2.6.Final.jar:5.2.6.Final]
      at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:58) ~[spring-orm-5.3.20.jar:5.3.20]
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.3.20.jar:5.3.20]
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-5.3.20.jar:5.3.20]
      at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-5.3.20.jar:5.3.20]
      at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.3.20.jar:5.3.20]
      at ro.lab11.core.config.JPAConfig.entityManagerFactory(JPAConfig.java:63) ~[core-1.0-SNAPSHOT.jar:?]
      at ro.lab11.core.config.JPAConfig$$EnhancerBySpringCGLIB$$788ac8ae.CGLIB$entityManagerFactory$1(&lt;generated&gt;) ~[core-1.0-SNAPSHOT.jar:?]
      at ro.lab11.core.config.JPAConfig$$EnhancerBySpringCGLIB$$788ac8ae$$FastClassBySpringCGLIB$$e47a032e.invoke(&lt;generated&gt;) ~[core-1.0-SNAPSHOT.jar:?]
      at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.20.jar:5.3.20]
      at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.20.jar:5.3.20]
      at ro.lab11.core.config.JPAConfig$$EnhancerBySpringCGLIB$$788ac8ae.entityManagerFactory(&lt;generated&gt;) ~[core-1.0-SNAPSHOT.jar:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
      at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:330) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:113) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:693) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:510) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:374) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:134) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1707) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1452) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[spring-beans-5.3.20.jar:5.3.20]
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.20.jar:5.3.20]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.20.jar:5.3.20]
      at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:702) ~[spring-webmvc-5.3.20.jar:5.3.20]
      at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:578) ~[spring-webmvc-5.3.20.jar:5.3.20]
      at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:530) ~[spring-webmvc-5.3.20.jar:5.3.20]
      at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:170) ~[spring-webmvc-5.3.20.jar:5.3.20]
      at javax.servlet.GenericServlet.init(GenericServlet.java:158) ~[servlet-api.jar:4.0.FR]
      at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1164) ~[catalina.jar:9.0.63]
      at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1013) ~[catalina.jar:9.0.63]
      at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957) ~[catalina.jar:9.0.63]
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5264) ~[catalina.jar:9.0.63]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[catalina.jar:9.0.63]
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726) ~[catalina.jar:9.0.63]
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:698) ~[catalina.jar:9.0.63]
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:696) ~[catalina.jar:9.0.63]
      at org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1783) ~[catalina.jar:9.0.63]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:293) ~[tomcat-coyote.jar:9.0.63]
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809) ~[?:?]
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) ~[?:?]
      at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:460) ~[catalina.jar:9.0.63]
      at org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:408) ~[catalina.jar:9.0.63]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
      at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:293) ~[tomcat-coyote.jar:9.0.63]
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809) ~[?:?]
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) ~[?:?]
      at com.sun.jmx.remote.security.MBeanServerAccessController.invoke(MBeanServerAccessController.java:468) ~[?:?]
      at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466) ~[?:?]
      at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307) ~[?:?]
      at java.security.AccessController.doPrivileged(AccessController.java:691) ~[?:?]
      at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1406) ~[?:?]
      at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:827) ~[?:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78) ~[?:?]
      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
      at java.lang.reflect.Method.invoke(Method.java:567) ~[?:?]
      at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357) ~[?:?]
      at sun.rmi.transport.Transport$1.run(Transport.java:200) ~[?:?]
      at sun.rmi.transport.Transport$1.run(Transport.java:197) ~[?:?]
      at java.security.AccessController.doPrivileged(AccessController.java:691) ~[?:?]
      at sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[?:?]
      at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587) ~[?:?]
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828) ~[?:?]
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705) ~[?:?]
      at java.security.AccessController.doPrivileged(AccessController.java:391) ~[?:?]
      at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704) ~[?:?]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
      at java.lang.Thread.run(Thread.java:831) ~[?:?]
  </code></pre>
  <p>EDIT 2:
  I changed hibernate version to <code>5.4.2.Final</code> and now it seems to be working.</p>