-
1. Re: SQL error executing test process
jbarrez Jul 3, 2009 4:49 AM (in response to ajvarela)ould you post this unit test?
-
2. Re: SQL error executing test process
ajvarela Jul 3, 2009 5:25 AM (in response to ajvarela)Im using this test:
public class workflowTest extends JbpmTestCase { long deploymentDbid; //Variables Integer A = 1; Integer B = 1; Integer C = 0; Integer D = 1; Integer E = 1; Integer F = 1; protected void setUp() throws Exception { super.setUp(); deploymentDbid = repositoryService.createDeployment() .addResourceFromClasspath( "org/workflow/quivir/workflowSumMul.jpdl.xml").deploy(); } protected void tearDown() throws Exception { repositoryService.deleteDeploymentCascade(deploymentDbid); super.tearDown(); } public void testWorkflowProcess() { Map<String, Integer> variables = new HashMap<String, Integer>(); // Entradas variables.put("a", A); variables.put("b", B); variables.put("c", C); variables.put("d", D); variables.put("e", E); variables.put("f", F); ProcessInstance processInstance = executionService .startProcessInstanceByKey("workflowSumMul", variables); } }
I have detected that the problem occur in the tearDown method when super.tearDown() is called. -
3. Re: SQL error executing test process
shekharv Jul 4, 2009 9:08 PM (in response to ajvarela)Does not seem to be a jbpm error per se. If anything the create-drop hibernate config option that you likely have in your jbpm.hibernate.cfg.xml seems to the root cause. Try not recreating the schema everytime you run the test case and it 'should' go away.
This could mean though that the jbpm mysql sql script files might need to be changed a little? But again it is only in the test case world that you would recreate the tables everytime.
http://bugs.mysql.com/bug.php?id=21395 -
4. Re: SQL error executing test process
kukeltje Jul 5, 2009 8:05 AM (in response to ajvarela)could also be caused by a wrong dialect (afair, I've had the same thing before once, though not jBPM related)
-
5. Re: SQL error executing test process
ajvarela Jul 8, 2009 7:54 AM (in response to ajvarela)Thank you all for replies.
I dont know how I can prevent the recreation of DB schema. I have tried comment the tearDown mehod code and the test run well but
residual information is saved on DB when I reactive the tearDown code the error appear again.
This is my config for MySQL. Is correct dialect??<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property> <property name="hibernate.connection.username">root</property> <property name="hibernate.connection.password">*********</property> <property name="hibernate.format_sql">true</property>
-
6. Re: SQL error executing test process
kukeltje Jul 8, 2009 10:12 AM (in response to ajvarela)Dialect is correct.
recreation of