We're updating the issue view to help you get more done. 

Envers fails in Oracle when calculating the difference of an entity whose type has changed from String to non-String

Description

java.lang.ClassCastException: java.math.BigDecimal cannot be cast to java.lang.String
at org.hibernate.envers.entities.mapper.SinglePropertyMapper.mapToMapFromEntity(SinglePropertyMapper.java:70) ~[hibernate-envers-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.envers.entities.mapper.MultiPropertyMapper.map(MultiPropertyMapper.java:88) ~[hibernate-envers-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.envers.synchronization.work.ModWorkUnit.<init>(ModWorkUnit.java:46) ~[hibernate-envers-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.envers.event.EnversPostUpdateEventListenerImpl.onPostUpdate(EnversPostUpdateEventListenerImpl.java:55) ~[hibernate-envers-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.action.internal.EntityUpdateAction.postUpdate(EntityUpdateAction.java:255) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:212) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:362) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:354) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:276) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:326) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1213) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:402) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]
at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175) ~[hibernate-core-4.1.8.Final.jar:4.1.8.Final]

Environment

None

Status

Assignee

Lukasz Antoniak

Reporter

kenanc

Fix versions

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Time Tracking

1h

Components

Affects versions

4.1.8

Priority

Major