Set of process instance ids is empty Warning. In which cases these kind of error occurs?

In what kind of scenario the following issue happen?

WARNING: org.camunda.bpm.engine.ProcessEngineException: Set of process instance ids is empty
	at sun.reflect.GeneratedConstructorAccessor112.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:283)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:115)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:108)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:98)
	at org.camunda.bpm.engine.impl.HistoricProcessInstanceQueryImpl.processInstanceIds(HistoricProcessInstanceQueryImpl.java:79)
	at org.camunda.bpm.engine.rest.dto.history.HistoricProcessInstanceQueryDto.applyFilters(HistoricProcessInstanceQueryDto.java:215)
	at org.camunda.bpm.engine.rest.dto.history.HistoricProcessInstanceQueryDto.applyFilters(HistoricProcessInstanceQueryDto.java:38)
	at org.camunda.bpm.engine.rest.dto.AbstractQueryDto.toQuery(AbstractQueryDto.java:189)
	at org.camunda.bpm.engine.rest.impl.history.HistoricProcessInstanceRestServiceImpl.queryHistoricProcessInstances(HistoricProcessInstanceRestServiceImpl.java:54)
	at sun.reflect.GeneratedMethodAccessor364.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:167)
	at org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
	at org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
	at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:159)
	at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:107)
	at org.jboss.resteasy.core.ResourceLocator.invokeOnTargetObject(ResourceLocator.java:154)
	at org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:92)
	at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:542)
	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
	at org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:169)
	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:212)
	at org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:59)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:41)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

Hi,

on calling the HistoricProcessInstanceQueryImpl#processInstanceIds with an empty set of process instance id’s,
see here.

As you can see and find out by yourself on the posted stack trace.

WARNING: org.camunda.bpm.engine.ProcessEngineException: Set of process instance ids is empty
	at sun.reflect.GeneratedConstructorAccessor112.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.generateException(EnsureUtil.java:283)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:115)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:108)
	at org.camunda.bpm.engine.impl.util.EnsureUtil.ensureNotEmpty(EnsureUtil.java:98)
	at org.camunda.bpm.engine.impl.HistoricProcessInstanceQueryImpl.processInstanceIds(HistoricProcessInstanceQueryImpl.java:79)
1 Like

@Zelldon Camunda engine itself calling the Historic Instances. How to prevent this kind of error?

How does the request body of your REST request look like?

@thorben REST API is like getting a history of the process by using the following API. https://docs.camunda.org/manual/7.3/api-references/rest/#history-get-process-instances-post

Not sure I understand your answer. When you use that REST API method, you are sending JSON (for instance see the example on the docs page). What does that JSON look like in your case?

@thorben The request body with a json array with process instance id’s for the variable “processinstanceids”.

{
	"processInstanceIds":["h02edbgc-a927-11e7-b182-066b1ce7ce7e","9f47c2bc-3bd2-11e7-811c-0687f8408349"],
	"taskName":"UserTask_1",
	"unfinished":"true"
}

Which Camunda version do you use?

@thorben Camunda version is 7.3

Hm, works fine for me with a fresh Tomcat 7.3 installation.

  • Are you sure this is the request body you sent?
  • Could you please give exact steps to reproduce the issue?