hibernate/hibernate-orm · error · UnknownPersisterException
Could not determine persister implementation for entity [%s]
Error message
Could not determine persister implementation for entity [%s]
What it means
Error "Could not determine persister implementation for entity [%s]" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/persister/internal/StandardPersisterClassResolver.java:51
if ( model.hasSubclasses() ) {
//If the class has children, we need to find of which kind
model = model.getDirectSubclasses().get(0);
}
else {
return singleTableEntityPersister();
}
}
if ( model instanceof JoinedSubclass ) {
return joinedSubclassEntityPersister();
}
else if ( model instanceof UnionSubclass ) {
return unionSubclassEntityPersister();
}
else if ( model instanceof SingleTableSubclass ) {
return singleTableEntityPersister();
}
else {
throw new UnknownPersisterException(
"Could not determine persister implementation for entity [" + model.getEntityName() + "]"
);
}
}
public Class<? extends EntityPersister> singleTableEntityPersister() {
return SingleTableEntityPersister.class;
}
public Class<? extends EntityPersister> joinedSubclassEntityPersister() {
return JoinedSubclassEntityPersister.class;
}
public Class<? extends EntityPersister> unionSubclassEntityPersister() {
return UnionSubclassEntityPersister.class;
}
@OverrideView on GitHub (pinned to fad1729dce)
Solutions
- Register a persister for the entity via @Persister or configuration, or remove the custom persister reference.
- Ensure the referenced persister class implements EntityPersister.
When it happens
Trigger: A runtime precondition of the Hibernate API is violated.
Common situations: Occurs when application code or configuration does not satisfy the documented contract of the API being called.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/e838268654826b16.
Report an issue: GitHub.