[jboss-user] [jBPM] - [jBPM 5.3 - SQL] - Setting up jBPM5.3 with MS SQL Server 2008 (jtds)

Thomas Setiabudi do-not-reply at jboss.com
Thu Aug 2 00:54:06 EDT 2012

Thomas Setiabudi [https://community.jboss.org/people/thomas.setiabudi] created the discussion

"[jBPM 5.3 - SQL] - Setting up jBPM5.3 with MS SQL Server 2008 (jtds)"

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


I try to setup jBPM5.3 with MS SQL Server 2008 but still cant get it works. I have done the following steps

1. Download "jbpm-5.3.0.Final-installer-full.zip"
2. Download "eclipse-java-helios-SR2-win32-x86_64.zip" as my dev PC does not have Internet connection
3. unzip the "jbpm-5.3.0.Final-installer-full.zip" and I get the "jbpm-installer" folder
4. copy the "eclipse-java-helios-SR2-win32-x86_64.zip" to "jbpm-installer\lib"
5. modify the build.xml in "jbpm-installer" :
    I made change from:

<!-- Download Eclipse -->
  <condition property="download.type" value="win32">
    <os family="windows" />


<!-- Download Eclipse -->
  <condition property="download.type" value="win32-x86_64">
    <os family="windows" />

 in order to make the ant install.demo detect my eclipse installer

6. Then I start to refer the instruction to change the DB in  http://docs.jboss.org/jbpm/v5.3/userguide/ch.installer.html#d0e597 http://docs.jboss.org/jbpm/v5.3/userguide/ch.installer.html#d0e597 
7. changed hibernate dialect in "db/persistence.xml" to SQLServerDialect (attached file db_persistence.xml)

<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>

8. changed another persistence.xml in "task-service/resources/META-INF/persistence.xml" (attached task-service_resources_meta-inf_persistence.xml)

<property name="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"/>
      <property name="hibernate.connection.driver_class" value="net.sourceforge.jtds.jdbc.Driver"/>
      <property name="hibernate.connection.url" value="jdbc:jtds:sqlserver://DBName:1433/MyTaskDB" />

9. As the jBPM 5.3 full installer comes with JBoss AS 7, so I modified the "standalone.xml" (attached standalone.xml)

                <datasource jndi-name="java:jboss/datasources/jbpmDS" pool-name="H2DS" enabled="true" jta="true" use-java-context="true" use-ccm="true">
                       <check-valid-connection-sql>SELECT 1</check-valid-connection-sql>
                   <driver name="JTDS" module="net.sourceforge.jtds">

10. Because I use SQL Server, I continue to section "3.7.4. Using a different database" in  http://docs.jboss.org/jbpm/v5.3/userguide/ch.installer.html#d0e597 http://docs.jboss.org/jbpm/v5.3/userguide/ch.installer.html#d0e597
I choose to install the DB Driver in JBoss AS 7 as module, so..:
11. in build.xml, I change the db.driver.jar.name to 

<property name="db.driver.jar.name" value="jtds-1.2.4.jar" />

12. reopen the standalone.xml and make sure the driver name


match with

                   <driver name="JTDS" module="net.sourceforge.jtds">

13. open build.xml again, and change the db.driver.module.prefix to

<property name="db.driver.module.prefix" value="net/sourceforge/jtds"/>

14. modify the "db/driver_jar_module.xml" (attached as db_driver_jar_module.xml)

<module xmlns="urn:jboss:module:1.0" name="net.sourceforge.jtds">
     <resource-root path="jtds-1.2.4.jar"/>
      <module name="javax.api"/>
      <module name="javax.transaction.api"/>

15. ok, up to this step, I tried to run ant install.demo.db
     and then followed by ant start.demo.db
The DB Tables are created properly in my MS SQL Server.
But I cannot use the jbpm-console, it turns out that the jbpm-console has its own persistence.xml that needs to be modified, as does the human task war
so I go and modify those two persistence.xml (by exploding the war and re-war it again) and fix the hibernate dialect in those two persistence.xml

try again with fresh unzip of full installer but still no luck, I still got the resteasy error when opening the jbpm-console, and if I start the sample from eclipse, I got the could not connect to taskclient error, mentioning something about the hornetq.

anything i miss out?

Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120802/62812ac9/attachment.html 

More information about the jboss-user mailing list