2 Replies Latest reply: Apr 6, 2012 9:56 AM by 928882 RSS

    null pointor exception in Activity when excuted the activity from PAPI

    928882
      Hi All,

      I am using the OBPM Stand alone 10g. and weblogic 10g

      I am using the following code to create a instance.

                Properies configuration = new Properties();
                     configuration.setProperty(ProcessService.DIRECTORY_ID,
                               "Default");

                     configuration.setProperty(
                                    ProcessService.DIRECTORY_PROPERTIES_FILE,
                                    PropertyFileReader.getBpmDirectoryPath());
                          configuration.setProperty(ProcessService.WORKING_FOLDER,
                                    PropertyFileReader.getBpmWorkingFolder());
      Arguments arguments = Arguments.create();
           arguments.putArgument("i_ResourceReqstProcRequestArg",resourceRequest);
                     InstanceInfo ins = session.processCreateInstance("ResourceRequestAutomationProcess", arguments);

                     System.out.println("instance creation is successful"+ins.getInstanceIn());

      Process instance is getting intilized succefully but unfortunatly the object is in null in the first automatic object. I am getting the following exception in the



      fuego.papi.exception.TaskFailedException: Task '0' in activity '/ResourceRequestAutomationProcess#Default-1.0/Interactive[GetResourceRequest]' for instance '/ResourceRequestAutomationProcess#Default-1.0/30/0' could not be successfully executed. The task failed while executing method 'getResourceRequ
      est'.
      at fuego.papi.exception.TaskFailedException.create(TaskFailedException.java:57)
      at fuego.server.AbstractProcessBean.createTaskFailedException(AbstractProcessBean.java:3594)
      at fuego.fengine.FEngineProcessBean.createTaskFailedException(FEngineProcessBean.java:398)
      at fuego.server.AbstractProcessBean.runTask(AbstractProcessBean.java:3207)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
      at fuego.lang.JavaObject.invoke(JavaObject.java:227)
      at fuego.component.Message.process(Message.java:585)
      at fuego.component.ExecutionThread.processMessage(ExecutionThread.java:780)
      at fuego.component.ExecutionThread.processBatch(ExecutionThread.java:755)
      at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:142)
      at fuego.component.ExecutionThread.doProcessBatch(ExecutionThread.java:134)
      at fuego.fengine.FEngineProcessBean.processBatch(FEngineProcessBean.java:244)
      at fuego.component.ExecutionThread.work(ExecutionThread.java:839)
      at fuego.component.ExecutionThread.run(ExecutionThread.java:408)
      at fuego.component.CustomExecution.next(CustomExecution.java:176)
      at fuego.papi.impl.rmi.RMIExecution.next(RMIExecution.java:109)
      at fuego.papi.impl.ProcessInstanceOperation.runActivity(ProcessInstanceOperation.java:721)
      at fuego.papi.impl.ProcessServiceSessionImpl.activityExecute(ProcessServiceSessionImpl.java:1559)
      at fuego.papi.impl.ProcessServiceSessionImpl.activityExecute(ProcessServiceSessionImpl.java:1498)
      at fuego.papi.impl.ProcessServiceSessionImpl.activityExecute(ProcessServiceSessionImpl.java:1519)
      at com.capitalone.resourcerequest.services.BPMSServiceImpl.invokeBPM(BPMSServiceImpl.java:116)
      at com.capitalone.resourcerequest.dao.NonAssociateDaoImpl.saveResource(NonAssociateDaoImpl.java:43)
      at com.capitalone.resourcerequest.services.NonAssociateServiceImpl.saveResource(NonAssociateServiceImpl.java:188)
      at com.capitalone.resourcerequest.controllers.ContractorNewRequestController.onSubmit(ContractorNewRequestController.java:114)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:175)
      at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:421)
      at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:409)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:774)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
      at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:560)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
      Caused by: fuego.lang.ComponentExecutionException: The method 'CIL_getResourceRequest' from class 'oracle.ResourceRequestAutomationProcess.Default_1_0.Instance' could not be successfully executed.
      at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:519)
      at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:273)
      at fuego.fengine.FEEngineExecutionContext.invokeMethodAsCil(FEEngineExecutionContext.java:219)
      at fuego.server.execution.EngineExecutionContext.runCil(EngineExecutionContext.java:1284)
      at fuego.server.execution.TaskExecution.invoke(TaskExecution.java:401)
        • 1. Re: null pointor exception in Activity when excuted the activity from PAPI
          Daniel Atwood
          Where you have
          Arguments arguments = Arguments.create();
          arguments.putArgument("i_ResourceReqstProcRequestArg",resourceRequest);
          InstanceInfo ins = session.processCreateInstance("ResourceRequestAutomationProcess", arguments);
          Assuming there is a value assigned to the "resourceRequest" upstream in your code and assuming you left the name of the Begin input mapping set to the default ("BeginIn"), you might want to try:
          String argumentName = "BeginIn";
          Object argumentValue = new Object();
          Arguments arguments = Arguments.create(); 
          arguments.putArgument("i_ResourceReqstProcRequestArg",resourceRequest);
          arguments.putArgument(argumentName, argumentValue);
          InstanceInfo ins =session.processCreateInstance("/ResourceRequestAutomationProcess", argumentName, arguments);
          Dan
          • 2. Re: null pointor exception in Activity when excuted the activity from PAPI
            928882
            Hi Dan,

            Thanks for the reply and it was very helpful and that worked out well for me.

            Now I am facing the same error which I have mentioned in earlier in the thread, while executing the intercative activity from web layer.

            When I have tired the same with the plain java class it works fine but unfortunatly I am unable to execute the same from the spring mvc frame work.

            This is snippet


            ins = session.processGetInstance(resourceRequest.getInstanceId());
            ins = session.activityExecute("GetResourceRequest", ins.getId(),arguments);

            Thanks in advance.