Hibernate Envers can't resolve audit tableHibernate Envers - Audit tables are not inserted in Spring-Hibernate-envers applicationCreate the perfect JPA entityHow not to audit a join table and related entities using Hibernate Envers?Hibernate envers is not workingHibernate Envers: AuditQuery throws ClasscastExceptionHibernate Envers auditing non audited entities@AuditJoinTable not working while auditing the many to many relations using Hibernate enversHow to customize hibernate @ElementCollection envers audit table name?Hibernate envers @embeddable property level auditHibernate Envers - Support for JDBC batching in ValidityAuditStrategy with allow_identifier_reuse=true

Connect neutrals together in 3-gang box (load side) with 3x 3-way switches?

Does the Entangle spell require existing vegetation?

Construct a pentagon avoiding compass use

I do not have power to all my breakers

Is `curl something | sudo bash -` a reasonably safe installation method?

Doing research in academia and not liking competition

Are villager price increases due to killing them temporary?

Crab Nebula short story from 1960s or '70s

Why use null function instead of == []

How to fit a linear model in the Bayesian way in Mathematica?

Does optical correction give a more aesthetic look to the SBI logo?

Commutator subgroup of Heisenberg group.

How would you write do the dialogues of two characters talking in a chat room?

How would someone destroy a black hole that’s at the centre of a planet?

Why do candidates not quit if they no longer have a realistic chance to win in the 2020 US presidents election

Can I activate an iPhone without an Apple ID?

Why do they not say "The Baby"

Remove intersect line for one circle using venndiagram2sets

Is killing off one of my queer characters homophobic?

Phrasing "I just came from the museum by foot": "Je viens du musée à pied"?

Why is "dark" an adverb in this sentence?

Deep Learning based time series forecasting

Asking for higher salary after I increased my initial figure

Confused about 誘われて (Sasowarete)



Hibernate Envers can't resolve audit table


Hibernate Envers - Audit tables are not inserted in Spring-Hibernate-envers applicationCreate the perfect JPA entityHow not to audit a join table and related entities using Hibernate Envers?Hibernate envers is not workingHibernate Envers: AuditQuery throws ClasscastExceptionHibernate Envers auditing non audited entities@AuditJoinTable not working while auditing the many to many relations using Hibernate enversHow to customize hibernate @ElementCollection envers audit table name?Hibernate envers @embeddable property level auditHibernate Envers - Support for JDBC batching in ValidityAuditStrategy with allow_identifier_reuse=true






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have a JPA entity which I want audited. I added Envers to my project, and added the @Audited annotation to the entities I need. Now, the changes are being logged in the audit tables, but I cannot retrieve them through the audit readers provided by Envers.



My entity is as follows.



@Entity
@Audited
@AuditTable(value = "blog_posts_AUD")
@Table(name = "blog_posts")
public class Post
...



I'm trying to query the audit tables as follows.



AuditReader reader = AuditReaderFactory.get(entityManager);
List revisions = reader.getRevisions(Post.class, primaryKey);


This fails, because the SQL call contains a reference to a table called org.foo.bar.blog_posts_AUD, which obviously does not exist. It seems that Hibernate is not picking up the @AuditTable annotation (or the default audit table suffix, for that matter). Anyone ever faced this before?










share|improve this question






















  • I assume it works if you don't use the @AuditTable annotation. From what I can see based on what you posted both scenarios should work and its likely a bug. Open an issue at hibernate.atlassian.net for hibernate-envers and attach a test case example.

    – Naros
    Mar 26 at 15:14











  • Doesn't work even if I remove @AuditTable.

    – Anomitra
    Mar 27 at 7:18












  • The table Envers should create would be called blog_posts_AUD assuming you're using the default configuration for the suffix. At no point should the SQL query attempt to reference a table called org.foo.bar.blog_posts_AUD. Can you replicate the problem with the envers test case templates at github.com/hibernate/hibernate-test-case-templates? Just fork the repository, use the envers-5 test and add your entities and such and open a jira attaching the envers test case.

    – Naros
    Mar 27 at 15:00

















0















I have a JPA entity which I want audited. I added Envers to my project, and added the @Audited annotation to the entities I need. Now, the changes are being logged in the audit tables, but I cannot retrieve them through the audit readers provided by Envers.



My entity is as follows.



@Entity
@Audited
@AuditTable(value = "blog_posts_AUD")
@Table(name = "blog_posts")
public class Post
...



I'm trying to query the audit tables as follows.



AuditReader reader = AuditReaderFactory.get(entityManager);
List revisions = reader.getRevisions(Post.class, primaryKey);


This fails, because the SQL call contains a reference to a table called org.foo.bar.blog_posts_AUD, which obviously does not exist. It seems that Hibernate is not picking up the @AuditTable annotation (or the default audit table suffix, for that matter). Anyone ever faced this before?










share|improve this question






















  • I assume it works if you don't use the @AuditTable annotation. From what I can see based on what you posted both scenarios should work and its likely a bug. Open an issue at hibernate.atlassian.net for hibernate-envers and attach a test case example.

    – Naros
    Mar 26 at 15:14











  • Doesn't work even if I remove @AuditTable.

    – Anomitra
    Mar 27 at 7:18












  • The table Envers should create would be called blog_posts_AUD assuming you're using the default configuration for the suffix. At no point should the SQL query attempt to reference a table called org.foo.bar.blog_posts_AUD. Can you replicate the problem with the envers test case templates at github.com/hibernate/hibernate-test-case-templates? Just fork the repository, use the envers-5 test and add your entities and such and open a jira attaching the envers test case.

    – Naros
    Mar 27 at 15:00













