AnsweredAssumed Answered

Source not found while deploy process

Question asked by simonetogno on May 26, 2011
Latest reply on May 26, 2011 by frederikheremans1
Hi this is my simple code



public void init(ServletConfig config) throws ServletException {
super.init(config);
processEngine = ProcessEngines.getDefaultProcessEngine();
}


protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    PrintWriter out = response.getWriter();

    RepositoryService repositoryService = processEngine.getRepositoryService();
    RuntimeService runtimeService = processEngine.getRuntimeService();

    Deployment deployment = repositoryService.createDeployment().addClasspathResource("C:/Users/Simone/workspace/ProvaNewDesigner/target/classes/diagrams/bpmn2_diagram.bpmn20.xml").deploy();

    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("helloworld");

    out.println("Started Process instance id " +processInstance.getProcessInstanceId());

}

when program perform this operation

Deployment deployment = repositoryService.createDeployment().addClasspathResource("C:/Users/Simone/workspace/ProvaNewDesigner/target/classes/diagrams/bpmn2_diagram.bpmn20.xml").deploy();

I' get the follow exception


GRAVE: Servlet.service() for servlet [ThisService] in context with path [/SimpleTry] threw exception
org.activiti.engine.ActivitiException: resource "C:/Users/Simone/workspace/ProvaNewDesigner/target/classes/diagrams/bpmn2_diagram.bpmn20.xml" not found
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.addClasspathResource(DeploymentBuilderImpl.java:58)
   at ThisService.doGet(ThisService.java:45)


26-mag-2011 15.15.38 org.activiti.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
26-mag-2011 15.15.38 org.activiti.engine.ProcessEngines initProcessEnginFromResource
INFO: initialised process engine default
26-mag-2011 15.15.38 org.activiti.engine.impl.jobexecutor.JobAcquisitionThread run
INFO: JobAcquisitionThread starting to acquire jobs
This is the operation that it can perform
(i don't now if it can be helpful)


excluding the path is uncorrect, what can be the reason of this exception?

Best regards

Outcomes