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
2
votes
0 answers

Create difference object with JaVers

Perhaps I'm completely misunderstanding the purpose of JaVers, but I'm struggling here. I got this POJO with a few nested subclasses, and I would like to create a new instance of that object ONLY containing the differences between two other…
Selbi
  • 813
  • 7
  • 23
2
votes
0 answers

MongoDB complex object versioning with Spring Boot

I'm trying to identify the best way to do mongodb object versioning. Based on the mongodb document versioning pattern, storing revisions in a history collection and having current version in main collection is recommended. According to that, each…
Kavindu Vindika
  • 2,449
  • 1
  • 13
  • 20
2
votes
1 answer

JaversException ENTITY_INSTANCE_WITH_NULL_ID for ignored id

Using javers 5.11.2 I get the following exception although the id is set to be ignored. Why is that? JaversException ENTITY_INSTANCE_WITH_NULL_ID: Found Entity instance 'my.package.javers.Leaf' with null Id-property 'id' Update: I learned…
Kavau
  • 519
  • 2
  • 7
  • 21
2
votes
1 answer

How to use Javers in reactive spring?

I want to use Javers for entities changes auditing in my reactive spring project with MongoDB. Can anyone help me with configurations please ?
2
votes
1 answer

Javers - Custom comparator for generic list - GENERIC_TYPE_NOT_PARAMETRIZED

I would like to compare a generic list which is defined in abstract class in object which inherits from that class, the thing is that I would like to implement custom comparator for that list's objects. here is code of the abstract class: class A
2
votes
0 answers

Javers @diffIgnore at class/property level not working with inheritance

We are building an application that needs to store differences made on existing opbjects. Afterwards we will store these changes to the database. However for some reason the @diffIgnore option is not working on our User.class. Every object extends…
MrA
  • 85
  • 1
  • 1
  • 9
2
votes
0 answers

org.javers.common.exception.JaversException: NOT_INSTANCE_OF: Can't create InstanceId for EntityType

I got this error when using Javers in Jhipster. I used the configuration for Spring boot: javers: mappingStyle: FIELD algorithm: SIMPLE commitIdGenerator: synchronized_sequence prettyPrint: true typeSafeValues: false newObjectSnapshot:…
Hung Bang Quan
  • 151
  • 2
  • 9
2
votes
1 answer

How to disable Javers from creating Tables when starting application

I am trying to work on an application which fails to start up due to Javers table creation errors(Issue is due to application DB problems). Is there a way I can prevent javers from creating tables during application start up (tables such as…
Ann
  • 23
  • 5
2
votes
2 answers

How to clean up snapshots and commits after a period of time in Javers?

I'm setting a auditing system for our application. The tables grow very fast. So I wonder, if there is a mechanism to clean up snapshots and commits after a period of time, for example all snapshots older than 30 days. If it is not possible, could…
2
votes
1 answer

Duplicate class in modules error when I try to use Javers in Android app

When I added the dependency for Javers in my gradle file by adding implementation 'org.javers:javers-core:5.6.0' https://javers.org/documentation/getting-started/ I got this error message. How can I fix the issue? Duplicate class …
Kamyar Miremadi
  • 169
  • 2
  • 7
2
votes
1 answer

Can Javers compare two Sets containing valueObjects identifying them with the equals/hashcode methods to detect changes?

Can Javers compare two sets to identify the changes happened in the objects in the new set for each corresponding object in the old set? Does the implementation rely on the equals method of the value object class? I implemented equals method for my…
ndsurendra
  • 413
  • 1
  • 5
  • 15
2
votes
0 answers

Issue In Infinity is not a valid double value as per JSON specification with float & Double object

I am getting below error when object have value like Nan & Infinite java.lang.IllegalArgumentException: Infinity is not a valid double value as per JSON specification. To override this behavior, use GsonBuilder.serializeSpecialFloatingPointValues()…
user3040299
  • 51
  • 1
  • 5
2
votes
2 answers

Why do I have to disable Javers' schema management in order to initialize my application?

In my Spring-Boot project when: javers.sqlSchemaManagementEnabled=true The Javers tables are created on the first execution (when the tables do not exist on the database) and the code runs as expected, however from the second execution onwards an…
Rodolfo
  • 149
  • 1
  • 9
2
votes
1 answer

javers MANAGED_CLASS_MAPPING_ERROR

I did a refactoring and now my class B is not an Entity anymore but a Value. If I try viewing the diff of an already audited Entity A, that contains a list of B's I am getting this exception: JaversException MANAGED_CLASS_MAPPING_ERROR: given…
2
votes
2 answers

How to disable Javers for integration tests?

I am using Javers 3.11.2 with Spring Boot 1.5.17. When I am trying to run integration tests on an embedded database I still see that Javers tables are getting created each time. Is there a way I can disable Javers during these tests so that these…
Charlie
  • 3,113
  • 3
  • 38
  • 60
1
2
3
25 26