Hibernate Envers - REVINFO table doesn't exist

Ads
 

Hibernate Envers - REVINFO table doesn't exist

Hi,

In my project I have to save the data change log. For this we are using the Hibernate Envers, but there is no table REFINFO in my database that's why its giving following error:

Hibernate Envers - REVINFO table doesn't exist

How to resolve this?

Thanks

View Answers

April 11, 2017 at 2:38 PM

Hi,

There are two options: a) Create this table manually in your database. In case of MySQL you can use the following query:

CREATE TABLE `revinfo` (
  `REV` int(11) NOT NULL AUTO_INCREMENT,
  `REVTSTMP` bigint(20) DEFAULT NULL,
  PRIMARY KEY (`REV`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

b) Allow hibernate to create table automatically. For this add following property in the hibernate.cfg.xml file:

<property name="hibernate.hbm2ddl.auto">update</property>

After adding about property Hibernate will create table automatically.

Hope above information will help you in solving the problem.

Thanks


April 11, 2017 at 2:53 PM

Hi,

Check Hibernate 5 tutorials on our website for more examples and articles.

Thanks


April 11, 2017 at 2:55 PM

Hi, Learn how to create Hibernate 5 Annotation Example.

Check source code at the page Hibernate 5 Annotation Example.

Thanks


April 26, 2017 at 12:37 PM

Hi,

Check the tutorial Hibernate envers custom revinfo table.

Thanks

Ads









Related Tutorials/Questions & Answers:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'jpa.sequence' doesn't exist
'jpa.sequence' doesn't exist Error Code: 1146 Call: UPDATE SEQUENCE SET SEQ...: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: T able 'jpa.sequence' doesn't exist Error... .sequence' doesn't exist
MySQL issue: Table 'data_dictionary.CHARACTER_SETS' doesn't exist
MySQL issue: Table 'data_dictionary.CHARACTER_SETS' doesn't exist  MySQL issue: Table 'datadictionary.CHARACTERSETS' doesn't exist
Advertisements
Hibernate envers revtype values
Hibernate envers revtype values  Hi, What are Hibernate envers revtype values? Thanks   Hi, Hibernate envers library automatically keep track of the changes made to the entity. It create a new table with _AUD suffix
Hibernate envers audit example
Hibernate envers audit example  Hi, Hibernate envers is popular for versioning the entity. I am searching for Hibernate envers audit example. Give... data. Thanks   Hi, Hibernate envers provides the AuditReader class
Any specific log4j statements for Hibernate Envers for showing the Envers related errors
Any specific log4j statements for Hibernate Envers for showing the Envers related errors  We are applying Hibernate Envers for existing hibernate project. If there is any specific errors related to hibernate envers those
Hibernate Temporary Table
Hibernate Temporary Table   How can i create temporary table in Hibernate
How to update table in Hibernate
How to update table in Hibernate  Hi, I have a table in database that has two fields in it. Student Name and ID, can anyone explain me how to update these tables in Hibernate. Thanks.   Update table query in Hibernate
Hibernate envers example
Envers? Hibernate envers custom revinfo table example Thanks...Hibernate envers example  Hi, I am looking for the running examples of Hibernate envers framework. Provide me the tutorial page url. Thanks  
delete row from a table in hibernate
delete row from a table in hibernate  is there method to delete row in a table using hibernate like save(-) to insert row
Joining Multiple table in Hibernate
Joining Multiple table in Hibernate  Hi everyone, I'm new to Hibernate (even in JAVA), and I'm having some doubt's about one thing. I created 2... (using System.out.println) the query results. I've been using (just for one table
Hibernate table not mapped error - solution
Hibernate table not mapped error - solution  Hi, What is the reason of Hibernate table not mapped error and it can be solved? Thanks   HI... configuration of Entity class in Hibernate. Hibernate is ORM framework in Java which
can we update table in hibernate with out primary key in table?
can we update table in hibernate with out primary key in table?  can we update table in hibernate with out primary key in table
Version of exist>exist dependency
List of Version of exist>exist dependency
Hibernate 5 Envers
. Using these tables Hibernate Envers audits the table data. In the next session...Hibernate 5 Envers - What is Hibernate 5 Envers library and How to use it? In this section we will introduce you with the Hibernate 5 Envers library
Version of exist>exist-resolver dependency
List of Version of exist>exist-resolver dependency
Version of exist>exist-xmldb dependency
List of Version of exist>exist-xmldb dependency
Delete database Table through hibernate and Spring
Delete database Table through hibernate and Spring  Hi, I am using Spring,Hibernate and Tapestry to save and also fetch data simultaneously from... once without repetation,or Detete table after data is fetched. Here
Hibernate Envers get all revisions
Hibernate Envers get all revisions - Example of getting all the revision... the audit log programmatically using the Hibernate Envers API. Auditing Entity...: insert into REVINFO (REVTSTMP) values (?) Hibernate: insert into article_AUD
delete row from a table using hibernate
delete row from a table using hibernate  //code in java file String hql="delete from CONTACT c where ID=6"; Query query=session.createQuery(hql); //error when executing above code CONTACT is not mapped
Artifacts of exist
List of Artifacts of exist maven depenency
package org.hibernate.util does not exist
(4.1.1.RELEASE) and Hibernate (4.3.6.Final) its giving following error: package org.hibernate.util does not exist Actually I am porting my old application to latest version ofSpring (4.1.1.RELEASE) and Hibernate (4.3.6.Final) . How to solve
Hibernate Criteria load all objects from table
Hibernate Criteria load all objects from table - Learn how to load all... from a table then you can easily use the Hibernate Criteria load all objects... the Hibernate Criteria Query to fetch all data from a table. Read more
How properties of a class are mapped to the columns of a database table in Hibernate?
Hibernate Mapping:  How properties of a class are mapped to the columns of a database table in Hibernate? Hibernate 5 is very powerful yet flexible ORM... properties to database table Hibernate 5 is mostly using the annotations
How properties of a class are mapped to the columns of a database table in Hibernate?
Hibernate Mapping:  How properties of a class are mapped to the columns of a database table in Hibernate? Hibernate 5 is very powerful yet flexible ORM... properties to database table Hibernate 5 is mostly using the annotations
How properties of a class are mapped to the columns of a database table in Hibernate?
Hibernate Mapping:  How properties of a class are mapped to the columns of a database table in Hibernate? Hibernate 5 is very powerful yet flexible ORM... properties to database table Hibernate 5 is mostly using the annotations
How properties of a class are mapped to the columns of a database table in Hibernate?
Hibernate Mapping:  How properties of a class are mapped to the columns of a database table in Hibernate? Hibernate 5 is very powerful yet flexible ORM... properties to database table Hibernate 5 is mostly using the annotations
package javax.validation does not exist
not exist How to resolve the error? Thanks   Hi, You should include...;hibernate-validator</artifactId> <version>4.0.2.GA<
hibernate
hibernate  when we using schemaExport in hibernate every time it drops the existing table and create new table ,if table contain dependent table then is it drop
ModuleNotFoundError: No module named 'exist'
ModuleNotFoundError: No module named 'exist'  Hi, My Python program is throwing following error: ModuleNotFoundError: No module named 'exist' How to remove the ModuleNotFoundError: No module named 'exist'
Hibernate Insert
This tutorial will help you to learn how to insert data into table by using hibernate
JDBC Drop Table Example
JDBC Drop Table Example:   In this tutorial we will learn  how drop Table from Database. This tutorial  first  create database "testjdbc" if not exist and create a table "user" under "

Ads