1 Reply Latest reply on Mar 5, 2009 11:09 AM by Ronald van Kuijk

    couldn't find process definition ERROR

    chuntao zhang Newbie

      I add JBPM to Hibernate ,spring and struts, but there is something wrong when I want to get the processdefinition from the database. the processdefinition has been deploied to the database.
      anybody help me???
      CODE:

      JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
      
       GraphSession graphSession = jbpmContext.getGraphSession();
      
       ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("hello");
       ProcessInstance instance = processDefinition.createProcessInstance();
       instance.signal();
       jbpmContext.save(instance);
      
       jbpmContext.close();

      ERROE
      javax.servlet.ServletException: couldn't find process definition 'hello'
       org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:535)
       org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:433)
       org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
       org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
       org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      
      
      root cause
      
      org.jbpm.JbpmException: couldn't find process definition 'hello'
       org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:157)
       com.ImportBusiness.struts.action.LoginAction.execute(LoginAction.java:102)
       org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:106)
       org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
       org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
       org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
       org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
       javax.servlet.http.HttpServlet.service(HttpServlet.java:802)