[jboss-user] [jBPM] - Re: Error - Table 'jbpm5.task' doesn't exist after trying to set mysql db

Heiko Barthel do-not-reply at jboss.com
Tue Jun 26 18:28:36 EDT 2012


Heiko Barthel [https://community.jboss.org/people/hbarthel] created the discussion

"Re: Error - Table 'jbpm5.task' doesn't exist after trying to set mysql db"

To view the discussion, visit: https://community.jboss.org/message/744398#744398

--------------------------------------------------------------
1st, but this is not the problem: the "task-service/resources/META-INF/persistence.xml" contains some duplicate classes: <class>org.jbpm.task.Comment</class> and <class>org.jbpm.task.Deadline</class>
This is still in 5.4-SNAPSHOT the case... Maybe one of the developers wants to fix it one day.

2nd, You'll see the problem if you look at "task-service/resources/*war*/persistence.xml"
Per default the datasource "java:jboss/datasources/jbpmDS" (pointing to jbpm5 if you configured it according to the docu) is used which is wrong, you need to change this file that it points to your "task" schema.
That's why I added another datasource in JBoss:
                 <datasource jndi-name="java:jboss/datasources/*taskDS*" pool-name="H2DS" enabled="true" use-java-context="true">
                    <connection-url>jdbc:mysql://localhost:3306/task</connection-url>
                    <driver>mysql</driver>
                    <pool></pool>
                    <security>
                       <user-name>task</user-name>
                       <password>task</password>
                    </security>
                </datasource>
... and use this one in the "persistence.xml" of the task server. If you didn't change it upfront you have a mixture of jbpm5 and task DDL in your jbpm5 schema. If it's the case drop all tables in jbpm5 schema, then run "ant clean.demo", "ant install.demo.db" and "ant start.demo.db"

Maybe you also wanna change the "persistence.xml" in "jbpm-human-task-war-5.3.0.Final.war".

Why are there so many "persistence.xml" files? I don't know, there's also much duplicate code in jBPM, Sonar says 11.2%
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/744398#744398]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120626/cbc2aedf/attachment-0001.html 


More information about the jboss-user mailing list