AnsweredAssumed Answered

NullPointerException causes jobs to stop executing and ui to become unresponsive

Question asked by exp2345 on Jul 24, 2014
Latest reply on Sep 15, 2014 by jbarrez
I have the 15.1 "activiti-explorer.war" deployed in Tomcat 7 with the properties to enable the demo properties set to false and a MSSQL db configured.

I have a process that starts a number (testing with 100) processes using a multiple instance, sequential Java service task.

ProcessDefinition processDefinition = repositoryService
      Map<String, String> formProperties = new HashMap<String, String>();
      formProperties.put("key", value);

      ProcessInstance processInstance = formService
            .submitStartFormData(processDefinition.getId(), formProperties);

The "invoice" process is a series of async script tasks that sleep to simulate external api calls.

If I start this process and do nothing else with Explorer the 100 processes complete normally.

If I try to check on the status of the processes in "My instances" I will eventually get a NullPointerException (sometimes happens immediately upon opening My instances, sometimes I need to open a few instances before it happens. I have seen two different exceptions (see below), and they both seem related to the processInstance being null. The NPE isn't surprising as some of the instances will have completed and been removed from RU while the page loads.

I'm not sure where to start debugging the two problems of:
1) Activiti Explorer stops handling requests after the NPE. It will display the login page but never sends a response back after a login
2) The job executor stops running all jobs after the NPE (logging output from my tasks stop, db tables don't change)

Restarting Tomcat brings Activiti up into the same unresponsive state, and the only way I've found to bring it back is clearing out the RU and HI tables.

Does this have something to do with the configuration of the demo?

com.vaadin.event.ListenerMethod$MethodException: Invocation of method valueChange in org.activiti.explorer.ui.process.ProcessInstancePage$1 failed.
        at com.vaadin.event.ListenerMethod.receiveEvent(
        at com.vaadin.event.EventRouter.fireEvent(
        at com.vaadin.ui.AbstractComponent.fireEvent(

Caused by: java.lang.NullPointerException
        at org.activiti.explorer.ui.process.ProcessInstancePage$1.valueChange(
        at sun.reflect.GeneratedMethodAccessor181.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at com.vaadin.event.ListenerMethod.receiveEvent(
        … 33 more

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)