defect
When the KnowledgeBase is restarted, an error may occur if the module loading sequence is not correct:
2026-02-25T00:52:29,956 ERROR [Thread-5]: com.top_logic.basic.module.BasicRuntimeModule - Unable to stop service com.top_logic.base.accesscontrol.SessionService com.top_logic.knowledge.service.KnowledgeBaseException: Database operation failed. at com.top_logic.knowledge.service.db2.DefaultDBContext.commitTransaction(DefaultDBContext.java:862) at com.top_logic.knowledge.service.db2.TransactionImpl.internalCommit(TransactionImpl.java:129) at com.top_logic.knowledge.service.AbstractTransaction.commit(AbstractTransaction.java:121) at com.top_logic.knowledge.monitor.UserMonitor.logout(UserMonitor.java:210) at com.top_logic.knowledge.monitor.UserMonitor.notifyUserEvent(UserMonitor.java:95) at com.top_logic.base.accesscontrol.SessionService.sendEvent(SessionService.java:561) at com.top_logic.base.accesscontrol.SessionService.removeSession(SessionService.java:550) at com.top_logic.base.accesscontrol.SessionService.invalidateSession(SessionService.java:190) at com.top_logic.base.accesscontrol.SessionService.shutDown(SessionService.java:606) at com.top_logic.basic.module.ManagedClass.doStop(ManagedClass.java:129) at com.top_logic.basic.module.BasicRuntimeModule.shutDownImplementation(BasicRuntimeModule.java:240) at com.top_logic.basic.module.BasicRuntimeModule.shutDown(BasicRuntimeModule.java:214) at com.top_logic.basic.module.ModuleUtil.stop(ModuleUtil.java:589) at com.top_logic.basic.module.ModuleUtil$2.inContext(ModuleUtil.java:546) at com.top_logic.basic.thread.ThreadContextManager.inInteractionInternal(ThreadContextManager.java:322) at com.top_logic.basic.thread.ThreadContextManager.inSystemInteractionInternal(ThreadContextManager.java:348) at com.top_logic.basic.thread.ThreadContextManager.inSystemInteraction(ThreadContextManager.java:341) at com.top_logic.basic.module.ModuleUtil.stopInThreadContext(ModuleUtil.java:550) at com.top_logic.basic.module.ModuleUtil.shutDown(ModuleUtil.java:509) at com.top_logic.basic.module.ModuleUtil.shutDown(ModuleUtil.java:498) at com.top_logic.basic.module.ModuleUtil.internalRestart(ModuleUtil.java:369) at com.top_logic.basic.module.ModuleUtil.restart(ModuleUtil.java:352) at com.top_logic.layout.scripting.action.ServiceRestartAction$Op.processInternal(ServiceRestartAction.java:39) at ... Caused by: java.lang.IllegalStateException: com.top_logic.model.cache.TLModelCacheService not active! at com.top_logic.element.model.cache.ElementModelCacheService.getModelTables(ElementModelCacheService.java:43) at com.top_logic.element.changelog.KBChangeAnalzyer.reset(KBChangeAnalzyer.java:76) at com.top_logic.element.changelog.KBChangeAnalzyer.analyze(KBChangeAnalzyer.java:85) at com.top_logic.element.knowledge.ElementDBContext.createModelChangeSet(ElementDBContext.java:30) at com.top_logic.knowledge.service.db2.DefaultDBContext.handleSecurityUpdate(DefaultDBContext.java:1200) at com.top_logic.knowledge.service.db2.DefaultDBContext.commitTransaction(DefaultDBContext.java:786) ... 41 more
Both the SessionService and the ModelService are dependent on the KnowledgeBase. If the ModelService is shut down before the SessionService, this error occurs.
Code migration
- Configurations com.top_logic.base.accesscontrol.SessionService#excludeUIDs and com.top_logic.base.accesscontrol.SessionService#onlyOneSession have been dropped and must be removed.
- If com.top_logic.knowledge.monitor.UserMonitor#excludeIDs is configured, the SessionService must now be reconfigured instead: {{{
<config service-class="com.top_logic.base.accesscontrol.SessionService">
<instance>
<listeners>
<listener name="storeEvent">
<impl excludeUIDs="..." />
</listener>
</listeners>
</instance>
</config> }}}