cancel
Showing results for 
Search instead for 
Did you mean: 

why i could not delete this job?

activitilover
Champ in-the-making
Champ in-the-making
when i tried to delete this job with rest-api,i got the error message,how to solve this problem?

java.lang.NullPointerException
   org.activiti.engine.impl.persistence.entity.JobEntity.delete(JobEntity.java:125)
   org.activiti.engine.impl.cmd.CancelJobCmd.execute(CancelJobCmd.java:26)
   org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
   org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
   org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
   org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
   org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
   org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
   org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
   org.activiti.engine.impl.ManagementServiceImpl.deleteJob(ManagementServiceImpl.java:69)
   org.activiti.rest.service.api.management.JobResource.deleteJob(JobResource.java:60)
   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   java.lang.reflect.Method.invoke(Method.java:483)
   org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
   org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
   org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
   org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
   org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
   org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
   org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
   org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
   org.springframework.web.servlet.FrameworkServlet.doDelete(FrameworkServlet.java:885)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:652)
   org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
   org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
   org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)
   org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
   org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
   org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
   org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
   org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
   org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
   org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
1 REPLY 1

vasile_dirla
Star Contributor
Star Contributor
I think somehow Context.getCommandContext() is null,
you could start investigate around this line: JobEntity.java:125 as you can see in the log.

will be nice if you can provide a unit test for it so that other people could reproduce and investigate it too.