When using MigrationManager api in a Kie-Spring application, the following stacktrace is seen:
08:51:37,341 ERROR [stderr] (http-127.0.0.1:8080-1) java.lang.NullPointerException 08:51:37,341 ERROR [stderr] (http-127.0.0.1:8080-1) at org.jbpm.runtime.manager.impl.migration.MigrationManager.migrate(MigrationManager.java:230) 08:51:37,341 ERROR [stderr] (http-127.0.0.1:8080-1) at org.jbpm.runtime.manager.impl.migration.MigrationManager.migrate(MigrationManager.java:102) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at org.jbpm.kie.services.impl.admin.ProcessInstanceMigrationServiceImpl.migrate(ProcessInstanceMigrationServiceImpl.java:46) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at org.jbpm.spring.web.MigrationController.performMigration(MigrationController.java:61) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at java.lang.reflect.Method.invoke(Method.java:498) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745) 08:51:37,342 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:685) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:919) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:851) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:953) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:844) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:829) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) 08:51:37,343 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) 08:51:37,344 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330) 08:51:37,344 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118) 08:51:37,344 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84) 08:51:37,344 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,344 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113) 08:51:37,344 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,344 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103) 08:51:37,345 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,345 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113) 08:51:37,345 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,345 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154) 08:51:37,345 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,345 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45) 08:51:37,345 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,345 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150) 08:51:37,346 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,346 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:155) 08:51:37,346 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,346 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199) 08:51:37,346 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,346 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110) 08:51:37,346 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,346 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50) 08:51:37,347 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106) 08:51:37,347 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,347 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87) 08:51:37,347 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342) 08:51:37,348 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192) 08:51:37,348 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160) 08:51:37,348 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343) 08:51:37,348 ERROR [stderr] (http-127.0.0.1:8080-1) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260) 08:51:37,348 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) 08:51:37,348 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) 08:51:37,348 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) 08:51:37,349 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) 08:51:37,349 ERROR [stderr] (http-127.0.0.1:8080-1) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) 08:51:37,349 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) 08:51:37,349 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) 08:51:37,349 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) 08:51:37,349 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) 08:51:37,350 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) 08:51:37,350 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:656) 08:51:37,350 ERROR [stderr] (http-127.0.0.1:8080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) 08:51:37,350 ERROR [stderr] (http-127.0.0.1:8080-1) at java.lang.Thread.run(Thread.java:745)
This appears to be due to a ClassCastException in TransactionManagerFactory.get().newTransactionManager(env), from Spring's JtaTransactionManager to javax.transaction.TransactionManager. Other components of the KIE services wrap the Spring txm when initializing (SingleSessionCommandService and TaskTransactionInterceptor), but MigrationManager does not.
- is cloned by
-
RHBPMS-4657 [GSS](6.4.z) MigrationManager API throws NPE when used in Kie-Spring environment
- Verified