Questions tagged [javers]
JaVers is a lightweight java library for auditing changes in your data.
372
questions
1
vote
0
answers
23
views
Modeling legacy table with Hibernate and auditing with Javers
I'm trying to model with hibernate The following legacy table:
CREATE TABLE `child` (
`parent_id` int(10) unsigned NOT NULL,
`child_name` varchar(255) NOT NULL,
`created_at` timestamp NULL ...
0
votes
0
answers
14
views
how to make choice between javers and java-object-diff [closed]
I found two java object diff framework https://github.com/SQiShER/java-object-diff and and https://github.com/javers/javers
. I want to get the diff between two complex thrift(Facebook) objects, how ...
-1
votes
0
answers
19
views
How to change a column type in the tables that are generated by the Javers framework if using MySql and spring boot?
I'm using MySql and javers-spring-jpa 5.2.0 in my spring boot application. Javers generates the table jv_snapshot. The table contains a column "state" of type TEXT. However, I'm reaching the ...
0
votes
0
answers
16
views
Javers fails after changing the primary key from long to UUID
I have just changed the primary key of an entity from long to uuid.
Now, when I try to change an object, javers fails with an Exception.
java.lang.IllegalArgumentException: Invalid UUID string: 7
...
0
votes
0
answers
12
views
How to cleanup JaVers in Spring Boot Tests
I am running javers in a spring-boot application with mongodb. Autoconfiguration works fine and it is really easy to use.
I am now trying to clean the javers collection on test setups like this:
...
0
votes
0
answers
17
views
Javers JPA and DTO mapping
I am new to Javers and so far I like it. I have played with Envers but think I like Javers better. In our application we are mapping Entities to DTOs at the service layer.
Javers have a method ...
0
votes
0
answers
8
views
Can Javers prettyPrint method output be localized? (Eg. pt_BR)
a short question:
Can Javers prettyPrint method output be localized? For example, using locales like pt_BR, or ES, etc?
As I can see googling or looking at code, don't found anything related to.
So, ...
0
votes
0
answers
12
views
Javers JaversException VALUE_OBJECT_IS_NOT_SUPPORTED_AS_MAP_KEY
Exception:
found ValueObject on KEY position in Map property 'MapType{ baseType: 'java.util.Map<javax.xml.namespace.QName, java.lang.String>' }'. Please change the key class mapping to Value or ...
0
votes
0
answers
30
views
When I try to get changes from JaVers with type - TERMINAL, I get only changes with type ObjectRemoved
I am using JaVers Spring Boot starter. (org.javers:javers-spring-boot-starter-sql:6.6.5)
When i try to get changed fields after delete:
@Autowired
SystemUserRepository systemUserRepository;
...
0
votes
0
answers
18
views
JaVerse Shadows are empty after removing an object
When I delete an object, I can no longer display shadows. The child objects and Strings are empty. The initial commit is displayed correctly but the intermediate steps are not.
I use javers-spring-...
0
votes
1
answer
17
views
Javers global id fragility
Ran into what I believe is a bug or at least a shortcoming with Javers.
We have two applications that use a shared database.
The first application is responsible for creating the database entities.
...
0
votes
1
answer
35
views
Javers comparison takes long time
We are comparing 2 objects using javers in our project. But in a delete secanrio it is taking lot of time which leads to application time out.
Is it possible to bypass the inner objects from ...
0
votes
0
answers
20
views
Javers saves commitDate and commitDateInstant as String. How to set them as LocalDateTime?
I am storing the entity audit log to mongodb using javers. Each time I make a commit to mongodb, Javers saves the timestamp as String. But I want to save it as LocalDateTime Object. Is there any way ...
0
votes
1
answer
33
views
Getting a Commit returned after a commit with no changes
If I commit the same entity twice, the first time with changes and the second time without any changes, I receive a Commit with a CommitId both times. The first one holds the changes, the second has a ...
0
votes
0
answers
55
views
Integrate Javers auto audit to JPA/Hibernate entitymanager without spring framework (Vanilla Javers)
I am currently working on a Java project with a REST service to store data which run with jarkarta, hibernate on a wildfly application server with a mysql db. To store the data I prepare a resource ...
0
votes
0
answers
32
views
Javer not storing jv_head_id and jv_snapshot table and also not printing anything in the log
I am trying out a POC on Javer + Spring Boot Mongo DB stack. Currently , I can see in the log that Javer has successfully started but than it prints nothing in the log nor it saves the DIFF tables in ...
-1
votes
1
answer
42
views
How to implement different algorithm for List in javers?
Suppose this is my entity class.
class Person{
List<Asset> assetList;
}
Scenario 1:
List<Asset> | List<Asset>
Asset1 | Asset1
Asset2 | Asset3
Asset3 |
Scenario 2:
...
1
vote
1
answer
68
views
Javers Mongo Multitenancy Issue
My Spring boot application has a multitenancy architecture and I'm using Javers to audit some data models.
The issue I'm facing is that Javers is not able to resolve the database based on my ...
0
votes
1
answer
150
views
How do I disable logging from javers?
Currently working in a large spring-boot application, it would be preferred to disable logging if possible to reduce noise.
sample of the logs
NFO org.javers.core.JaversBuilder mappingStyle: FIELD
NFO ...
0
votes
1
answer
59
views
How to keep Javers cache consistent in distributed environment?
When using Javers and Spring Boot applications (with MongoDB) in distributed environments, I get incorrect auditing snapshots.
How to recreate (assuming we have 2 servers) -
Update an existing ...
0
votes
1
answer
78
views
Javers and Transactions
I have small spring application
Some repository with - @JaversSpringDataAuditable
All work fine
https://javers.org/documentation/spring-integration/
From now, all objects passed to save() and delete() ...
0
votes
1
answer
93
views
Javers - PROPERTY_NOT_FOUND: Property 'id' not found in class 'EntityName$HibernateProxy$Azi44O4n'
I am trying to audit my entities using Javers (6.5.2). When I am doing .save() or .saveAndFlush() operation in Spring Boot (2.5.5), I randomly get the following exception:
org.javers.common.exception....
0
votes
0
answers
82
views
Javers Log - using fake InMemoryRepository
Why I am always getting an Info log while using Javers in Spring Boot.
Log
"using fake InMemoryRepository, register actual Repository implementation via JaversBuilder.registerJaversRepository()&...
0
votes
1
answer
31
views
Unable to serialize org.javers.core.diff.changetype.ValueChange object by spring-beans while retrieving ValueChange object from mongoDB
I am storing change object in mongoDB database to, it is getting saved can see in db, but while retrieving back from mongoDB collection in application, getting below error:
org.springframework.data....
0
votes
0
answers
106
views
Javers Mongo collections are not initialized on startup
I am using Javers 6.5.3 with MongoDB with transactions. When I am trying to commit changes in Javers I have got an error:
Cannot create namespace jv_snapshots in multi-document transaction
To fix it I ...
0
votes
1
answer
71
views
Can't find javers integration for quarkus projects
I am trying to integrate JaVers for auditing into quarkus but there are almost no resources.
Is this even supported?
Can anybody maybe point me to resources?
1
vote
1
answer
34
views
What is causing a 3rd party domain object to throw an exception when saving in Javers/Spring Boot?
I am using javers 6.2.5 and Spring Boot 2.5.2. I am getting an IllegalArgumentException saying "argument should not be null". It is being thrown in GlobalIdFactory.createId(). I have figured ...
0
votes
1
answer
33
views
Disable javers audit in application.properties
We are using Javers in our spring boot application and have several application.properties profiles, e.g. for different environments/local testing. In some profiles we would like to disable javers or ...
0
votes
1
answer
86
views
How get managed type from type name in Javers
I need to map TpyeName to Class ?
JaversCore#getTypeMapping implement such function but is not public (JaversCore is not public).
0
votes
1
answer
76
views
Javers not recognizing insert as an initial change
Working on a SpringBoot application using MongoDB as a persistent store.
Using spring data and MongoRepository to access MongoDB.
Using Javers to provide auditting.
If I use mongoRepository.insert(...
1
vote
1
answer
170
views
Javers Diff and Spring
I have simple Spring Boot 2.5.7 JPA application and want audit diff between some entities
So my pom.xml include this dependency
<dependency>
<groupId>org.javers</groupId>
<...
0
votes
1
answer
29
views
Does JaVers work with GraalVM native images?
GraalVM compiles Java programs into native executables. Certain Java features, such as reflection, are not available or limited there. Since JaVers uses reflection: Does JaVers fully work in a GraalVM ...
0
votes
1
answer
78
views
Is it possible to change the javers history?
I am working on a rest backend using spring boot/jpa. I also use javers to audit my JpaRespositories.
I am not entirely sure, if javers is intended for this purpose, but in addition to auditing my jpa ...
0
votes
0
answers
58
views
Java8 : Javers Object Comparison - How to not list subelements of newly created objects?
I have two Java Objects and I want to compare them with each other. I have registered the entities and if I add one Class (its a subclass in the big, complex class), I want this one to be displayed ...
1
vote
0
answers
72
views
Javers with simple diff returning ENTITY_INSTANCE_WITH_NULL_ID with an abstract entity
**Exception is happening when trying to find simple diff but its not throwing exception if I change it to MappingStyle.BEAN **
**.withMappingStyle(MappingStyle.BEAN)**
JaversException ...
0
votes
1
answer
163
views
MongoDB document version update issue with JaVers
I was using Javers for mongoDB document versioning with springboot. It provides essential functionalities for versioning such as separate history collection called jv_snapshots, changed field list in ...
2
votes
0
answers
277
views
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 ...
0
votes
0
answers
34
views
javers 6.2.2 with oracle is failing with SQL_EXCEPTION: ORA-01795
Getting exception when retrieving all audits(more than 10k audits) from the DB using below code
List changesGroupByCommit = javers.findChanges(QueryBuilder.anyDomainObject().limit(12000).build())....
0
votes
0
answers
315
views
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 with Javers @JaversSpringDataAuditable
@JaversSpringDataAuditable works fine with Spring Data Repository. But when I use this
@Lock(LockModeType.PESSIMISTIC_WRITE) @QueryHints({@QueryHint(name = "javax.persistence.lock.timeout", ...
1
vote
0
answers
147
views
JaVers configuration for spring data JDBC
I am trying to use JaVers with Spring Boot project with Spring Data JDBC included.
So, default JaversSqlAutoConfiguration.java do not fit which is for jpa hibernate.
Could you please help to identify ...
0
votes
1
answer
189
views
Retrieve only left, right, propertyName from the javers Change class
I am using the following code to retreive the changes made to a version in my API response
List<Change> versionChanges = javers.findChanges(jqlQuery.build()).groupByCommit()get(0).get()
It gave ...
0
votes
1
answer
36
views
How to migrate from one backing store to another
I need to figure out a way to migrate our Javers audit data from DocumentDB to another independent repository than our domain data.
Does javers currently have any mechanism we can use to take our ...
0
votes
1
answer
97
views
Javers Diff - Bug in JsonConverter - InitialValueChange
I use JaVers 6.1.0 and want to create a diff of two objects with 'compare' and convert this to a JSON.
Diff diff = javers.compare(fooOldRevision, fooCurrent);
return javers.getJsonConverter().toJson(...
0
votes
1
answer
61
views
Can I store enum as ordinal instead of string in JaVers?
I use JaVers 6.10.0 in Spring Boot to store versions of this class:
class AUserBusinessData {
@Id
@PropertyName("i")
private Long id;
@PropertyName("s")
JHAEUserStatus ...
0
votes
1
answer
65
views
what is the Id generation order in Javers for EntityDefinition with Multiple Id Properties
I am using Javers with EntityDefinition like
EntityDefinitionBuilder.entityDefinition(MyObject.class).withIdPropertyNames("attr1","attr2","attr3").build()
I am getting ...
0
votes
1
answer
71
views
How to build a object back along with it's entire nesting using just the snapshots available in javers?
I have a deeply nested object and I am changing one of properties inside the nesting, when I audit it with Javers it fragments the object and stores it in various snapshots. Now I want to build it ...
1
vote
0
answers
87
views
How do I use Javers to audit with a custom update method?
I would like to use Javers to audit queries other than save() and delete().
Here is my repo:
@Repository
@JaversSpringDataAuditable
public interface SomeRepo extends JpaRepository<SomeEntity, Long&...
0
votes
1
answer
213
views
How to use JaVers with Map?
I have two maps that can be modified by different authors. In this particular use case, I have a limitation where I shouldn't use POJOs or Domain objects, only a Maps.
@Test
fun `Shadow from a ...
0
votes
1
answer
45
views
What does minorId and majorId in commitId signify?
Can someone explain the difference between majorId and minorId in the CommitId object ?
I noticed that all the entries in jv_snapshots contain only majorId (as returned by the changes api).
Would ...