hibernate/hibernate-orm · error · HibernateException
Could not supply stateless Interceptor of class '{}'
Error message
Could not supply stateless Interceptor of class '{}' What it means
Error "Could not supply stateless Interceptor of class '{}'" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java:1663
this.statisticsEnabled = enabled;
}
public void addSessionFactoryObservers(SessionFactoryObserver... observers) {
Collections.addAll( sessionFactoryObserverList, observers );
}
public void applyInterceptor(Interceptor interceptor) {
this.interceptor = interceptor;
}
public void applyStatelessInterceptor(Class<? extends Interceptor> statelessInterceptorClass) {
applyStatelessInterceptorSupplier(
() -> {
try {
return statelessInterceptorClass.newInstance();
}
catch (InstantiationException | IllegalAccessException e) {
throw new HibernateException(
"Could not supply stateless Interceptor of class '"
+ statelessInterceptorClass.getName() + "'", e
);
}
}
);
}
public void applyStatelessInterceptorSupplier(Supplier<? extends Interceptor> statelessInterceptorSupplier) {
this.statelessInterceptorSupplier = statelessInterceptorSupplier;
}
public void applySqmFunctionRegistry(SqmFunctionRegistry sqmFunctionRegistry) {
this.sqmFunctionRegistry = sqmFunctionRegistry;
}
public void applyStatementObserver(StatementObserver statementObserver) {
this.statementObserver = statementObserver;View on GitHub (pinned to fad1729dce)
Solutions
- Ensure the Interceptor class has a public no-arg constructor (or is supplied via a SessionFactory-scoped interceptor instance).
- Check the interceptor class is on the classpath and instantiable (not abstract/interface).
- Supply the interceptor instance programmatically via SessionFactoryOptions/Session.openSession(Interceptor) instead of by class name.
When it happens
Trigger: Hibernate cannot create the configured stateless SessionFactory Interceptor.
Common situations: hibernate.session_factory.stateless_interceptor naming a class that is missing or cannot be instantiated.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/7d37e0ec81d65607.
Report an issue: GitHub.