problem is that you try to use (probably by mistake) a disposed session:
// Let's reload the session
StatefulKnowledgeSession loadedKsession = JPAKnowledgeService.loadStatefulKnowledgeSession(sessionId, kbase, null, env);
// All the listeners and WorkItemHandlers are volatile, so we need to register them each time that we reload the session
// from the DB.
LocalHTWorkItemHandler localHTWorkItemHandler2 = new LocalHTWorkItemHandler(client, ksession);
ksession (marked in bold) is disposed session and thus should not be used any more. Use instead session that you just loaded (loadedKsession) and the program will work just fine.
HTH