0












0








0








I have a JPA entity which I want audited. I added Envers to my project, and added the @Audited annotation to the entities I need. Now, the changes are being logged in the audit tables, but I cannot retrieve them through the audit readers provided by Envers.



My entity is as follows.



@Entity
@Audited
@AuditTable(value = "blog_posts_AUD")
@Table(name = "blog_posts")
public class Post
...



I'm trying to query the audit tables as follows.



AuditReader reader = AuditReaderFactory.get(entityManager);
List revisions = reader.getRevisions(Post.class, primaryKey);


This fails, because the SQL call contains a reference to a table called org.foo.bar.blog_posts_AUD, which obviously does not exist. It seems that Hibernate is not picking up the @AuditTable annotation (or the default audit table suffix, for that matter). Anyone ever faced this before?










share|improve this question














I have a JPA entity which I want audited. I added Envers to my project, and added the @Audited annotation to the entities I need. Now, the changes are being logged in the audit tables, but I cannot retrieve them through the audit readers provided by Envers.



My entity is as follows.



@Entity
@Audited
@AuditTable(value = "blog_posts_AUD")
@Table(name = "blog_posts")
public class Post
...



I'm trying to query the audit tables as follows.



AuditReader reader = AuditReaderFactory.get(entityManager);
List revisions = reader.getRevisions(Post.class, primaryKey);


This fails, because the SQL call contains a reference to a table called org.foo.bar.blog_posts_AUD, which obviously does not exist. It seems that Hibernate is not picking up the @AuditTable annotation (or the default audit table suffix, for that matter). Anyone ever faced this before?







java hibernate playframework hibernate-criteria hibernate-envers






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 6:31









AnomitraAnomitra

7009 silver badges22 bronze badges




7009 silver badges22 bronze badges












  • I assume it works if you don't use the @AuditTable annotation. From what I can see based on what you posted both scenarios should work and its likely a bug. Open an issue at hibernate.atlassian.net for hibernate-envers and attach a test case example.

    – Naros
    Mar 26 at 15:14











  • Doesn't work even if I remove @AuditTable.

    – Anomitra
    Mar 27 at 7:18












  • The table Envers should create would be called blog_posts_AUD assuming you're using the default configuration for the suffix. At no point should the SQL query attempt to reference a table called org.foo.bar.blog_posts_AUD. Can you replicate the problem with the envers test case templates at github.com/hibernate/hibernate-test-case-templates? Just fork the repository, use the envers-5 test and add your entities and such and open a jira attaching the envers test case.

    – Naros
    Mar 27 at 15:00

















  • I assume it works if you don't use the @AuditTable annotation. From what I can see based on what you posted both scenarios should work and its likely a bug. Open an issue at hibernate.atlassian.net for hibernate-envers and attach a test case example.

    – Naros
    Mar 26 at 15:14











  • Doesn't work even if I remove @AuditTable.

    – Anomitra
    Mar 27 at 7:18












  • The table Envers should create would be called blog_posts_AUD assuming you're using the default configuration for the suffix. At no point should the SQL query attempt to reference a table called org.foo.bar.blog_posts_AUD. Can you replicate the problem with the envers test case templates at github.com/hibernate/hibernate-test-case-templates? Just fork the repository, use the envers-5 test and add your entities and such and open a jira attaching the envers test case.

    – Naros
    Mar 27 at 15:00
















I assume it works if you don't use the @AuditTable annotation. From what I can see based on what you posted both scenarios should work and its likely a bug. Open an issue at hibernate.atlassian.net for hibernate-envers and attach a test case example.

– Naros
Mar 26 at 15:14





I assume it works if you don't use the @AuditTable annotation. From what I can see based on what you posted both scenarios should work and its likely a bug. Open an issue at hibernate.atlassian.net for hibernate-envers and attach a test case example.

– Naros
Mar 26 at 15:14













Doesn't work even if I remove @AuditTable.

– Anomitra
Mar 27 at 7:18






Doesn't work even if I remove @AuditTable.

– Anomitra
Mar 27 at 7:18














The table Envers should create would be called blog_posts_AUD assuming you're using the default configuration for the suffix. At no point should the SQL query attempt to reference a table called org.foo.bar.blog_posts_AUD. Can you replicate the problem with the envers test case templates at github.com/hibernate/hibernate-test-case-templates? Just fork the repository, use the envers-5 test and add your entities and such and open a jira attaching the envers test case.

– Naros
Mar 27 at 15:00





The table Envers should create would be called blog_posts_AUD assuming you're using the default configuration for the suffix. At no point should the SQL query attempt to reference a table called org.foo.bar.blog_posts_AUD. Can you replicate the problem with the envers test case templates at github.com/hibernate/hibernate-test-case-templates? Just fork the repository, use the envers-5 test and add your entities and such and open a jira attaching the envers test case.

– Naros
Mar 27 at 15:00












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351038%2fhibernate-envers-cant-resolve-audit-table%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55351038%2fhibernate-envers-cant-resolve-audit-table%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript