Questions tagged [javers]

JaVers is a lightweight java library for auditing changes in your data.

What is JaVers

JaVers is a lightweight java library for auditing changes in your data.

We all use Version Control Systems for source code, so why not use a specialized framework to provide an audit trail of your Java objects (entities, POJO, data objects)?

Story of JaVers

When developing an application, we usually concentrate on the current state of the domain objects. So we simply instantiate them, apply some changes and eventually, delete them, not paying much attention to their previous states.

The challenge arises when a new requirement is discovered.

As a User, I want to know who changed this status, when the change was performed and what the previous status was. The problem is that both version and change notions are not easily expressible either in Java language or in the mainstream databases (although NoSQL document databases have an advantage here over relational databases).

This is the niche that JaVers fills. In JaVers, version and change are first class citizens.

Basic facts about JaVers

  • It’s lightweight and versatile. We don’t make any assumptions about your data model, bean container or underlying data storage.
  • Configuration is easy. Since we use JSON for object serialization, we don’t want you to provide detailed ORM-like mapping. JaVers only needs to know some high-level facts about your data model.
  • JaVers is meant to keep its data versioning records (snapshots) in the - application’s primary database, along with main data. We use some basic notions following Eric Evans DDD terminology like Entity or Value Objects, pretty much how JPA does. We believe that this is the right way to describe data.
  • JaVers is written in Java7 and can be run on JDK 7 or higher.

Licence

JaVers is released under Apache License Version 2.0.

Homepage

http://javers.org/

388 questions
11
votes
2 answers

Javers - What are advantages of using Javers instead of Envers?

I am developing a RESTful API using Spring Data REST. Now for auditing, Spring does have the option to auditing meta data like created_date and modified_date but they don't provide entity versioning. Currently there are two popular libraries for…
Charlie
  • 3,113
  • 3
  • 38
  • 60
6
votes
3 answers

java.lang.NoSuchMethodError: com.mongodb.client.MongoCollection.insertOne exception when inserting entry to Javers Mongodb collection

I am able to insert the data to mongodb collection. Same time Javers framework trying to insert the data to jv_snapshots collection. Data insertion to jv_snapshots collection is failing and getting below exception: java.lang.NoSuchMethodError:…
Noyal Joy
  • 61
  • 1
  • 9
5
votes
3 answers

Efficient way for Auditing

I am trying to implement an audit layer for my spring boot application.I tried two approaches as of now. 1) Created 1 audit table with fields user_name, table_name,column_name, old_value, new_value, uuid, event_type. whenever any changes are saved,…
a_good_human
  • 544
  • 3
  • 12
4
votes
2 answers

Why does code in static block execute multiple times?

I have created a class in Spring boot to establish a global javers object that can be used by all classes. This is my code. @Component public class JaversInstance { public static final Javers javers; static { ConnectionProvider…
a_good_human
  • 544
  • 3
  • 12
4
votes
3 answers

javers comparing lists in object giving inconsistent results

I am struggling to see why the following doesn't give me the same results. If I use Javers to just compare the two lists (which have items in different orders) then I get no differences as I have specified the AS_SET List comparison to ignore the…
James Mullen
  • 51
  • 2
  • 3
4
votes
1 answer

Javers:Ignore specific fields in Value Object while comparing two jsons

I am trying to compare two jsons, expected and the API Response using Javers, as part of testing. I want the comparison to exclude the ID parameters that are dynamically generated by response. My VO is like public class…
Divya
  • 43
  • 1
  • 3
3
votes
0 answers

Multi tenant audit logging in java with spring framework?

We have a multi-tenant Spring Web app setup with Hibernate as JPA. We use a tenant per schema. We like to use tools like Envers or JaVers for Audit logging such that every db schema has its own audit tables. How have you implemented this? Or would…
edbras
  • 4,145
  • 9
  • 41
  • 78
3
votes
1 answer

Including 5.8.13 version of Javers causes weird `9730` error message at build time

I'm encountering strange behavior when trying to include latest version of Javers (5.8.13 atm) adding implementation("org.javers:javers-spring-boot-starter-mongo:5.8.13") into my gradle.build.kts file and then launching a build with gradlew…
Aurelman
  • 63
  • 1
  • 3
3
votes
1 answer

Async auditing with JaVers

I need to audit changes to some entities in our application and am thinking of using JaVers. I like the support for interrogating the audit data provided by JaVers. Hibernate Envers looks good, but it stores data in the same DB. Here are my…
Stef
  • 2,603
  • 2
  • 18
  • 28
3
votes
1 answer

Save only changes on JV_SNAPSHOT table instead of entire object for Audit

I'm trying to implement Javers for auditing my fairly complex object, and I love it so far. But when I see the database, entire snapshot is saved for my object which will eventually grow massive in my use case. Since I'm using Javers only to audit…
asok Buzz
  • 1,876
  • 3
  • 24
  • 50
3
votes
2 answers

Is it possible to deserialise a Javers Diff?

I am trying to implement a simple diff system for an existing legacy system. I am calculating diffs between multiple potential object states using Javers, and persisting them in a serialised version. I do not want to commit the change on my object,…
Solvemon
  • 1,373
  • 1
  • 13
  • 22
3
votes
2 answers

what is the first Parameter of TapTarget.forBounds and what is it's meaning Rect

i am using this library from Github to make sequence of TapTargetView https://github.com/KeepSafe/TapTargetView i want to use the TapTargetSequence but i don't know the first parameter of this " TapTarget.forBounds " in the Sequence example that…
3
votes
2 answers

Javers ENTITY_INSTANCE_WITH_NULL_ID when using 2 databases

I have this exception "ENTITY_INSTANCE_WITH_NULL_ID" when I store data in Postgres (using JPA Lazy Load) and I store javers in MongoDB Spring Boot: 1.4.0.RELEASE Sprig Data JPA: 1.4.0.RELEASE Javers: 2.3.0 I debugged and saw that ID is null if…
3
votes
2 answers

org.hibernate.proxy.HibernateProxy. Forgot to register a type adapter?

We are trying to get javers 2.2.2 setup using Oracle and a Hibernate/JPA (non-spring) based App. When using the internal repo and a standard (non-transactional) builder I am able to successfully log and retrieve audit objects. However, when I do a…
David T
  • 31
  • 1
  • 3
3
votes
2 answers

I am facing Performance issue with Javers while inserting data

I am using Javers with Spring Data JPA + Hibernate. When I use CurdRepository.save(Collection), the Javers API is auditing each object in the collection one by one and its causing delay to the overall insert process. Before Integrating Javers the…
pradip
  • 31
  • 2
1
2 3
25 26