javax.persistence.PersistenceException: org.hibernate.WrongClassException: Object [id=1] was not of the specified subclass [bug.ChildTwo] : loaded object was of wrong class class bug.ChildOne

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Nassim MOUALEK
, 2 years ago
org.hibernate.type.SerializationException: could not deserialize
via Hibernate JIRA by Stephen Fikes, 1 year ago
org.hibernate.exception.SQLGrammarException: could not extract ResultSet
via Stack Overflow by Tincho
, 1 year ago
org.hibernate.exception.SQLGrammarException: could not extract ResultSet
via Hibernate JIRA by Stephen Fikes, 1 year ago
org.hibernate.exception.SQLGrammarException: could not extract ResultSet
javax.persistence.PersistenceException: org.hibernate.WrongClassException: Object [id=1] was not of the specified subclass [bug.ChildTwo] : loaded object was of wrong class class bug.ChildOne
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1692)
at org.hibernate.jpa.spi.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1602)
at org.hibernate.jpa.internal.QueryImpl.getResultList(QueryImpl.java:492)

Users with the same issue

13 times, 7 months ago
12 times, 1 year ago
Once, 1 year ago
11 times, 1 year ago
2 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.