javax.persistence.PersistenceException

org.hibernate.WrongClassException: Object with id: testuser was not of the specified subclass: test.User (Discriminator: testuser)

Samebug tips1

Check your annotations to use the proper table and column names.

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

Solutions on the web146

  • via Unknown by Simon Kulessa,
  • via Unknown by Simon Kulessa,
  • Stack trace

    • javax.persistence.PersistenceException: org.hibernate.WrongClassException: Object with id: testuser was not of the specified subclass: test.User (Discriminator: testuser) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:838) at org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:781)

    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

    linxiaolonglinxiaolong
    6 times, last one
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    11 more bugmates