{"record":{"id":"7d37e0ec81d65607","repo":"hibernate/hibernate-orm","slug":"could-not-supply-stateless-interceptor-of-class","errorCode":null,"errorMessage":"Could not supply stateless Interceptor of class '{}'","messagePattern":"Could not supply stateless Interceptor of class '(.+?)'","errorType":"exception","errorClass":"HibernateException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java","lineNumber":1663,"sourceCode":"\t\tthis.statisticsEnabled = enabled;\n\t}\n\n\tpublic void addSessionFactoryObservers(SessionFactoryObserver... observers) {\n\t\tCollections.addAll( sessionFactoryObserverList, observers );\n\t}\n\n\tpublic void applyInterceptor(Interceptor interceptor) {\n\t\tthis.interceptor = interceptor;\n\t}\n\n\tpublic void applyStatelessInterceptor(Class<? extends Interceptor> statelessInterceptorClass) {\n\t\tapplyStatelessInterceptorSupplier(\n\t\t\t\t() -> {\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn statelessInterceptorClass.newInstance();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (InstantiationException | IllegalAccessException e) {\n\t\t\t\t\t\tthrow new HibernateException(\n\t\t\t\t\t\t\t\t\"Could not supply stateless Interceptor of class '\"\n\t\t\t\t\t\t\t\t+ statelessInterceptorClass.getName() + \"'\", e\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t);\n\t}\n\n\tpublic void applyStatelessInterceptorSupplier(Supplier<? extends Interceptor> statelessInterceptorSupplier) {\n\t\tthis.statelessInterceptorSupplier = statelessInterceptorSupplier;\n\t}\n\n\tpublic void applySqmFunctionRegistry(SqmFunctionRegistry sqmFunctionRegistry) {\n\t\tthis.sqmFunctionRegistry = sqmFunctionRegistry;\n\t}\n\n\tpublic void applyStatementObserver(StatementObserver statementObserver) {\n\t\tthis.statementObserver = statementObserver;","sourceCodeStart":1645,"sourceCodeEnd":1681,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/internal/SessionFactoryOptionsBuilder.java#L1645-L1681","documentation":"Error \"Could not supply stateless Interceptor of class '{}'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"Hibernate cannot create the configured stateless SessionFactory Interceptor.","commonSituations":"hibernate.session_factory.stateless_interceptor naming a class that is missing or cannot be instantiated.","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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}