Created attachment 918147 [details] [0] reproducer Description of problem: If you try to retrieve FactHandle for an object which is **not** present in the KnowledgeSession this fact handle will not have null value. There, if you call if (handle!=null) ksession.update(handle,object); you will receive NPE Version-Release number of selected component (if applicable): How reproducible: always Steps to Reproduce: 1. Just execute the reproducer with the Drools 6 libraries - i.e. knowledge-api legacy adapter Actual results: FactHandle handle = ksession.getFactHandle(msg1); handle is not null even if the msg1 object is NOT present in the session. Expected results: FactHandle handle = ksession.getFactHandle(msg1); handle should be null if the msg1 object is not present in the session Additional info: Root cause seems to be the missing nullcheck in the following method https://github.com/droolsjbpm/drools/blob/master/knowledge-api-legacy5-adapter/src/main/java/org/drools/impl/adapters/WorkingMemoryEntryPointAdapter.java#L47
Fixed by https://github.com/droolsjbpm/drools/commit/386dce144
Verified with BRMS 6.1.0.DR3.