AnsweredAssumed Answered

ExceptionInInitializerError when attempting to create Unit Test

Question asked by wesg on Aug 31, 2016
Latest reply on Sep 1, 2016 by martin.grofcik
The following code throws an java.lang.ExceptionInInitializerError exception on the first line of code within the test method.  Any suggestions on how to resolve this issue or direction is appreciated.  I verified that the class activitiRule instance is not null.  I also tested that the value returned from the getRuntimeService method doesn't result in null.  The problem appears to be when it calls the startProcessInstanceByKey method, the last line of the stack trace is: "at<init>(".

public class MyUnitTest
   public ActivitiRule activitiRule = new ActivitiRule();

   @Deployment( resources = {"VacationRequest.bpmn20.xml"} )
   public void test()
      ProcessInstance processInstance = activitiRule.getRuntimeService().startProcessInstanceByKey("vacationRequest");
      Task task = activitiRule.getTaskService().createTaskQuery().singleResult();
      assertEquals( "Activiti is awesome", task.getName() );