JaVers needs funding to sustain. You can sponsor JaVers development via GitHub Sponsors or Open Collective.

Release notes


released on 2024-05-24

  • 1377 Added compatibility with Gson 2.11.0, Gson version bumped to 2.11.0.


released on 2024-04-01

  • 1369 Fixed issue with wrong mapping of SortedMap on Java 21.


released on 2024-03-14

  • 1039 Performance optimizations in MongoRepository when finding changes by instanceId with child ValueObjects.


released on 2024-03-10

  • 1301 Added option to use standard hashCode() to identify Value Objects inside Sets.


    Javers javers = JaversBuilder.javers()

    See also Case1301ObjectHasherSpec.groovy


released on 2024-02-28

  • 1355 Source Snapshots are now available in Shadow objects.


released on 2023-12-31

  • 1350 Fixed InaccessibleObjectException which was thrown while comparing objects with the java.nio.file.Path type.


released on 2023-10-19

  • 1341 Fixed IllegalAccessException on Java 16 for classes: YearMonth, MonthDay, and OffsetTime.


released on 2023-10-13

  • 1279 The deprecated, implicit JVM compiler -debug flag removed.


released on 2023-10-12

  • 1327 Fixed bug in the resolving of ShallowProperties registered via javers().registerEntity().
  • 1206 Fixed NPE when comparing arrays with nulls.


released on 2023-09-16

  • 1324 Fix in the javers-spring-boot-starter-mongo config that prevents the Spring Boot exception: Field mongoProperties in org.javers.spring.boot.mongo.JaversMongoAutoConfiguration required a bean of type ‘org.springframework.boot.autoconfigure.mongo.MongoProperties’ that could not be found.


released on 2023-08-09

  • 1314 Fixed MANAGED_CLASS_MAPPING_ERROR when @ShallowReference was used on a Set property.


released on 2023-07-28

  • 1269 Fixed java.lang.IllegalArgumentException: argument should not be null when comparing objects with Map entries with null values.


released on 2023-07-17

  • 1208 Fixed WriteConflict when using transactional MongoRepository. Writing to the head_id collection is now skipped when RANDOM commitId generator is selected. The fix requires enabling the RANDOM CommitId generator. RANDOM CommitId generator should always be used when multiple instances of Javers write to the same database.

      commitIdGenerator: random


