java.lang.ClassCastException: org.jpwh.model.complexschemas.naturalforeignkey.User cannot be cast to java.io.Serializable

Hibernate JIRA | Christian Bauer | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.jpwh.model.complexschemas.naturalforeignkey.User cannot be cast to java.io.Serializable

      at org.hibernate.type.ManyToOneType.hydrate()
    2. Hibernate
      Loader.loadFromResultSet
      1. org.hibernate.type.ManyToOneType.hydrate(ManyToOneType.java:157)
      2. org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2807)
      3. org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1545)
      3 frames