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

        There are no comments yet on this issue.

          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