released on 2023-07-16

  • 1306 Added posibility to configure properties as shallow references via EntityDefinitionBuilder. Usage:
    Javers javers = javers().registerEntity(


released on 2023-07-12

  • 1300 Fixed issue with connecting to Mongo on Spring Boot 3.1.0.
  • Dependencies aligned with Spring Boot 3.1.0:
springVersion           =6.0.3
springBootVersion       =3.1.0
springDataMongoVersion  =4.0.0
springSecurityVersion   =6.0.1
mongoDbDriverVersion    =4.9.1
hibernateVersion        =6.1.6.Final
guavaVersion            =32.0.1-jre
gsonVersion             =2.10
classgraphVersion       =4.8.154


released on 2023-07-11

  • 1287 Fixed bug in interpreting the @DiffIgnoreProperties annotation.


released on 2023-07-09

  • 1213 Performance optimization in SQL repository. The number of calls to GlobalIdRepository.findGlobalIdPk() is significantly reduced. Thanks to that – less SQL queries are executed by Javers.


released on 2023-06-18

  • 1298 Guava version bump as Guava < 32.0 is marked as vulnerable to CVE-2023-2976.


released on 2023-04-24

1238 Added compatibility with Spring Boot 3.0.

Time to say goodbye to our beloved Java 8.

Spring Boot 3.0 has moved forward and is no longer compatible with Java 8. Now, Spring Boot 3.0 requires Java 17 — so we all need to catch up.

Since Javers 7.0, all Javers Spring integration modules require Java 17:

  • javers-spring
  • javers-spring-jpa
  • javers-spring-mongo
  • javers-spring-boot-starter-mongo
  • javers-spring-boot-starter-sql

Javers core and Javers persistence modules require Java 11:

  • javers-core
  • javers-persistence-mongo
  • javers-persistence-sql:

The last version of Javers that is compatible with Java 8 and Spring Boot 2 is 6.14.0.
We strongly recommend to upgrade to Javers 7.x. You can still use Javers 6.14.0, but the 6.x line is frozen and no longer supported.

Migration from Javers 6.x to Javers 7.x

  • No actions required from the Javer’s perspective.
  • A friendly reminder if you are upgrading to Java 17 — the built-in javax.persistence package disappeared and should be replaced with the jakarta.persistence package from jakarta.persistence:jakarta.persistence-api:3.0.0.


released on 2023-03-31

  • 1230 Fixed bug in JaversBuilder. Scanned classes were ignoring custom value comparators for their properties.


released on 2023-03-22

  • 1252 The internal GSON config is tuned to better map numeric values with Object type.


released on 2023-03-17


released on 2023-02-17

  • 1254 Added possibility to disable the schema management in Mongo Repository. Usage:
          MongoRepository mongoRepository = new MongoRepository(getMongoDb(),

    See also MongoE2EWithSchemaEnabledTest.groovy

  • 1261 Added possibility to set Mongo Repository parameters: snapshotCollectionName, headCollectionName, and schemaManagementEnabled via Spring boot configuration.

    Example usage in `application.yml:

        snapshotCollectionName: "jv_custom_snapshots"
        headCollectionName: "jv_custom_head_id"
        schemaManagementEnabled: false


released on 2023-02-03

  • RC for 7.0.0


released on 2023-02-01

  • 1254 Added possibility to customize the HEAD collection name in MongoRepository.


          MongoRepository mongoRepository = new MongoRepository(getMongoDb(),

    See also MongoE2EWithCustomHeadCollectionNameTest.groovy


released on 2023-01-02

  • Dependencies aligned with Spring Boot 2.7.7:
springVersion           =5.3.24
springBootVersion       =2.7.7
springDataMongoVersion  =3.4.6
springSecurityVersion   =5.7.6
mongoDbDriverVersion    =4.6.1
hibernateVersion        =5.6.14.Final
guavaVersion            =31.0-jre
gsonVersion             =2.9.0
classgraphVersion       =4.8.128
  • In tests, flapdoodle Embedded MongoDB is replaced with testcontainers dockerized MongoDB.


released on 2022-12-24

  • 1168 Fixed bug related to H2 version 2.0.204.


released on 2022-10-26

  • 1223 Implemented partial and case-insensitive search for Author and Commit Properties.


released on 2022-10-02

  • 1222 Fixed validation in QueryParamsBuilder.


released on 2022-09-11

  • 1216 Added a new switch in the diff algorithm: usePrimitiveDefaults.
    This switch affects how initial and terminal Value Changes are calculated in the situation when a primitive property with a default value appears (or disappears) in an object graph. See JaversBuilder.withUsePrimitiveDefaults().


released on 2022-04-18

  • 1200 Fixed InaccessibleObjectException on Java 16 for TimeZone, ZoneRules, and ZoneId.


released on 2022-04-10

  • 1192 Fixed important performance issue for MongoDB. Indexes on the Snapshots collection were not created by the Javers Spring Boot starter for MongoDB.
    This bug was introduced in 6.5.1. It’s enough to upgrade to the latest version and the indexes will be automatically created.


released on 2022-03-06

  • 1188 Fixed exception NoClassDefFoundError LinkedHashTreeMap
    when Javers was used with Gson 2.9.0.


released on 2022-01-30

  • 1180 Fixed NPE in GlobalIdTypeAdapter.parseValueObjectId().


released on 2022-01-26

  • 1177 Added possibility to register JaversBuilderPlugins in Javers’ Spring Boot Starters. Thanks to that, you can easily call any JaversBuilder method and for example, register a CustomValueComparator:

    JaversBuilderPlugin javersBuilderPlugin() {
        return builder -> builder
            .registerValue(BigDecimal.class, new CustomBigDecimalComparator(2));

    See the full test case in this PR: https://github.com/javers/javers/pull/1177/files.


released on 2022-01-23


released on 2021-12-04

  • 1157 Fixed bug when comparing nested sets of Value Objects.


released on 2021-11-23

  • 1160 Fixed IllegalStateException when calling Changes.groupByCommit() created by Javers.compare().

  • 1075 Added a new feature which allows CustomValueComparators to handle nulls:

public interface CustomValueComparator<T> {

   * This flag is used to indicate to Javers whether
   * a comparator implementation wants to handle nulls.
   * By default, the flag is false and Javers
   * checks if both values are non-null before calling a comparator.
   * If any of given values is null &mdash; Javers compares them using the
   * standard Java logic:
   *   * null == null
   *   * null != non-null
   * If the flag is true &mdash; Javers skips that logic and
   * allows a comparator to handle nulls on its own.
   * In that case, a comparator holds responsibility for null-safety.
   * @see NullAsBlankStringComparator
  default boolean handlesNulls() {
    return false;


released on 2021-11-14

  • 1137 Important new feature in MongoRepository. Added support for MongoDB multi-document ACID transactions introduced in MongoDB 4.0 and implemented in Spring Data MongoDB 2.1.

    See Spring Boot integration, MongoDB transactions support.

    Minor breaking change: the TransactionalJaversBuilder class is renamed to TransactionalJpaJaversBuilder.

  • 1121 Fixed IllegalArgumentException when querying for object with solely TERMINAL snapshot.

  • Dependencies aligned with Spring Boot 2.5.5:

springVersion           =5.3.10
springBootVersion       =2.5.5
springDataMongoVersion  =3.2.5
springSecurityVersion   =5.5.2
mongoDbDriverVersion    =4.2.3
hibernateVersion        =5.4.32.Final
guavaVersion            =31.0-jre
gsonVersion             =2.8.8
classgraphVersion       =4.8.128


released on 2021-10-18

  • 912 Added support for querying on a commit property with multiple values using “IN” semantics. Usage:
def "should query for entity with commit properties IN list"() {
  javers.commit('author', new SnapshotEntity(id: 1, intProperty: 2), [name: 'Steve'])
  javers.commit('author', new SnapshotEntity(id: 1, intProperty: 3), [name: 'John'])

  def snapshots = javers.findSnapshots(byInstanceId(1, SnapshotEntity)
          .withCommitPropertyIn('name', ['Steve', 'Bill'])

  snapshots.size() == 1
  snapshots[0].getPropertyValue("intProperty") == 2


released on 2021-10-16

  • 1094 Provided access to old and new Collection, Array, and Map values within CollectionChange, ArrayChange, and MapChange types. For example:
def "should provide old and new Collection in Changes loaded from Repository" () {
    def s = new SnapshotEntity(id:1, listOfIntegers : [1,2])
    javers.commit('author', s)
    s.listOfIntegers = [2,4]
    javers.commit('author', s)

    def changes = javers.findChanges(byInstanceId(1, SnapshotEntity).build())

    ListChange change = changes[0]
    change.left instanceof List
    change.left == [1,2]
    change.right instanceof List
    change.right == [2,4]


released on 2021-10-09

  • 1099 Fixed NullPointerException when comparing complex Map types with Collections of objects, like:
    class A {
          Map<String, List<Person>> map

Since this version, these structures are fully supported.


released on 2021-09-05

  • 1134 Fixed compatibility issue with the latest Hibernate version 5.6.0.beta1.

  • 1130 Fixed bug in Change.getAffectedObject(). It returns now the right (new) version of an object.


released on 2021-08-24

  • 1096 added withCommitPropertyLike() method to query for commit properties with LIKE operator.
def "should query for commit property containing partial text - #value"() {
    javers.commit('author', new SnapshotEntity(),
            [name:'John Marcus Doe', x:'y'])

    def snapshots = javers
            .findSnapshots(byInstanceId(1, SnapshotEntity)

    snapshots.size() == 1

    value << ["John","Doe","Marcus"]


released on 2021-07-04

  • Another fix for 1091, solved problem with java.util.Locale on Java 16.


released on 2021-06-19

  • 1108 Added possibility to call commitShallowDelete() for objects which not exists in JaversRepository. Exception CANT_DELETE_OBJECT_NOT_FOUND is no longer thrown.


released on 2021-06-13

  • 1091 Added support for Java 16. Fixed InaccessibleObjectException when serializing core Java types (like Optional or LocalDate).


released on 2021-05-23

  • 1092 Fixed bug when deserializing Diff from JSON: MALFORMED_CHANGE_TYPE_FIELD: no such Change type - InitialChange.


released on 2021-04-25

  • 1080 New annotation for auto-audit aspect — @JaversAuditableConditionalDelete. It allows to call Javers.commitShallowDelete() on objects returned by method, for example:
List<DummyEntity> deleteByName(String name) {


DummyEntity deleteById(String id) {
  • 1055 Fixed MalformedJsonException on Oracle.


released on 2021-04-07

1082 Changes in Spring dependencies management.
In order to lower the risk of versions clash between dependencies required by Javers’ and dependencies required by an application (you), all Spring dependencies in Javers’ artifacts are marked as optional.

It means that Spring and Spring Boot versions are now managed only by an application:

javers-spring-boot-starter-mongo dependencies:

    optional "org.springframework.boot:spring-boot-starter-data-mongodb:$springBootVersion"
    optional "org.springframework.boot:spring-boot-configuration-processor:$springBootVersion"

javers-spring-boot-starter-sql dependencies:

    optional "org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion"
    optional "org.springframework.boot:spring-boot-configuration-processor:$springBootVersion"


released on 2021-04-05

Javers 6.0 comes with the important upgrade of the diff algorithm:

We have redesigned the Javers’ core algorithm — the object diff. Now, it gives better, more meaningful, and consistent results in both Javers.compare() and Javers.findChanges().

The new approach improves the diff results for New and Removed Objects thanks to the explicitly modeled and unified concepts of Initial and Terminal Changes.

Now, Javers generates additional set of Initial Changes for each property of a New Object to capture its state. Internally, Javers calculates Initial Changes by comparing a virtual, totally empty object with a real New Object.

Symmetrically, additional set of Terminal Changes is generated for each property of a Removed Object.

For example, consider the case when a Value Object is added:

def diff = javers.compare(
    new Employee(id: "1", address: null),
    new Employee(id: "1", address: new Address(street: "x", city:"Paris"))

println diff.prettyPrint()

Javers 5.x calculates a diff without information about the state of the new Address:

* new object: org.javers.core.Sample$Employee/1#address
* changes on org.javers.core.Sample$Employee/1 :
  - 'address' reference changed from '' to '...Sample$Employee/1#address'

Javers 6.x calculates the essentially better diff:

* changes on org.javers.core.NewObjectChangesE2ETest$Employee/1 :
  - 'address.city' = 'Paris'
  - 'address.street' = 'x'

So, in Javers 6.0, Value Objects (like Address) are treated more like containers for nested properties owned by Entities and less like objects with their own indentity and type.

Calculating Initial and Terminal Changes is enabled by default. You can disable it using JaversBuilder.withTerminalChanges() and JaversBuilder.withInitialChanges(),

or in application.yml, if you are using Javers Spring Boot:

   initialChanges: false
   terminalChanges: false

See the Initial Changes example.
See JaversBuilder.withInitialChanges() javadoc.

All features and improvements added in Javers 6.0

  • 822 Fixed problem with paging in Shadow queries.
    Now, QueryBuilder.skip() and QueryBuilder,limit() works intuitively in both Javers.findShadows() and Javers.findShadowsAndStream().
    Both query methods are unified and generate the same results (now, findShadows() is only the facade for findShadowsAndStream()).
    See the Limit example. and QueryBuilder.limit() javadoc.

  • More pretty and concise Changes.prettyPrint(), see the changelog example.

  • The new Changes.devPrint() method for printing Changes in a technical style.

  • New or removed Value Objects no longer generate NewObject, ObjectRemoved, nor ReferenceChange. These changes were considered rather useless. Instead, a state of a new or removed Value Object is captured by Initial and Terminal Changes.

  • New or removed Entities always generate NewObject/ObjectRemoved changes (it can’t be disabled).

  • The javers.newObjectSnapshot flag is renamed to javers.initialChanges and it’s enabled by default.

  • The javers.terminalChanges flag is added, and it’s enabled by default.

  • In Javers.findChanges(), a NewObject change is always generated for each initial Snapshot, it can’t be disabled by the javers.initialChanges flag.

  • The QueryBuilder.withNewObjectChanges() method is deprecated and has no effect.

  • 911 Minor bug fixed, this WARNING is no longer shown: An illegal reflective access operation has occurred.

  • 1077 Added support for Composite Id with the IdClass annotation.


released on 2021-03-12


released on 2020-11-14

  • Dependencies aligned with Spring Boot 2.4.0:
springVersion           =5.3.1
springBootVersion       =2.4.0
springDataMongoVersion  =3.1.1
springSecurityVersion   =5.3.1.RELEASE
mongoDbDriverVersion    =4.1.1
hibernateVersion        =5.4.23.Final
guavaVersion            =28.2-jre
gsonVersion             =2.8.6
classgraphVersion       =4.8.78
jodaVersion             =2.10.5
polyjdbcVersion         =0.7.6
aspectjweaverVersion    =1.9.6
slf4jApiVersion         =1.7.30
  • 1034 Fixed compatibility issues (ClassCastException in JpaHibernateConnectionProvider) with the latest Hibernate.


released on 2020-10-26

  • 1030 Fixed class cast exception.

  • 998 Better javadoc for QueryBuilder.limit(), Javers.findShadows(), and Javers.findShadowsAndStream().

5.13.0 Hacktoberfest 2020 Edition

released on 2020-10-16

  • 1024 Added support for Groovy 3.0.

  • 919 Added multi-value filter for querying by changed property: QueryBuilder.withChangedPropertyIn(String... propertyNames).


released on 2020-09-27

  • 1019 Added filters in JQL to select snapshots crteated before/after given UTC timestamp: QueryBuilder.fromInstant() and QueryBuilder.toInstant().


released on 2020-08-31

  • 1014 Fixed issue with Shadows with boolean properties.


released on 2020-07-27

  • 940 New method in JaversBuilder to registering a strategy for dynamic marking classes as ignored.
    For example, you can define a custom rule to ignore classes by package name:
Javers javers = JaversBuilder.javers()
        .registerIgnoredClassesStrategy(c -> c.getName().startsWith("com.ignore.me"))


released on 2020-07-16

  • 941 Added configuration for customizing Javers’ table names in SQL repository.


  sqlGlobalIdTableName: custom_jv_global_id
  sqlCommitTableName: custom_jv_commit
  sqlSnapshotTableName: custom_jv_snapshot
  sqlCommitPropertyTableName: custom_jv_commit_property


released on 2020-07-02

  • Fixed bug 958 when querying by CommitId with minor number (like 1.01) on MongoDB.


released on 2020-07-04

  • Fixes for 996 and 692 — removed redundant Guava dependency.


released on 2020-07-04

  • 991 Api vs Implementation — mastering dependencies.


released on 2020-06-20

  • 988 Fixed: MissingProperty cannot be cast to class java.util.Map


released on 2020-06-15

** Important warning for Spring Boot MongoDB users!**

This version of Javers has all dependencies aligned with Spring Boot MongoDB 2.3.0 which has upgraded to MongoDB Java Drivers 4.x. Unfortunately, Mongo Drivers 4.x has a lot of problematic and braking changes, especially renaming com.mongodb.MongoClient to com.mongodb.client.MongoClient (see mongodb.github.io/mongo-java-driver/4.0/upgrading) .

If you have explicit dependency to org.mongodb:mongo-java-driver:3.x — remove it and rely on Mongo 4.x drivers provided by a Spring Boot MongoDB starter.

If you are using old Spring Boot version (2.1 or older) — you need to upgrade to Spring Boot 2.3.0, otherwise you will probably experience versions clash between your Spring Boot version, and the Spring Boot version imported by the Javers starter.

  • 982 Fixed issue with MongoClient on on Spring Boot 2.3.0.

Dependencies aligned with Spring Boot 2.3.0:

springVersion           =5.2.6.RELEASE
springBootVersion       =2.3.0.RELEASE
springDataMongoVersion  =3.0.0.RELEASE
springSecurityVersion   =5.3.1.RELEASE
mongoDbDriverVersion    =4.0.3
hibernateVersion        =5.4.12.Final
guavaVersion            =28.2-jre
gsonVersion             =2.8.6
classgraphVersion       =4.8.78
jodaVersion             =2.10.5
polyjdbcVersion         =0.7.6
aspectjweaverVersion    =1.9.5
slf4jApiVersion         =1.7.28


released on 2020-06-15

** Important for Spring Boot MongoDB users**

This is the last version of Javers compatible with Spring Boot MongoDB 2.1.x and 2.2.x

  • 981 Added @Arder(0) annotation to all Javers’ aspects. This change allows users to execute their own aspects before or after Javers’ aspects (by choosing positive ot negative order numbers).


released on 2020-05-26

  • 973 Fixed strange bug in Gradle build: index 9730 out of bounds for length 8192 caused probably by classgraph 4.8.66.


released on 2020-05-03

  • 962 Changes in dedicated Mongo database configuration in JaVers Spring Boot starter for MongoDB. Additional client’s properties (like SSL or timeouts) should now be provided using the new MongoClientSettings API (instead of deprecated MongoClientOptions API). For example:
public MongoClientSettings clientSettings() {
    return MongoClientSettings.builder()
            .applyToSslSettings(builder -> builder.enabled(true))
                builder -> builder.connectTimeout(500, TimeUnit.MILLISECONDS))


released on 2020-04-07

  • 948 Better support for properties with unknown types (with type tokens), like:
class Pair<L, R> {
        L left;
        R right;
  • All JaVers’ dependencies are bumped to the latest versions:
springVersion           =5.2.5.RELEASE
springBootVersion       =2.2.6.RELEASE
springDataMongoVersion  =2.2.6.RELEASE
springDataJPAVersion    =2.2.6.RELEASE
springSecurityVersion   =5.3.1.RELEASE
mongoDbDriverVersion    =3.11.2
hibernateVersion        =5.4.12.Final
guavaVersion            =28.2-jre
gsonVersion             =2.8.6
classgraphVersion       =4.8.66
jodaVersion             =2.10.5
polyjdbcVersion         =0.7.6
aspectjweaverVersion    =1.9.5
slf4jApiVersion         =1.7.28


released on 2020-03-31

  • 951 Dependencies management fix in javers-core. Guava and joda-time are now correctly marked as optional in pom.xml.


released on 2020-03-08

  • 915 Added experimental asynchronous audit aspect for non Spring Data repositories. The aspect asynchronously commits all arguments passed to methods annotated with @JaversAuditableAsync annotation by calling Javers.commitAsync(String, Object, Executor).


class DummyAuditedAsyncRepository {

    void save(DummyObject obj){
      //... omitted

Spring config:

 * Enables asynchronous auto-audit aspect for ordinary repositories.<br/>
 * Use {@link JaversAuditableAsync}
 * to mark repository methods that you want to audit.
public JaversAuditableAspectAsync javersAuditableAspectAsync() {
    return new JaversAuditableAspectAsync(javers(), authorProvider(), commitPropertiesProvider(), javersAsyncAuditExecutor());

public ExecutorService javersAsyncAuditExecutor() {
    ThreadFactory threadFactory = new ThreadFactoryBuilder()
    return Executors.newFixedThreadPool(2, threadFactory);

See the full test case.


released on 2020-02-26

  • 938 Fixed bug in custom TypeAdapters priorities.


released on 2020-02-07

  • 935 Fixed ClassCastException: MissingProperty cannot be cast to java.lang.Double
    when using CustomValueComparator.


released on 2020-01-18

  • 933 Extend Spring props to allow setting size or disabling the latest snapshots cache for MongoDB.
  snapshotsCacheSize: 100


released on 2019-12-13

  • 921 Added support for deleting by Id with the @JaversAuditableDelete aspect:
@JaversAuditableDelete(entity = DummyEntity)
void deleteById(String id) {    


released on 2019-12-06

  • 925 Fixed bug which caused CustomValueComparator not being invoked for ZonedDateTime.


released on 2019-11-10

  • 910 Fixed ConcurrentModificationException in MongoDB MapKeyDotReplacer.


released on 2019-11-04

  • 897 Added warning when @TypeName is used on a class without declaring its package name in packagesToScan. Improved javadocs for TypeName and JaversBuilder.withPackagesToScan().
07:12:58.253 [main] WARN  o.j.core.metamodel.type.UnknownType - Missing class definition with @TypeName 'Agreement', 
cant't properly deserialize its Snapshots from JaversRepository.
To fix this issue provide the fully-qualified package name of the class named 'Agreement' in the packagesToScan property.


released on 2019-11-02

  • 878 Added property to disabling Global Id cache in SQL repository when using JaVers Spring Boot starter:
  sqlGlobalIdCacheDisabled: true
  • 709 Added property to provide custom implementation of the ObjectAccessHook when using JaVers Spring Boot starter:
  objectAccessHook: com.example.MyObjectAccessHook
  • 886 Fixed bug causing JsonSyntaxException: Expected BEGIN_OBJECT but was STRING. The exception was thrown on attempt to read Shadows with a ShallowReference with EmbeddedId (a ShallowReference with an Id-property type mapped to Value Object).


released on 2019-10-23

  • 894 Better Shadows sorting. Using SYNCHRONIZED_SEQUENCE CommitId generator for distributed apps can cause duplicated CommitId. In this fix, Shadows sorting is unified to be based on CommitDateInstant for both CommitId generators.

  • Removed throwing CANT_SAVE_ALREADY_PERSISTED_COMMIT in SQL repository. It was thrown only in some scenarios when SYNCHRONIZED_SEQUENCE generator was used, not ensuring the full protections against duplicated CommitId.
    After this fix, duplicated CommitIds when using SYNCHRONIZED_SEQUENCE generator are considered as not harmful (although not elegant). To ensure unique CommitIds for distributed apps we recommend switching to RANDOM generator (when your app runs more than one Javers instance).


released on 2019-10-21

Custom comparators reinvented

Now, a CustomValueComparator has to implement the toString(T value) method, which is used instead of Object.hashCode() when Values are compared in hashing contexts. Thanks to that, Values with Custom comparators can be correctly compared anywhere, also when they are Set items, Map keys or fields in Value Objects inside Sets.

public interface CustomValueComparator<T> {
     boolean equals(T a, T b);
     String toString(T value);

Existing method for registering Custom Value comparators is deprecated and left only for backward compatibility. Please switch to the new method.

 * <b>Deprecated</b>, use {@link #registerValue(Class, CustomValueComparator)}.
 * <br/><br/>
 * Since this comparator is not aligned with {@link Object#hashCode()},
 * it calculates incorrect results when a given Value is used in hashing context
 * (when comparing Sets with Values or Maps with Values as keys).
 * @see CustomValueComparator
public <T> JaversBuilder registerValue(Class<T> valueClass, BiFunction<T, T, Boolean> equalsFunction) {
    Validate.argumentsAreNotNull(valueClass, equalsFunction);

    return registerValue(valueClass, new CustomValueComparator<T>() {
        public boolean equals(T a, T b) {
            return equalsFunction.apply(a,b);

        public String toString(@Nonnull T value) {
            return value.toString();

The same applies to CustomPropertyComparator, it also have to implement toString(T value) because it extends CustomValueComparator.

This is the breaking change, if you are using a CustomPropertyComparator you have add toString(T value) implementation.

public interface CustomPropertyComparator<T, C extends PropertyChange>
    extends CustomValueComparator<T> 
    Optional<C> compare(T left, T right, PropertyChangeMetadata metadata, Property property);

Since this version, we stop recommending CustomPropertyComparators and Custom Types. This warning is added to docs:

Custom Types are not easy to manage, use it as a last resort,<br/>
only for corner cases like comparing custom Collection types.</b>

In most cases, it's better to customize the Javers' diff algorithm using
much more simpler `CustomValueComparator`.

See updated documentation of Custom comparators.


released on 2019-10-03

  • 888 Fixed bug (introduced in 5.2.5) when comparing SortedSet and SortedMap.


released on 2019-09-28

  • 887 Fixed bug (introduced in 5.7.2) which was causing SQL_EXCEPTION ORA-00917: missing comma while inserting to jv_snapshot on Oracle.


released on 2019-09-25

  • Dependencies bumped to the latest versions:

    springVersion           =5.1.9.RELEASE
    springBootVersion       =2.1.8.RELEASE
    springDataMongoVersion  =2.1.10.RELEASE
    springDataJPAVersion    =2.1.10.RELEASE
    springSecurityVersion   =5.1.6.RELEASE
    mongoDbDriverVersion    =3.8.2
    hibernateVersion        =5.3.11.Final
    guavaVersion            =28.1-jre
    gsonVersion             =2.8.5
    classgraphVersion       =4.8.47
    jodaVersion             =2.9.7
    polyjdbcVersion         =0.7.6
    aspectjweaverVersion    =1.9.4
    slf4jApiVersion         =1.7.28


released on 2019-09-19

  • 832 Added possibility to use CustomPropertyComparator together with ListCompareAlgorithm.AS_SET. A custom equals() methods is used to compare two Lists without paying attention to ordering and duplicates. Warning! The list comparing algorithm would be slow in this case for large lists because it has n2 complexity.


released on 2019-09-11

  • 877 Fixed issue with the jv_snapshot table primary key sequence for clustered applications. The sequence allocation trick for the jv_snapshot table is discontinued. To maintain backward compatibility, since this version, numbers genereted by the jv_snapshot primary key sequence are multiplied by 100.


released on 2019-09-03

  • 870 Added possibility to provide object-specific properties via CommitPropertiesProvider. No-arg provide() is deprecated. These three methods are added:

      public interface CommitPropertiesProvider {
          default Map<String, String> provideForCommittedObject(Object domainObject) {
              return Collections.emptyMap();
          default Map<String, String> provideForDeletedObject(Object domainObject) {
              return provideForCommittedObject(domainObject);
          default Map<String, String> provideForDeleteById(Class<?> domainObjectClass, Object domainObjectId) {
              return Collections.emptyMap();


released on 2019-08-02

  • 864 All Spring dependencies are updated. This update is forced by security vulnerability issues in spring-security and spring-data-jpa.

  • 860 Fixed SNAPSHOT_STATE_VIOLATION exception when a getter was inherited both from a superclass and an interface.

  • 774 Added more descriptive message for SNAPSHOT_STATE_VIOLATION exception.


released on 2019-07-06

  • 826 Fixed bug in SQL JaversRepository when DB schema name was configured. The bug was causing: Error on PostgreSQL: relation "jv_commit" already exists.


released on 2019-07-01

  • 855 Fixed bug in RANDOM CommitIdGenerator.


released on 2019-06-13

  • 694 Added possibility in JaVers MongoDB starter to configure a dedicated Mongo database, which is used by Javers. See JaversRepository configuration.

  • 775 Fixed issue: Spring Boot stops when SQL Schema Manager can’t establish the connection.

  • 851 Fixed exception: java.lang.ClassCastException: class org.javers.core.metamodel.property.MissingProperty cannot be cast to class java.util.List.


released on 2019-05-23

  • 842 Fixed bug in query with CommitId on Oracle.


released on 2019-05-18

  • 839 Fixed NPE in OptionalType.items().


released on 2019-05-18

  • Breaking changes in CustomPropertyComparator and constructors of all PropertyChange subclasses. CustomPropertyComparator interface is changed from:

    public interface CustomPropertyComparator<T, C extends PropertyChange> {
        Optional<C> compare(T left, T right, GlobalId affectedId, Property property);


    public interface CustomPropertyComparator<T, C extends PropertyChange> {
        Optional<C> compare(T left, T right, PropertyChangeMetadata metadata, Property property);

    PropertyChange objects that are produced by comparators now accept PropertyChangeMetadata in constructors, for example:

    public class CustomBigDecimalComparator implements CustomPropertyComparator<BigDecimal, ValueChange> {
    public Optional<ValueChange> compare(BigDecimal left, BigDecimal right, PropertyChangeMetadata metadata, Property property)
        if (equals(left, right)){
            return Optional.empty();
        return Optional.of(new ValueChange(metadata, left, right));
  • 830 & 834 Important new feature in PropertyChange. It gained the new enum, which allows to distinguish between ordinary null values and the case when a property is added/removed after refactoring:

      * When two objects being compared have different classes,
      * they can have different sets of properties.
      * <br/>
      * When both objects have the same class, all changes have PROPERTY_VALUE_CHANGED type.
     public enum PropertyChangeType {
          * When a property of the right object is absent in the left object.
          * When a property of the left object is absent in the right object.
          * Regular value change &mdash; when a property is present in both objects.

    The new enum can be checked using these four new methods in PropertyChange:

    public abstract class PropertyChange extends Change {
        public PropertyChangeType getChangeType() {
            return changeType;
        public boolean isPropertyAdded() {
            return changeType == PropertyChangeType.PROPERTY_ADDED;
        public boolean isPropertyRemoved() {
            return changeType == PropertyChangeType.PROPERTY_REMOVED;
        public boolean isPropertyValueChanged() {
            return changeType == PropertyChangeType.PROPERTY_VALUE_CHANGED;
  • 837 Fixed bug in SQL JaversRepository for Oracle and MS SQL databases.


released on 2019-05-11

  • 625 Composite-Id is now available in JaVers. Multiple properties can be mapped with @Id, and the localId is constructed as a Map.
    class Person {
        @Id String name
        @Id String surname
        @Id LocalDate dob
        int data

    def "should support Composite Id assembled from Values"(){
        def first  = new Person(name: "mad", surname: "kaz", dob: LocalDate.of(2019,01,01), data: 1)
        def second = new Person(name: "mad", surname: "kaz", dob: LocalDate.of(2019,01,01), data: 2)

        javers.commit("author", first)
        javers.commit("author", second)
        def snapshot = javers.getLatestSnapshot(
                    name: "mad",
                    surname: "kaz",
                    dob: LocalDate.of(2019,01,01)

        snapshot.globalId.cdoId == "2019,1,1,mad,kaz"
        snapshot.getPropertyValue("name") == "mad"
        snapshot.getPropertyValue("surname") == "kaz"
        snapshot.getPropertyValue("dob") == LocalDate.of(2019,01,01)
        snapshot.getPropertyValue("data") == 2
        snapshot.changed == ["data"]


released on 2019-04-10

  • 820 Fixed NPE in Levenshtein distance diff algorithm.


released on 2019-04-08

  • 821 Added basic support for mapping Entity Id-property as ValueObject.


released on 2019-03-29

  • 815 Fixed UnsupportedOperationException thrown by Sets.xor() function.


released on 2019-03-26

  • 798 Fixed error when inferring Javers type of an Id-property as Value.


released on 2019-03-20

  • 810 Fixed issue when comparing Sets with nested Value Objects with @DiffIgnore.

  • 806 Fixed bug in schema management on MS SQL Server.


released on 2019-03-16

  • 799 Fixed NPE when passing nulls to javers.compare().


released on 2019-03-16

  • 528 Added support for @ShallowReference on Collections and Maps.


released on 2019-03-12

  • 801, 796 Fixed issues when querying for anyDomainObject on Oracle and MS SQL.


released on 2019-03-10

  • 795 Fixed issue when comparing Sets with nested Value Objects.


released on 2019-02-26

  • 788 Added experimental support for Amazon DocumentDB, a document database compatible with MongoDB.
    If you are using our MongoDB Starter, enable DocumentDB flavour in your application.yml:
  documentDbCompatibilityEnabled: true


released on 2019-02-23

  • 789 Fixed “error calling Constructor for CustomType” when CustomPropertyComparator is registered for Value’s parent class.


released on 2019-02-16

  • 751 New aspect annotation @JaversAuditableDelete for triggering commitShallowDelete() with each method argument.

  • 784 Fixed bug in handling SortedSet.

  • 753 Fixed MANAGED_CLASS_MAPPING_ERROR after refactoring Entity type to Value type.

  • 769 Fixed NPE in CustomBigDecimalComparator.

  • 782 Fixes NPE after upgrading Javers to 5.1. NPE was thrown when committing entities created prior to 5.1.


released on 2019-01-25

  • 777 Fixed bug in persisting commitDateInstant on modern JVM’s where Instant has microseconds precision. Removed dependency on javax.annotation.PostConstruct annotation, which is not available on OpenJDK.


released on 2019-01-07

  • 765 Fixed bug in persisting commitDateInstant in SQL database.


released on 2018-12-30

  • 743 commitDateInstant added to CommitMetadata:
 * Commit creation timestamp in UTC.
 * <br/><br/>
 * Since 5.1, commitDateInstant is persisted in JaversRepository
 * to provide reliable chronological ordering, especially when {@link CommitIdGenerator#RANDOM}
 * is used.
 * <br/><br/>
 * Commits persisted by JaVers older then 5.1
 * have commitDateInstant guessed from commitDate and current {@link TimeZone}
 * @since 5.1
public Instant getCommitDateInstant() {
    return commitMetadata.getCommitDateInstant();
  • 761 Fixed DateTimeParseException when deserializing Snapshots of a refactored class.

  • 762 Fixed Snapshots sorting in MongoRepository when CommitIdGenerator.RANDOM is used.


released on 2018-12-23

  • 45 Fixed bug in SQL SchemaInspector in polyjdbc when JaVers’ tables are created in public schema.

  • Added more descriptive message in NOT_INSTANCE_OF exception.


released on 2018-12-05

  • Fixes for CustomPropertyComparator combined with LEVENSHTEIN_DISTANCE and AS_SET algorithms.


released on 2018-12-01

  • JaVers’ Spring integration modules are upgraded to be fully compatible with Spring 5.1 and Spring Boot 2.1.

    If you are using Spring 5.x, it’s recommended to use JaVers 5.x. Otherwise you can fall into dependencies version conflict.

    Current versions of dependencies:

springVersion            = 5.1.2.RELEASE
springBootVersion        = 2.1.0.RELEASE
springDataCommonsVersion = 2.1.2.RELEASE
springDataMongoVersion   = 2.1.2.RELEASE
springDataJPAVersion     = 2.1.2.RELEASE
springSecurityVersion    = 5.1.1.RELEASE
mongoDbDriverVersion     = 3.8.2
hibernateVersion         = 5.3.7.Final   

Since now, the last JaVers version compatible with Spring 4 is 3.14.0.

  • 747 Two breaking changes in CustomPropertyComparator. Now, it has to implement boolean equals(a, b) method, which is used by JaVers to calculate collection-to-collection diff. Return type of compare(...) method is changed to Optional. See updated examples and doc.
public interface CustomPropertyComparator<T, C extends PropertyChange> {
     * This comparator is called by JaVers to calculate property-to-property diff.
    Optional<C> compare(T left, T right, GlobalId affectedId, Property property);

     * This comparator is called by JaVers to calculate collection-to-collection diff.
    boolean equals(T a, T b);

  • 746 Added default comparator for raw Collections. Previously, raw Collections were ignored by JaVers, now, they are converted to Lists and then compared as Lists.

  • 738 Added DBRefUnproxyObjectAccessHook to support lazy @DBRef from Spring Data MongoDB. The hook is registered automatically in javers-spring-boot-starter-mongo.


released on 2018-11-10

  • All SQL queries are rewritten using the new, faster JaVers SQL framework. Poly JDBC is no longer used for queries (but is still used to schema management). Thanks to that, performance of JaVers commits with SQL repo is significantly better, especially when committing large object graphs.

  • Experimental support for DB2 and DB2400 is discontinued.


released on 2018-10-27

  • 690 Fixed — missing property in *.yml to set SQL database schema name.


released on 2018-10-25

  • 688 Fixed — missing property in *.yml to set CommitIdGenerator.


released on 2018-10-19

  • 724 Fixed issue when deserializing Diff from JSON.


released on 2018-10-19

  • 593 Asynchronous commit:
CompletableFuture<Commit> commitAsync(String author, Object currentVersion, Executor executor);


released on 2018-10-11

  • 723 Added possibility to load Snapshots even if user’s class is removed. Prevents JaversException TYPE_NAME_NOT_FOUND.


released on 2018-09-29

  • 712 Fixed issue with auto-audit aspect for JPA CRUD repositories for entities with Id generated by Hibernate (@GeneratedValue).


released on 2018-09-19

  • 717 Added index on global_id SQL table to speed up queries by Value Object ID.


released on 2018-08-27

  • 705 Dependency update. FastClasspathScanner updated to the latest ClassGraph.


released on 2018-08-22

  • Fixed JaversException PROPERTY_NOT_FOUND reported here.

  • Fixed bugs in Maps and Multimaps serialization.


released on 2018-08-14

  • 697 Fixed issue with Numbers.


released on 2018-08-09

  • 692 Guava issue is finally fixed.


released on 2018-08-04

  • 511 Added handling of property type changes in domain classes. Now JaVers is able to load a Snapshot from JaversRepository, even if property types are different in a current domain class.

  • 692 Fixed bug in javers-core dependencies. Guava is a truly optional dependency.


released on 2018-07-10

  • 687 Additional advices for Spring Data Jpa Aspect.


released on 2018-07-07

  • 682 Fixed JaVers bootstrap error — COMPONENT_NOT_FOUND: JaVers bootstrap error - component of type ‘org.javers.core.CommitIdGenerator’


released on 2018-06-22

  • Stream API for Shadow queriesjavers.findShadowsAndStream(). Using Stream.skip() and Stream.limit() is the only correct way for paging Shadows (see 658). See the example in ShadowStreamExample.java.
Stream<Shadow<Employee>> shadows = javers.findShadowsAndStream(
        QueryBuilder.byInstanceId("Frodo", Employee.class).build());

Employee employeeV5 = shadows.filter(shadow -> shadow.getCommitId().getMajorId() == 5)
       .map(shadow -> shadow.get())
  • 650 @DiffIgnore and @DiffInclude annotations can mixed now in one class. When @DiffInclude is used in a class, JaVers ignores @DiffIgnore or @Transient annotations in that class.


released on 2018-05-17

  • 677 Added support for saveAll(Iterable) from Spring Data 2.x


released on 2018-05-11

  • 676 Fixed NPE when comparing List of Value Objects containing nulls.


released on 2018-05-09

  • 669 Fixed issue with Value Objects stored in Lists and compared using AS_SET algorithm.


released on 2018-05-01

  • 666 Fixed compatibility with Java9 modulepath.


released on 2018-04-26

  • 664 Fixed commidDate persistence in MySql. Column type is changed from timestamp to timestamp(3) — milliseconds precision.


released on 2018-04-22

  • 660 Fixed bug in Shadow query runner.


released on 2018-04-19

Javers javers = javers().withCommitIdGenerator(CommitIdGenerator.RANDOM)


released on 2018-04-11

  • New API for processing Changes, convenient for formatting a change log. Now you can group changes by commits and by objects. See Changes.groupByCommit(). For example:
Changes changes = javers.findChanges(QueryBuilder.byClass(Employee.class)
changes.groupByCommit().forEach(byCommit -> {
  System.out.println("commit " + byCommit.getCommit().getId());
  byCommit.groupByObject().forEach(byObject -> {
    System.out.println("  changes on " + byObject.getGlobalId().value() + " : ");
    byObject.get().forEach(change -> {
      System.out.println("  - " + change);
  • Fixed bug in queryForChanges(), which could cause NPE in some corner cases. Especially, for complex graphs with multiple levels of nested Value Objects.


released on 2018-03-27

  • 648 Mongo driver upgrade to 3.6.3


released on 2018-03-04

  • 638 Fixed NPE in EdgeBuilder.


released on 2018-03-02

  • 645 Added support for Entity as an Id of another Entity.


released on 2018-02-28

  • 640 Added scanning of gettres declared in interfaces. See this Spec.


released on 2018-02-25

  • 542 Added possibility to disable SQL schema auto creation.
    The flag withSchemaManagementEnabled() is added to SqlRepositoryBuilder. The flag is also available in the Spring Boot starter for SQL.


released on 2018-02-06


released on 2018-01-14

  • 558 Performance improvement in Hibernate unproxy hook. Now, ShallowReferences can be created without initializing Hibernate proxies.


released on 2018-01-05

  • Marvin Diaz added support for DB2 and DB2400 (beta).

  • Fixed comparing of complex ID values in ValueChangeAppender. Now their equals() is not used.


released on 2017-12-20

  • 596 Fixed NullPointerException when commit property value is null (by Sergey Rozhnov).

  • 519 Added index on Entity typeName in MongoDB.


released on 2017-12-09


released on 2017-12-01

  • Shadow queries performance optimization. Less DB queries executed for each Deep+ query.

  • Changes in Shadow Scopes. Now, JaVers always loads child ValueObjects owned by selected Entities. So there is no need to call QueryBuilder.withChildValueObjects(). See javadoc for ShadowScope.

  • Shadow queries execution statistics logger. Enable it:

    <logger name="org.javers.JQL" level="DEBUG"/>

and you will get detailed logs from query execution, for example:

DEBUG org.javers.JQL - SHALLOW query: 1 snapshots loaded (entities: 1, valueObjects: 0)
DEBUG org.javers.JQL - DEEP_PLUS query for '...SnapshotEntity/2' at commitId 3.0, 1 snapshot(s) loaded, gaps filled so far: 1
DEBUG org.javers.JQL - warning: object '...SnapshotEntity/3' is outside of the DEEP_PLUS+1 scope, references to this object will be nulled. Increase maxGapsToFill and fill all gaps in your object graph.
DEBUG org.javers.JQL - queryForShadows executed:
JqlQuery {
  IdFilter{ globalId: ...SnapshotEntity/1 }
  QueryParams{ aggregate: true, limit: 100 }
  ShadowScopeDefinition{ shadowScope: DEEP_PLUS, maxGapsToFill: 1 }
    executed in millis: 12
    DB queries: 2
    all snapshots: 2
    SHALLOW snapshots: 1
    DEEP_PLUS snapshots: 1
    gaps filled: 1
    gaps left!: 1

Statistics are also available in Stats object that you can get from an executed query:

Stats stats = jqlQuery.stats();


released on 2017-11-24

  • 605 Compare Lists as Sets. New List comparing algorithm contributed by drakin. See List comparing algorithms

  • 601 Fixed bug in the type mapping algorithm. In this case, an Entity with complex inheritance structure was mapped as Value.


released on 2017-11-13

  • Changes in Shadow Scopes. Commit-deep+ is renamed to Deep+. See javadoc for ShadowScope. Now, deep+ scope doesn’t include commit-deep scope. They are independent scopes.

  • 597 Second fix for MySQL error: Specified key was too long; max key length is 767 bytes.


released on 2017-11-01

  • New SnapshotType filter in JQL. Allows selecting snapshots by type: INITIAL, UPDATE, TERMINAL. See QueryBuilder.withSnapshotType().

  • Improved exception handling in byInstance query.


released on 2017-10-29


released on 2017-10-05

This task forced a major refactoring.

Javers-spring module was split into two parts:

  • javers-spring with general purpose auto-audit aspect and auto-audit aspect for Spring Data CrudRepository.
  • javers-spring-jpa — a superset of javers-spring — with JPA & Hibernate integration, so: auto-audit aspect for Spring Data JpaRepository, HibernateUnproxyObjectAccessHook, JpaHibernateConnectionProvider, and JaversTransactionalDecorator.

If you are using JaVers with MongoDB, you don’t need to change anything.

If you are using JaVers with SQL but without Spring Boot, you need to change the javers-spring dependency to javers-spring-jpa. If you are using Spring Boot with our starter (javers-spring-boot-starter-sql), you don’t need to change anything. Our starters always provide the right configuration.


released on 2017-10-05

  • 574 Added missing support for @PropertyName in Shadows.


released on 2017-09-24

  • Dependencies versions update:


released on 2017-07-30

  • 568 Added the new scope for Shadow queries — commit-depth+. In this scope, JaVers tries to restore an original object graph with (possibly) all object references resolved. See Shadow Scopes.


released on 2017-07-14

  • 565 Fixed error when executing query byInstance with HibernateUnproxyObjectAccessHook.


released on 2017-07-04

  • 560 Fixed NPE when getting empty list of Shadows.


released on 2017-06-29


released on 2017-06-25

  • 546 Arrays on Value position are now compared using Arrays.equals().


released on 2017-06-25

  • 497 Fix in PolyJDBC for MsSql, deprecated TEXT column type changed to VARCHAR(MAX)


released on 2017-06-21 at Devoxx PL, Cracow

  • Added possibility to register a CustomValueComparator function for comparing ValueTypes (it works also for Values stored in Lists, Arrays and Maps). Solved issues: 492, 531.

For example, BigDecimals are (by default) ValueTypes compared using BigDecimal.equals(). Now, you can compare them in the smarter way, ignoring trailing zeros:

 javersBuilder.registerValue(BigDecimal.class, (a,b) -> a.compareTo(b) == 0);


released on 2017-06-12

  • 32 Fix in PolyJDBC for MySql INSERTS with autoincrement.


released on 2017-05-26

  • 133 New JQL queries — Shadows. See Shadow query examples.

  • 455 Fixed error in schema creation on MySQL database with non UTF-8 encoding — MySQL error: Specified key was too long; max key length is 767 bytes


released on 2017-05-07

  • 532 Added the method to clear sequence allocation in PolyJDBC. See JaversSqlRepositoryevictSequenceAllocationCache().

  • 539 Added annotation priorities. Now, Javers’ annotations have priority over JPA annotations.


released on 2017-03-27

  • 403 Added @PropertyName annotation. Now, property names can be customized which means easier domain classes refactoring.

  • 27 Fixed resource leak in PolyJDBC.


released on 2017-03-24

  • 524 Fixed version conflict between Hibernate and Spring Boot. Hibernate version downgraded to 5.0.11.Final


released on 2017-03-14

  • 505 Empty commits (with zero snapshots) are no longer persisted.


released on 2017-03-05

  • 507 BigInteger added to the list of well known Value types.


released on 2017-03-02

  • 501 Fixed exception (Don’t know how to extract Class from type) for complex class hierarchies with generic type variables.

  • 499 Fixed problem with hash collision for some method names.

3.0.0 — Java 8 release

released on 2017-02-01

We rewrote whole JaVers’ code base from Java 7 to 8.
Now, JaVers is lighter, faster, and more friendly for Java 8 users.

Breaking changes

  • All javers-core classes like: Change, Commit, or CdoSnapshot now use standard Java 8 types java.util.Optional and java.time.LocalDateTime.

  • The old good Joda Time is no longer used in javers-core but still supported in users’ objects.

  • JaVers’ Optional is removed.

  • All @Deprecated methods in public API are removed.

  • Since 3.0, JaVers is not runnable on Java 7 Runtime. If you still use Java 7, stay with version, which will be maintained for a while, but only for bug fixing.


  • All JaVers’ dependencies are bumped to the latest versions:
gson :                   2.8.0
mongo-java-driver :      3.4.2
picocontainer :          2.15
fast-classpath-scanner : 2.0.13
spring :                 4.3.6.RELEASE
spring-boot :            1.4.4.RELEASE
hibernate :              5.2.7.Final
joda :                   2.9.7 (optional)
guava :                  21.0  (optional)

  • SQL Repository schema migration scripts for JaVers 1.x are removed. Upgrade from JaVers 1.x to 3.0 is still possible, but first run 2.9.x to perform overdue SQL Repository schema migration.


released on 2017-01-28

2.9.2 — the last version runnable on Java 7 Runtime

released on 2017-01-25

  • 494 Fixed bug in MongoRepository introduced in 2.9.1 (IllegalArgumentException for Boolean JsonPrimitive).


released on 2017-01-17

  • 489 MongoRepository performance optimization.


released on 2017-01-14

  • #132 Implemented support for Guava’s Multiset and Multimap.


released on 2017-01-03

  • #485 Fixed MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes when creating indexes on MySQL.


released on 2016-12-13

  • #475 Fixed concurrency issue in SQL sequence generator resulting in SequenceLimitReachedException: [SEQUENCE_LIMIT_REACHED]


released on 2016-12-09

  • #476 Added support in javers-spring for multiple Spring Transaction Managers.
    Since now, transactionManager bean should be explicitly provided when configuring javers bean:
    public Javers javers(PlatformTransactionManager txManager) {
        JaversSqlRepository sqlRepository = SqlRepositoryBuilder

        return TransactionalJaversBuilder
                .withObjectAccessHook(new HibernateUnproxyObjectAccessHook())

See full example of Spring configuration.

  • #461 Fix for CANT_DELETE_OBJECT_NOT_FOUND excepting throw from @JaversSpringDataAuditable aspect when deleted object not exists in JaversRepository.


released on 2016-11-29

  • #467 Fixed bug in GlobalId PK cache in SQl Repository. Now, when Spring Transaction Manager rolls back a transaction, the cache is automatically evicted.

  • #462 Fixed problem with commit property column size in SQL databases. Max length increased from 200 to 600 characters.


released on 2016-11-17

  • #457 Fixed problem with Bean Mapping Style due to Type Erasure.


released on 2016-11-10


released on 2016-10-30

  • #411 New commitId generator for distributed applications. Now you can use cluster-friendly CommitIdGenerator#RANDOM, see JaversBuilder.withCommitIdGenerator()

  • #209 Added multi-class query — QueryBuilder.byClass(Class... requiredClasses).

  • #435 Added flags for deactivating auto-audit aspects in Spring Boot starters.

  auditableAspectEnabled: false
  springDataAuditableRepositoryAspectEnabled: false


released on 2016-10-26

  • #412 @ShallowReference annotation can now be used for properties.

  • Empty snapshots for @ShallowReference Entities are no longer created.

  • #443 Fix for Gson stackoverflow exception when using complex Value types (with circular references).


released on 2016-10-18

  • #441 UUID added to list of well known ValueTypes.


released on 2016-10-12


released on 2016-09-21

  • #263 @TypeName annotation scanner implemented. Now you can easily register your classes with the @TypeName annotation in order to use them in all kinds of JQL queries
    (without getting TYPE_NAME_NOT_FOUND exception). See JaversBuilder.withPackagesToScan(String packagesToScan).


released on 2016-09-09

  • #430 Added @ConditionalOnMissingBean on javers bean.


released on 2016-09-06

  • #417 Fixed dependency management in javers-spring. Now spring-data-commons dependency is optional and should be on an application’s classpath only when you are using the @JaversSpringDataAuditable annotation.
    The aspect class JaversAuditableRepositoryAspect was removed and split into two aspects: JaversAuditableAspect and JaversSpringDataAuditableRepositoryAspect.
    First one should be enabled when you are using @JaversAuditable. Second one should be enabled when you are using @JaversSpringDataAuditable.
    If you are using javers-spring-boot-starter-*, both aspects are enabled by default so you don’t have to change anything.
    See auto-audit aspects documentaton.

  • #425 Fixed some bugs in ShallowReference type handling.


released on 2016-08-28

  • #416 Added map key dot replacement in MongoRepository.

  • #415 Key in TypeMapperState.mappedTypes changed from Type to Type.toString().


released on 2016-07-30

  • #395 Spring Boot version bumped to 1.4.0-RELEASE, fixed MongoDB Driver version conflict between JaVers and spring-data-mongodb.


released on 2016-07-28

  • #220 New aggregate filter in JQL. Now child ValueObjects can be selected when querying for Entity changes. See childValueObjects filter example.

  • #408 Added equals() and hashCode() in ContainerElementChange and EntryChange classes.


released on 2016-07-23

  • #407 Fixed bug that causes PropertyChange.equals() to always return false.

  • #394 Error message enhancement.


released on 2016-06-29

  • #396 Fixed javers-spring integration problem: cannot access its superclass org.javers.spring.jpa.JaversTransactionalDecorator.


released on 2016-06-17

  • #388 Fixed ORA-00972 when creating the JaVers schema in Oracle 12c


released on 2016-06-15

  • #384 Value-based equals() and hashCode() implemented in concrete Change types
  • #380 Fixed CLASS_EXTRACTION_ERROR for non-concrete array types (like T[])


released on 2016-06-09

JaVers 2.0 comes with major improvements and new features in JQL.

Unified semantics of changes and snapshot queries
In JaVers 2.0, change queries work in the same way as snapshot queries and change queries accept all filters.

For example, in JaVers 1.x, this change query:


returns empty list, which is not very useful.

In JaVers 2.0 this query returns changes introduced by the selected snapshot, so changes between versions 4 and 5 of a given object.

JaVers implements change queries on the top of snapshot queries. Change sets are recalculated as a difference between subsequent pairs of snapshots fetched from a JaversRepository. In 1.x, only explicitly selected snapshots are involved in the recalculation algorithm. In 2.0, for each snapshot selected by a user query, JaVers implicitly fetches previous snapshot (if needed). Thanks to that, change queries are far more useful and they work as you could expect.

New features

SQL Schema migration

JaVers 2.0 comes with the new database schema for SQL repository:

  • table jv_cdo_class is no longer used
  • new column jv_global_id.type_name
  • new column jv_snapshot.managed_name
  • new table jv_commit_property

JaVers automatically launches a data migration script when old schema is detected. Data from jv_cdo_class are copied to new columns (jv_global_id.type_name and jv_snapshot.managed_name). It should take a few seconds for medium size tables but for very large tables it could be time consuming.

Breaking changes
The only one breaking change is new semantics of changes query which is actually an improvement.

If you are using SQL repository, and your jv_snapshot table is large (millions of records), run JaVers 2.0 on your test environment for the first time and check if data migrations is done correctly.


released on 2016-05-06

  • #368 Improvements in Spring Boot starters. SpringSecurityAuthorProvider bean is created by default when SpringSecurity is detected on classpath.


released on 2016-04-26

  • #362 Default behaviour for non-parametrized Collections instead of throwing JaversException: GENERIC_TYPE_NOT_PARAMETRIZED.


released on 2016-04-17

  • #361 Fixed bug in schema migration for MsSql Server.


released on 2016-04-13

  • #355 Fixed exception handling in JaversAuditableRepositoryAspect.

  • #216 JQL - added basic support for nested ValuObjects queries.


released on 2016-04-12

  • #353 Fixed misleading error message for raw Collections fields.

  • #18 Fixed resource leak in PolyJDBC, resulting in ORA-01000: maximum open cursors exceeded (Oracle).


released on 2016-03-16

  • #191 Added support for sets of ValueObjects, SET_OF_VO_DIFF_NOT_IMPLEMENTED exception should not appear anymore.


released on 2016-03-04

  • #344 Fixed bug in Spring Boot starter for SQL. Dialect autodetection now works properly.


released on 2016-02-28

  • New JaVers Spring Boot starter for SQL and Spring Data — javers-spring-boot-starter-sql. See Spring Boot integration.

  • Starting from this version we use SemVer scheme for JaVers version numbers.


released on 2016-02-25

  • #341 Fixed bug TyeMapper — infinite loop for certain Type cycles in user classes.


released on 2016-02-12

  • #333 GroovyObjects support. Now JaVers can be used in Groovy applications. See Groovy diff example.

  • @DiffIgnore can be used on class level (for example, GroovyObjects support is implemented by ignoring all properties with groovy.lang.MetaClass type). See class annotations.

  • #211 New annotation @ShallowReference added. It can be used as the less radical alternative to @DiffIgnore. See ignoring things.


released on 2016-02-02

  • #325 Fixed bug in persisting commitDate in SQL repository.

  • #249 Fixed bug in JSON deserialization of Id property with Type tokens.

  • #192 Added support for well-known Java util types: UUID, File and Currency.

  • #16 Fixed bug in PolyJDBC sequence generating algorithm.


released on 2016-01-29


released on 2016-01-25


released on 2016-01-20

  • #286 New properties in ReferenceChange: getLeftObject() and getRightObject().

  • #294 Added version number to Snapshot metadata: CdoSnapshot.getVersion().


    All snapshots persisted in JaversRepository before release 1.4.4 have version 0. If it isn’t OK for you, run DB update manually.

    For SQL database:

    UPDATE jv_snapshot s SET version = (
    SELECT COUNT(*) + 1 FROM jv_snapshot s2
    WHERE s.global_id_fk = s2.global_id_fk and s2.snapshot_pk < s.snapshot_pk)


released on 2016-01-18


released on 2016-01-15


released on 2016-01-08


released on 2015-12-18

  • Added @TypeName annotation and support for domain classes refactoring, see Entity refactoring example. Fixed issues: #178, #232.
  • #192 Fixed bug in persisting large numbers in MongoDB.
  • #188 Diff is now Serializable.

Breaking changes:

  • Most of @Deprecated API removed.
  • Slight API changes in few places.
  • GlobalId is now decoupled from ManagedType, reference from globalId to concrete managedType is replaced with typeName String field.
  • PropertyChange is now decoupled from Property, reference from propertyChange to concrete property is replaced with propertyName String field.
  • Visibility of ManagedClass is reduced to package private.


released on 2015-11-27

  • #250 Added missing mapping for CharSequence.


released on 2015-11-13

  • #247 Fixed bug while querying for a ValueObject stored as a Map value.


released on 2015-11-08


released on 2015-11-04

  • #244 Added support for upper-bounded wildcard types, like List<? extends Something>. Contributed by dbevacqua.


released on 2015-10-17

  • #224 Fixed bug in org.javers.common.collections.Optional.equals() which caused strange ClassCastException.


released on 2015-10-14

  • #221 Fixed JaversException.CANT_SAVE_ALREADY_PERSISTED_COMMIT thrown when concurrent writes happened to hit JaversSqlRepository.


released on 2015-10-13

  • Fixed Java 7 compatibility problem introduced in the previous version.


released on 2015-10-13

  • #218 Fixed concurrency issue in TypeMapper which caused ClassCastExceptions, i.e.: java.lang.ClassCastException: com.example.MyObject cannot be cast to org.javers.core.metamodel.object.GlobalId


released on 2015-10-09

  • #207 Fixed bug in serialization ValueObject arrays. Fixed bug in comparing deserialized primitive arrays.


released on 2015-10-03

  • #208 Added support for legacy date types: java.util.Date, java.sql.Date, java.sql.Timestamp and java.sql.Time. Added milliseconds to JSON datetime format. All local datetimes are now serialized using ISO format yyyy-MM-dd'T'HH:mm:ss.SSS.


released on 2015-10-01

  • #213 Fixed bug in calculating changed properties list in CdoSnapshot.getChanged() for nullified values.


released on 2015-09-30

  • #206 Fixed NPE when reading ValueObject changes from SQL repository. It was caused by error in serializing ValueObjectId to JSON.


released on 2015-09-24

  • #205 Fixed AFFECTED_CDO_IS_NOT_AVAILABLE JaVers runtime error when serializing Changes to JSON using Jackson.


released on 2015-09-21

  • #126 Added support for Java 8 java.util.Optional and types from Java 8 Date and Time API (like java.time.LocalDateTime). JaVers can still run on JDK 7.
  • #197 Added JSON prettyPrint switch — JaversBuilder.withPrettyPrint()
  • #199 Added support for comparing top-level Arrays, i.e.: javers.compare(new int[]{1}, new int[]{1,2}). Contributed by Derek Miller.


released on 2015-09-15

  • #195 Added support for JPA @EmbeddedId annotation.


released on 2015-08-24

  • #190 Fixed bug in ManagedClassFactory, Id property can be registered even if it has @Transient annotation.


released on 2015-08-12

  • Javers-hibernate module merged to javers-spring.
  • #186 Fixed another concurrency issue in CommitSequenceGenerator.


released on 2015-08-09

  • #186 fixed concurrency issue in CommitSequenceGenerator


released on 2015-08-03

  • #182 fixed ConcurrentModificationException in TypeMapper


released on 2015-07-17

  • #100 MS SQL support in JaversSQLRepository
  • Oracle support in JaversSQLRepository


released on 2015-06-30

  • Added On Access Hook
  • #172 Hibernate support enabled using On Access Hook feature


released on 2015-06-12

  • #172 Fixed bug when registering more than one CustomPropertyComparator
  • #167 Fixed bug in Levenshtein algorithm (comparing lists of Entities)


released on 2015-06-10

  • Pretty-print feature: javers.getTypeMapping(Clazz.class).prettyPrint() describes given user’s class in the context of JaVers domain model mapping.


released on 2015-05-31

  • #142 Fixed bug when mapping Entity hierarchies with custom idProperty.


released on 2015-05-29

  • Fixed problem with build 1.2.6, which wasn’t built from the master branch


released on 2015-05-26

  • #157 Fixed JsonIOExcpetion when trying to deserialize property with nested generic type. Contributed by Dieler.


released on 2015-05-24

  • #146 #156 MongoDB Java Driver updated to 3.0. Thanks to that, JaVers is compatible with MongoDB versions: 2.4, 2.6 and 3.0.


released on 2015-05-18

  • #127 Implemented tolerant comparing strategy for ValueObjects when one has more properties than another. For example, now you can compare Bicycle with Mountenbike extends Bicycle.

1.2.0 JQL

released on 2015-04-20

  • #36 Javers Query Language. New fluent API for querying JaversRepository. New query types: by class, by property and more, See JQL examples.
  • #98 Track changes in collection. Tracking VO changes while looking at master Entity.
  • #118 API to get change history for a given property.
  • #128 Changes of a set of entities.
  • #129 Lists: newObject and ValueChange?


released on 2015-03-17


released on 2015-03-13

  • #67 JaversSQLRepository with support for MySQL, PostgreSQL and H2.
  • #89 Spring JPA Transaction Manager integration for Hibernate.


released on 2015-02-25

  • #47 Spring integration. Added @JaversAuditable aspect for auto-committing changed done in Repositories.
    gessnerfl contributed @JaversSpringDataAuditable, which gives a support for Spring Data Repositories.


released on 2015-02-10

  • #94 Specifying ignored properties without annotations.
    Reported by Chuck May.


released on 2015-02-01

  • #76 AddedSupport for nested generic types like List<List<String>> or List<ThreadLocal<String>>. Reported by Chuck May
  • Fixed NPE in MongoRepository.


released on 2015-01-20

  • #80 Added custom comparators support. This allows you to register comparators for non-standard collections like Guava Multimap.


released on 2015-01-12

  • #47 Spring integration. Added @JaversAuditable annotation for repository methods.

  • #77 Added missing feature in Generics support.
    Reported by Bryan Hunt.

  • #71 Tracking a top-level object deletion.
    Reported by Chuck May.


released on 2015-01-08

  • #78 NullPointerException at ReflectionUtil.getAllFields() when using interface as a variable type.


released on 2015-01-03

  • #73 Listing newObject event on change history.
    Reported by Chuck May.


released on 2014-12-25

  • Production-ready release with stable API.

JaVers logo small
Open source Java library available under Apache License