Can you give a try with following tag:
<kbase name="KBase" default="true" packages="*">
<ksession name="KSession" type="stateful" default="true"/>
I ended up having to setup my development environment again for other reasons, and it works with the original configuration now. Thanks for the suggestion, I'll try the changes if I start seeing the error again. The kbase and ksession is still a bit confusing, do I always need to specify a ksession if I specify a kbase? Will there be issues if multiple projects use same kbase and ksession names?