Hello Ivy-Developers!

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

Update:

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

designer\plugins\ch.ivyteam.hibernate_5.1.0.201409121008.jar\lib\mvn\

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();
AuditReaderFactory.get(em);

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

Alexis
(suspended)
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:

https://github.com/ivy-pes/HibernateEnversSample

link

answered 15.02.2017 at 14:30

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
1.4k102118122
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.

link

answered 28.01.2015 at 10:27

Reguel%20Wermelinger's gravatar image

Reguel Werme... ♦♦
9.4k31958
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

Follow this question

By Email:

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

By RSS:

Answers

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

Tags:

×32
×6

Asked: 27.01.2015 at 17:05

Seen: 4,523 times

Last updated: 15.02.2017 at 14:30