hibernate/hibernate-orm · error · NotInstrumentedException
Entity [{entityName}] is non-pojo, and therefore not instrum
Error message
Entity [{entityName}] is non-pojo, and therefore not instrumented What it means
Error "Entity [{entityName}] is non-pojo, and therefore not instrumented" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/bytecode/internal/BytecodeEnhancementMetadataNonPojoImpl.java:56
return entityName;
}
@Override
public boolean isEnhancedForLazyLoading() {
return false;
}
@Override
public LazyAttributesMetadata getLazyAttributesMetadata() {
return lazyAttributesMetadata;
}
@Override
public LazyAttributeLoadingInterceptor injectInterceptor(
Object entity,
Object identifier,
SharedSessionContractImplementor session) throws NotInstrumentedException {
throw new NotInstrumentedException( errorMsg );
}
@Override
public void injectInterceptor(
Object entity,
PersistentAttributeInterceptor interceptor,
SharedSessionContractImplementor session) {
throw new NotInstrumentedException( errorMsg );
}
@Override
public void injectEnhancedEntityAsProxyInterceptor(
Object entity,
EntityKey entityKey,
SharedSessionContractImplementor session) {
throw new NotInstrumentedException( errorMsg );
}
View on GitHub (pinned to fad1729dce)
Solutions
- Use Hibernate enhancement features only with POJO entity classes; dynamic-map models do not support bytecode interception.
Example fix
Use Hibernate enhancement features only with POJO entity classes; dynamic-map models do not support bytecode interception.
When it happens
Trigger: Bytecode enhancement, proxy creation, or lazy interception is applied to an incompatible class or configuration.
Common situations: Build-time enhancement with module-system restrictions, mismatched Hibernate versions between build and runtime, or hibernate.bytecode.provider=none with a model that needs proxies.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/2447907114f8e282.
Report an issue: GitHub.