{"record":{"id":"bb956630d5b93062","repo":"flowable/flowable-engine","slug":"no-session-factory-configured-for","errorCode":null,"errorMessage":"no session factory configured for ","messagePattern":"no session factory configured for ","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/interceptor/CommandContext.java","lineNumber":280,"sourceCode":"    }\n\n    public void removeAttribute(String key) {\n        if (attributes != null) {\n            attributes.remove(key);\n\n            if (attributes.isEmpty()) {\n                attributes = null;\n            }\n        }\n    }\n    \n    @SuppressWarnings({ \"unchecked\" })\n    public <T> T getSession(Class<T> sessionClass) {\n        Session session = sessions.get(sessionClass);\n        if (session == null) {\n            SessionFactory sessionFactory = sessionFactories.get(sessionClass);\n            if (sessionFactory == null) {\n                throw new FlowableException(\"no session factory configured for \" + sessionClass.getName());\n            }\n            session = sessionFactory.openSession(this);\n            sessions.put(sessionClass, session);\n        }\n\n        return (T) session;\n    }\n\n    public Map<Class<?>, SessionFactory> getSessionFactories() {\n        return sessionFactories;\n    }\n    \n    public void setSessionFactories(Map<Class<?>, SessionFactory> sessionFactories) {\n        this.sessionFactories = sessionFactories;\n    }   \n\n    public Map<String, AbstractEngineConfiguration> getEngineConfigurations() {\n        return engineConfigurations;","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/interceptor/CommandContext.java#L262-L298","documentation":"Failure in CommandContext.getSession: a session of the requested type is requested but no SessionFactory is registered for that session class in the engine configuration, meaning the persistence/service layer is incompletely wired (custom engine or missing module).","triggerScenarios":"Thrown at modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/interceptor/CommandContext.java:280 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Register a SessionFactory for the missing session type in the engine configuration","Verify all engine modules/dependencies are on the classpath when bootstrapping the engine"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}