java.lang.ClassCastException

org.hibernate.action.internal.DelayedPostInsertIdentifier cannot be cast to java.lang.Long

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web13

  • via Unknown by Stig Runar Vangen,
  • via Unknown by Stig Runar Vangen,
  • via Stack Overflow by Giovanni Botta
    ,
  • Stack trace

    • java.lang.ClassCastException: org.hibernate.action.internal.DelayedPostInsertIdentifier cannot be cast to java.lang.Long at java.lang.Long.compareTo(Long.java:54) at org.hibernate.internal.util.compare.ComparableComparator.compare(ComparableComparator.java:41) at org.hibernate.internal.util.compare.ComparableComparator.compare(ComparableComparator.java:36) at org.hibernate.type.AbstractStandardBasicType.compare(AbstractStandardBasicType.java:225) at org.hibernate.action.internal.CollectionAction.compareTo(CollectionAction.java:172) at org.hibernate.engine.spi.ExecutableList.add(ExecutableList.java:222) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:250) at org.hibernate.event.internal.AbstractFlushingEventListener.flushCollections(AbstractFlushingEventListener.java:274) at org.hibernate.event.internal.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:103) at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:55) at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1222)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    We couldn't find other users who have seen this exception.