Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-5764

Using REST API to migrate instances without instructions is not null safe

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5.0, 7.5.0-alpha4
    • Component/s: engine
    • Labels:

      Description

      Steps to reproduce:
      Execute the following request:

      POST /migration/execute

      Request Body:

      {
        "migrationPlan":
          {
            "sourceProcessDefinitionId":"invoice:1:4c2ab4e2-008b-11e6-9075-68f7286be115",
            "targetProcessDefinitionId":"invoice:2:ddb898d7-008d-11e6-9075-68f7286be115",
            "instructions":[]
          },
        "processInstanceIds" : ["52d9856d-008b-11e6-9075-68f7286be115"]
      }
      

      Problem:
      A NullPointerException is thrown:

      2016-04-12 11:42:40.153:WARN:oejs.ServletHandler:/camunda/api/engine/engine/default/migration/execute
      java.lang.RuntimeException: java.lang.NullPointerException
              at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:61)
              at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
              at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
              at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
              at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
              at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
              at org.eclipse.jetty.server.Server.handle(Server.java:370)
              at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
              at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
              at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
              at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
              at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
              at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
              at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
              at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: 
      java.lang.NullPointerException
              at org.camunda.bpm.engine.rest.dto.migration.MigrationInstructionDto.from(MigrationInstructionDto.java:45)
              at org.camunda.bpm.engine.rest.dto.migration.MigratingActivityInstanceValidationReportDto.from(MigratingActivityInstanceValidationReportDto.java:70)
              at org.camunda.bpm.engine.rest.dto.migration.MigratingActivityInstanceValidationReportDto.from(MigratingActivityInstanceValidationReportDto.java:63)
              at org.camunda.bpm.engine.rest.dto.migration.MigratingProcessInstanceValidationReportDto.from(MigratingProcessInstanceValidationReportDto.java:63)
              at org.camunda.bpm.engine.rest.dto.migration.MigratingProcessInstanceValidationExceptionDto.from(MigratingProcessInstanceValidationExceptionDto.java:35)
              at org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler.toResponse(ProcessEngineExceptionHandler.java:78)
              at org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler.toResponse(ProcessEngineExceptionHandler.java:48)
              at org.jboss.resteasy.core.SynchronousDispatcher.executeExceptionMapper(SynchronousDispatcher.java:344)
              at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:373)
              at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:362)
              at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233)
              at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209)
              at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557)
              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
              at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
              at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
              at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
              at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:41)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
              at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilterSecure(SecurityFilter.java:67)
              at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilter(SecurityFilter.java:51)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
              at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:59)
              at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
              at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
              at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
      

        Activity

        roman.smirnov Smirnov Roman created issue -
        roman.smirnov Smirnov Roman made changes -
        Field Original Value New Value
        Description *Steps to reproduce:*
        Execute the following request:

        {{POST /migration/execute}}

        Request Body:
        {code}
        {
          "migrationPlan":
            {
              "sourceProcessDefinitionId":"invoice:1:4c2ab4e2-008b-11e6-9075-68f7286be115",
              "targetProcessDefinitionId":"invoice:2:ddb898d7-008d-11e6-9075-68f7286be115",
              "instructions":[]
            },
          "processInstanceIds" : ["52d9856d-008b-11e6-9075-68f7286be115"]
        }
        {code}

        *Problem:*
        A {{NullPointerException}} is thrown:
        {code}
        Apr 12, 2016 11:42:40 AM org.camunda.commons.logging.BaseLogger logError
        SEVERE: ENGINE-16004 Exception while closing command context: ENGINE-23004 Cannot migrate process instance '52d9856d-008b-11e6-9075-68f7286be115':
                Cannot migrate activity instance 'approveInvoice:52e7684e-008b-11e6-9075-68f7286be115':
                        There is no migration instruction for this instance's activity

        org.camunda.bpm.engine.migration.MigratingProcessInstanceValidationException: ENGINE-23004 Cannot migrate process instance '52d9856d-008b-11e6-9075-68f7286be115':
                Cannot migrate activity instance 'approveInvoice:52e7684e-008b-11e6-9075-68f7286be115':
                        There is no migration instruction for this instance's activity

                at org.camunda.bpm.engine.impl.migration.MigrationLogger.failingMigratingProcessInstanceValidation(MigrationLogger.java:60)
                at org.camunda.bpm.engine.impl.migration.MigrateProcessInstanceCmd.migrateProcessInstance(MigrateProcessInstanceCmd.java:109)
                at org.camunda.bpm.engine.impl.migration.MigrateProcessInstanceCmd.execute(MigrateProcessInstanceCmd.java:86)
                at org.camunda.bpm.engine.impl.migration.MigrateProcessInstanceCmd.execute(MigrateProcessInstanceCmd.java:64)
                at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
                at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:95)
                at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66)
                at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
                at org.camunda.bpm.engine.impl.migration.MigrationPlanExecutionBuilderImpl.execute(MigrationPlanExecutionBuilderImpl.java:49)
                at org.camunda.bpm.engine.rest.impl.MigrationRestServiceImpl.executeMigrationPlan(MigrationRestServiceImpl.java:62)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                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: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.invoke(SynchronousDispatcher.java:126)
                at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
                at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
                at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:41)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
                at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilterSecure(SecurityFilter.java:67)
                at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilter(SecurityFilter.java:51)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:59)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
                at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
                at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
                at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
                at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
                at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
                at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
                at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
                at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
                at org.eclipse.jetty.server.Server.handle(Server.java:370)
                at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
                at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
                at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
                at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
                at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
                at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
                at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
                at java.lang.Thread.run(Thread.java:745)

        Apr 12, 2016 11:42:40 AM org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler toResponse
        WARNING: org.camunda.bpm.engine.migration.MigratingProcessInstanceValidationException: ENGINE-23004 Cannot migrate process instance '52d9856d-008b-11e6-9075-68f7286be115':
                Cannot migrate activity instance 'approveInvoice:52e7684e-008b-11e6-9075-68f7286be115':
                        There is no migration instruction for this instance's activity

                at org.camunda.bpm.engine.impl.migration.MigrationLogger.failingMigratingProcessInstanceValidation(MigrationLogger.java:60)
                at org.camunda.bpm.engine.impl.migration.MigrateProcessInstanceCmd.migrateProcessInstance(MigrateProcessInstanceCmd.java:109)
                at org.camunda.bpm.engine.impl.migration.MigrateProcessInstanceCmd.execute(MigrateProcessInstanceCmd.java:86)
                at org.camunda.bpm.engine.impl.migration.MigrateProcessInstanceCmd.execute(MigrateProcessInstanceCmd.java:64)
                at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
                at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:95)
                at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:66)
                at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
                at org.camunda.bpm.engine.impl.migration.MigrationPlanExecutionBuilderImpl.execute(MigrationPlanExecutionBuilderImpl.java:49)
                at org.camunda.bpm.engine.rest.impl.MigrationRestServiceImpl.executeMigrationPlan(MigrationRestServiceImpl.java:62)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
                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: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.invoke(SynchronousDispatcher.java:126)
                at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
                at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
                at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:41)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
                at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilterSecure(SecurityFilter.java:67)
                at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilter(SecurityFilter.java:51)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:59)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
                at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
                at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
                at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
                at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
                at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
                at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
                at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
                at org.eclipse.jetty.server.Server.handle(Server.java:370)
                at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
                at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
                at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
                at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
                at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
                at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
                at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
                at java.lang.Thread.run(Thread.java:745)

        2016-04-12 11:42:40.153:WARN:oejs.ServletHandler:/camunda/api/engine/engine/default/migration/execute
        java.lang.RuntimeException: java.lang.NullPointerException
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:61)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
                at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
                at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
                at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
                at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
                at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
                at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
                at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
                at org.eclipse.jetty.server.Server.handle(Server.java:370)
                at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
                at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
                at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
                at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
                at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
                at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
                at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
                at java.lang.Thread.run(Thread.java:745)
        Caused by:
        java.lang.NullPointerException
                at org.camunda.bpm.engine.rest.dto.migration.MigrationInstructionDto.from(MigrationInstructionDto.java:45)
                at org.camunda.bpm.engine.rest.dto.migration.MigratingActivityInstanceValidationReportDto.from(MigratingActivityInstanceValidationReportDto.java:70)
                at org.camunda.bpm.engine.rest.dto.migration.MigratingActivityInstanceValidationReportDto.from(MigratingActivityInstanceValidationReportDto.java:63)
                at org.camunda.bpm.engine.rest.dto.migration.MigratingProcessInstanceValidationReportDto.from(MigratingProcessInstanceValidationReportDto.java:63)
                at org.camunda.bpm.engine.rest.dto.migration.MigratingProcessInstanceValidationExceptionDto.from(MigratingProcessInstanceValidationExceptionDto.java:35)
                at org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler.toResponse(ProcessEngineExceptionHandler.java:78)
                at org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler.toResponse(ProcessEngineExceptionHandler.java:48)
                at org.jboss.resteasy.core.SynchronousDispatcher.executeExceptionMapper(SynchronousDispatcher.java:344)
                at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:373)
                at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:362)
                at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233)
                at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209)
                at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557)
                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
                at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
                at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
                at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:41)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
                at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilterSecure(SecurityFilter.java:67)
                at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilter(SecurityFilter.java:51)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:59)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
                at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
        {code}
        *Steps to reproduce:*
        Execute the following request:

        {{POST /migration/execute}}

        Request Body:
        {code}
        {
          "migrationPlan":
            {
              "sourceProcessDefinitionId":"invoice:1:4c2ab4e2-008b-11e6-9075-68f7286be115",
              "targetProcessDefinitionId":"invoice:2:ddb898d7-008d-11e6-9075-68f7286be115",
              "instructions":[]
            },
          "processInstanceIds" : ["52d9856d-008b-11e6-9075-68f7286be115"]
        }
        {code}

        *Problem:*
        A {{NullPointerException}} is thrown:
        {code}
        2016-04-12 11:42:40.153:WARN:oejs.ServletHandler:/camunda/api/engine/engine/default/migration/execute
        java.lang.RuntimeException: java.lang.NullPointerException
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:61)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
                at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1476)
                at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:499)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
                at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
                at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)
                at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
                at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
                at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
                at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020)
                at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
                at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
                at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)
                at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
                at org.eclipse.jetty.server.Server.handle(Server.java:370)
                at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
                at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
                at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
                at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
                at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
                at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
                at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
                at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
                at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
                at java.lang.Thread.run(Thread.java:745)
        Caused by:
        java.lang.NullPointerException
                at org.camunda.bpm.engine.rest.dto.migration.MigrationInstructionDto.from(MigrationInstructionDto.java:45)
                at org.camunda.bpm.engine.rest.dto.migration.MigratingActivityInstanceValidationReportDto.from(MigratingActivityInstanceValidationReportDto.java:70)
                at org.camunda.bpm.engine.rest.dto.migration.MigratingActivityInstanceValidationReportDto.from(MigratingActivityInstanceValidationReportDto.java:63)
                at org.camunda.bpm.engine.rest.dto.migration.MigratingProcessInstanceValidationReportDto.from(MigratingProcessInstanceValidationReportDto.java:63)
                at org.camunda.bpm.engine.rest.dto.migration.MigratingProcessInstanceValidationExceptionDto.from(MigratingProcessInstanceValidationExceptionDto.java:35)
                at org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler.toResponse(ProcessEngineExceptionHandler.java:78)
                at org.camunda.bpm.engine.rest.exception.ProcessEngineExceptionHandler.toResponse(ProcessEngineExceptionHandler.java:48)
                at org.jboss.resteasy.core.SynchronousDispatcher.executeExceptionMapper(SynchronousDispatcher.java:344)
                at org.jboss.resteasy.core.SynchronousDispatcher.unwrapException(SynchronousDispatcher.java:373)
                at org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:362)
                at org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:233)
                at org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:209)
                at org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:557)
                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:524)
                at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:126)
                at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
                at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
                at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
                at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1496)
                at org.camunda.bpm.engine.rest.filter.CacheControlFilter.doFilter(CacheControlFilter.java:41)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
                at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilterSecure(SecurityFilter.java:67)
                at org.camunda.bpm.webapp.impl.security.filter.SecurityFilter.doFilter(SecurityFilter.java:51)
                at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1484)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:59)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter$1.execute(AuthenticationFilter.java:56)
                at org.camunda.bpm.webapp.impl.security.SecurityActions.runWithAuthentications(SecurityActions.java:38)
                at org.camunda.bpm.webapp.impl.security.auth.AuthenticationFilter.doFilter(AuthenticationFilter.java:56)
        {code}
        sebastian.menski Sebastian Menski made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        sebastian.menski Sebastian Menski made changes -
        Assignee Sebastian Menski [ sebastian.menski ]
        sebastian.menski Sebastian Menski made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Original Estimate 0 minutes [ 0 ]
        Remaining Estimate 0 minutes [ 0 ]
        Assignee Sebastian Menski [ sebastian.menski ] Smirnov Roman [ roman.smirnov ]
        Resolution Fixed [ 1 ]
        roman.smirnov Smirnov Roman made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        meyer Daniel Meyer made changes -
        Fix Version/s 7.5.0-alpha4 [ 14593 ]
        thorben.lindhauer Thorben Lindhauer made changes -
        Workflow camunda BPM [ 38240 ] Backup_camunda BPM [ 61396 ]

          People

          • Assignee:
            roman.smirnov Smirnov Roman
            Reporter:
            roman.smirnov Smirnov Roman
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development