org.activiti.engine.ActivitiIllegalArgumentException: taskId is null when using taskService.addComment with process instance

Description

I'm upgrading activiti from 5.10 to 5.12, executing the following code throws this exception:

taskService.addComment(null, processInstanceId, comment);

Before the update it worked.

ERROR: org.activiti.engine.impl.interceptor.CommandContext - Error while closing command context
org.activiti.engine.ActivitiIllegalArgumentException: taskId is null
at org.activiti.engine.impl.cmd.NeedsActiveTaskCmd.execute(NeedsActiveTaskCmd.java:45) ~[activiti-engine-5.12.jar:5.12]
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24) ~[activiti-engine-5.12.jar:5.12]
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61) ~[activiti-engine-5.12.jar:5.12]
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42) [activiti-spring-5.12.jar:na]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) [org.springframework.transaction_3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40) [activiti-spring-5.12.jar:na]
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31) [activiti-engine-5.12.jar:5.12]
at org.activiti.engine.impl.TaskServiceImpl.addComment(TaskServiceImpl.java:261) [activiti-engine-5.12.jar:5.12]
at com.softmodeler.workflow.service.impl.WorkflowService.start(WorkflowService.java:210) [com.softmodeler.workflow/:na]
at com.softmodeler.workflow.service.impl.WorkflowService.startWorkflow(WorkflowService.java:184) [com.softmodeler.workflow/:na]
at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_17]
at org.eclipse.riena.communication.core.hooks.AbstractHooksProxy.invoke(AbstractHooksProxy.java:69) [org.eclipse.riena.communication.core_3.0.0.v20110614_3_0_0_0.jar:na]
at org.eclipse.riena.communication.core.hooks.AbstractHooksProxy.invoke(AbstractHooksProxy.java:38) [org.eclipse.riena.communication.core_3.0.0.v20110614_3_0_0_0.jar:na]
at org.eclipse.riena.internal.communication.publisher.ServiceHooksProxy.invoke(ServiceHooksProxy.java:73) [org.eclipse.riena.communication.publisher_3.0.0.v20110614_3_0_0_0.jar:na]
at com.sun.proxy.$Proxy175.startWorkflow(Unknown Source) [na:na]
at sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_17]
at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_17]
at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:182) [com.caucho.hessian_3.2.0.0.jar:na]
at com.caucho.hessian.server.HessianSkeleton.invoke(HessianSkeleton.java:109) [com.caucho.hessian_3.2.0.0.jar:na]
at org.eclipse.riena.communication.publisher.hessian.RienaHessianDispatcherServlet.service(RienaHessianDispatcherServlet.java:178) [org.eclipse.riena.communication.publisher.hessian_3.0.0.v20110614_3_0_0_0.jar:na]
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:671) [org.eclipse.jetty.servlet_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1436) [org.eclipse.jetty.servlet_9.0.0.RC2.jar:9.0.0.RC2]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:119) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at com.softmodeler.windows.server.security.SoftmodelerWindowsPreAuthenticationProcessingFilter.doFilter(SoftmodelerWindowsPreAuthenticationProcessingFilter.java:52) [com.softmodeler.windows.server/:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at com.softmodeler.windows.server.security.NegotiateSecurityFilter.doFilter(NegotiateSecurityFilter.java:132) [com.softmodeler.windows.server/:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149) [org.springframework.security.web_3.0.2.RELEASE.jar:na]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [org.springframework.web_3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [org.springframework.web_3.0.5.RELEASE.jar:3.0.5.RELEASE]
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1407) [org.eclipse.jetty.servlet_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:446) [org.eclipse.jetty.servlet_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:138) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:564) [org.eclipse.jetty.security_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:213) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1070) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:375) [org.eclipse.jetty.servlet_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:175) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1004) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:136) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.Server.handle(Server.java:449) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:246) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:265) [org.eclipse.jetty.server_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.run(AbstractConnection.java:240) [org.eclipse.jetty.io_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:589) [org.eclipse.jetty.util_9.0.0.RC2.jar:9.0.0.RC2]
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:520) [org.eclipse.jetty.util_9.0.0.RC2.jar:9.0.0.RC2]
at java.lang.Thread.run(Thread.java:722) [na:1.7.0_17]

Environment

None

Assignee

Joram Barrez

Reporter

Flavio Donze

Labels

None

Fix versions

Priority

Major
Configure