You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
java.lang.ClassCastException: class org.javers.core.metamodel.property.MissingProperty cannot be cast to class java.util.List #851
Using javers-spring-boot-starter-sql 5.5.2, I'm getting the following error message for some types of commits. In the commit, a reference to another entity has been changed to null. Looks like wrapNull method is trying to cast an enum to a List, which throws java.lang.ClassCastException.
java.lang.ClassCastException: class org.javers.core.metamodel.property.MissingProperty cannot be cast to class java.util.List (org.javers.core.metamodel.property.MissingProperty is in unnamed module of loader 'app'; java.util.List is in module java.base of loader 'bootstrap')
at org.javers.common.collections.Lists.wrapNull(Lists.java:20)
at org.javers.core.metamodel.type.ListType.map(ListType.java:43)
at org.javers.core.metamodel.type.EnumerableType.map(EnumerableType.java:37)
at org.javers.core.graph.LiveNode.getDehydratedPropertyValue(LiveNode.java:85)
at org.javers.core.diff.NodePair.getRightDehydratedPropertyValueAndSanitize(NodePair.java:40)
at org.javers.core.diff.appenders.CorePropertyChangeAppender.calculateChanges(CorePropertyChangeAppender.java:44)
at org.javers.core.diff.DiffFactory.appendChanges(DiffFactory.java:153)
at org.javers.core.diff.DiffFactory.appendPropertyChanges(DiffFactory.java:143)
at org.javers.core.diff.DiffFactory.createAndAppendChanges(DiffFactory.java:125)
at org.javers.core.diff.DiffFactory.create(DiffFactory.java:69)
at org.javers.core.commit.CommitFactory.createCommit(CommitFactory.java:89)
at org.javers.core.commit.CommitFactory.create(CommitFactory.java:75)
at org.javers.core.JaversCore.commit(JaversCore.java:82)
at org.javers.spring.jpa.JaversTransactionalDecorator.commit(JaversTransactionalDecorator.java:82)
Activity
bartoszwalacik commentedon Jun 13, 2019
Please push a failing test case, see how we write tests https://github.com/javers/javers/tree/master/javers-core/src/test/groovy/org/javers/core/cases
bartoszwalacik commentedon Jun 13, 2019
looks like I have it
fix for #851
bartoszwalacik commentedon Jun 13, 2019
Fixed in 5.6.0