'Missing table [rev_info] after bump liquibase version, spring data envers
I have problem with my project after bump liquibase version to 4.9.1. There is error:
BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: missing table [rev_info]
There is spring-data-envers version 2.5.5
Everyting works fine with liquibse 4.4 But when I change to newest version (4.9.1) applicantion do not start.
I have revision entity - RevInfo and changeset to create this table create table public.rev_info
( id INTEGER NOT NULL, timestamp BIGSERIAL, CONSTRAINT rev_pk PRIMARY KEY (id) );
ddl-auto is set validate
Solution 1:[1]
The Java Revisited blog had a solution for this error on their site here, but to summarize:
There could be numerous reasons why Spring was unable to create a bean with name X, but the reason can be found on the detailed stack trace. This error always has some underlying cause e.g. a ClassNotFoundException or a NoClassDefFoundError, which potentially signals a missing JAR file in the classpath.
In short, you should always give a detailed look at the stack trace of your error message and find out the exact cause of "org.springframework.beans.factory.BeanCreationException: Error creating a bean with name" error. The solution would vary accordingly.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | tabbyfoo |