I notice that you are starting two different processes:
ProcessInstance instance = session.startProcess("bpmn.applyLeave",params);
and
ProcessInstance instance = session.startProcess("com.sample.humantask", params);
Which one is the failing one?
It's impossible to help if we don't have accuarate data to look at. Can you please create an isolated test that shows the problem and share the maven project to run it?
Cheers