Hello Ivy-Developers!

Envers is a powerfull Library, that comes along with the Hibernate-Package and allows auto-Auditing for entities. (History-Tables etc.)


To insert the library I did as following: Added hibernate-envers-4.2.13.Final.jar to ivy-Hibernate-jar:


made some changes in the ivy-Hibernate-jar: ',lib/mvn/hibernate-envers-4.2.13.Final.jar' added to MANIFEST.MF

in pom.xml I inserted a new dependency for hibernate-envers (see pom.xml)

When inserting this library this unusual way, there are no more errors accessing the persistence.

Adding @Audited to the Entity gives no error, but no auditing happens on merge.(Wich would usualy be the case)

Merging through the EntityManager (from createEntityManager()) does not work (Nothing happens, no error)

Trying to access the AuditReader will fail on a ClassNotFoundException: org.hibernate.envers.AuditReaderFactory

// switching contextClassLoader to ivy.request.getProject().getProjectClassLoader()
EntityManager em = entityManager.createEntityManager();

As I understand this has been successfully implemented in the csc project.

So the questions are: How can I integrate this library into Ivy? If not possible, is there a way to detach Hibernate more from Ivy?

Installation as described in: Guide from Hibernate

Thanks in advance!

Greetings Alexis

asked 27.01.2015 at 17:05

Alexis's gravatar image

accept rate: 66%

edited 04.02.2015 at 16:06

Hi all, with ivy 6.6 and later it will be much easier to use Hibernate Envers in an ivy Project (Thanks to Issue XIVY-1696). An ivy sample project using Hibernate Envers can be found here:



answered 15.02.2017 at 14:30

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
accept rate: 77%

In the designer: copy the additional library into jre/lib/ext

In the engine (server): copy it to lib/patch

on both products, restart is required in order to access the libraries.


answered 28.01.2015 at 10:27

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
accept rate: 70%

edited 28.01.2015 at 10:28

Thank you Reguel, I tried this, but still no other result than ClassNotFoundException: org.hibernate.integrator.spi.Integrator But with another Classloader: at java.net.URLClassLoader$1.run(Unknown Source)

The hibernate Interface Intergrator is beeing implemented by envers class via osgi (some service to listen events like postupdate)

Tell me if you're intressed in stacktrace

(28.01.2015 at 15:17) Alexis Alexis's gravatar image

Added some more information, could advance a little bit further on this issue.

(04.02.2015 at 16:05) Alexis Alexis's gravatar image

Could you please tell me how you solved the problem?

(04.11.2015 at 08:16) Florian Hein... Florian%20Heinrich's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 27.01.2015 at 17:05

Seen: 3,107 times

Last updated: 15.02.2017 at 14:30