0 Replies Latest reply on Oct 11, 2006 7:37 AM by Ricky Donner

    Change Db location problem!

    Ricky Donner Newbie

      Hi

      I have jBPM working in a db named 'jbpm'. But this week i need to change the db location to 'xMind' that already have another tables.
      Here's my action sequence:

      1. Changed in config-files folder the file hibernate.cfg.xml
      2. Changed in config-files folder the hibernate.properties
      3. Changed in jbpm.sar.cfg.jar the file hibernate.cfg.xml

      In this three changes i alter the connection url from jdbc:mysql://localhost:3306/jbpm to jdbc:mysql://localhost:3306/xMind

      When i execute this code:

      jbpmConfiguration.dropSchema();
      jbpmConfiguration.createSchema();
      deployProcessDefinition(processDefinition);

      i have the new tables in the xMind DB with my new Process Definition. Great! but when i do this code in other part of my app:

      ...
      JbpmContext jc = jbpmConfiguration.getInstance().createJbpmContext();
      try {
      GraphSession gs = jc.getGraphSession();
      ProcessDefinition pd = gs.findLatestProcessDefinition(name);

      ...

      returns this error in method findLatestProcessDefinition():

      Unknown database 'jbpm' - Cannot open connection


      Why? If i change the name in the config files? is it another place to do some changes?


      Thanks in advance!