3 Replies Latest reply on Jul 28, 2014 9:50 AM by Danesh Karimi

    Null Pointer Exception on xml parsing

    Diego Bramati Newbie

      Hi,

       

      I'm facing a strange problem with jbpm 6.0.1 Final. I have wrote a jbpm process using BPM2 modeler plugin for eclipse. If i try to launch my process throught a unit test using the utility methods defined in JbpmJUnitBaseTestCase class i found process compiles and runs correctly. This is my test method to simply verify process execution

       

      KieHelper kieHelper = new KieHelper();

      HashMap<String, ResourceType> resourcesMap = new HashMap<String, ResourceType>();

      resourcesMap.put("it\\telecomitalia\\fms\\fraud\\generator\\bpm\\aggiornaAnagrafica.bpmn", ResourceType.BPMN2);

      createRuntimeManager(resourcesMap);

      RuntimeEngine runtimeEngine = getRuntimeEngine();

      KieSession ksession = runtimeEngine.getKieSession();

      ProcessInstance processInstance = ksession.startProcess("it.telecomitalia.fms.fraud.generator.bpm.aggiornaAnagrafica");

      assertProcessInstanceCompleted(processInstance.getId(), ksession);

       

      If i try to deploy my application an load the same process on startup adding it throught the KieHelper APIs this way

       

      KieHelper kieHelper = new KieHelper();

      kieHelper.addResource(ResourceFactory.newClassPathResource(<resource_path>));

      KieBase kieBase = kieHelper.build();

       

      it seems i have problem on process compilation. Inspecting the application server log i found an NPE exception without no evidence of which problem has occurred

       

      java.lang.RuntimeException: java.lang.RuntimeException: [Message [id=1, level=ERROR, path=it/telecomitalia/fms/fraud/generator/bpm/aggiornaAnagrafica.bpmn, line=-1, column=0

         text=unable to parse xml : Exception class java.lang.NullPointerException : null]

       

      Someone has faced the same problem and could help me? I have attached the bpmn file.

      Thanks!