[jboss-user] [jBPM] - Re: How to set up jBPM5.3 to use MS SQL Server 2008 ?

Ville Itämaa do-not-reply at jboss.com
Fri Oct 5 08:22:53 EDT 2012


Ville Itämaa [https://community.jboss.org/people/villeit] created the discussion

"Re: How to set up jBPM5.3 to use MS SQL Server 2008 ?"

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

--------------------------------------------------------------
Hi Thomas Setiabudi!


I have been trying to also get a new database, but I am using MySQL instead. 
I have also managed to generate the tables in the database. 
But when I try to run the demo application (through Eclipse), I get the following error:


05/10 09:10:06,785[main] ERROR service.hornetq.HornetQTaskClientConnector.connect  - Unable to connect to server using configuration org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5445&host=127-0-0-1
org.jbpm.workflow.instance.WorkflowRuntimeException: [com.sample.evaluation:1 - Self Evaluation:2] -- Could not connect task client: on ip: 127.0.0.1 - port: 5445



I have browsed following threads to find the error to no avail:
 https://community.jboss.org/thread/201620 https://community.jboss.org/thread/201620
 https://community.jboss.org/message/758919#758919 https://community.jboss.org/message/758919#758919


What I have done sofar:

1. Changed hibernate dialect in: 


"db/persistence.xml" to  
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>

 (I have also tried the MySQLDialect, but noticed that I run an InnoDB version of MySQL)


"task-service/resources/META-INF/persistence.xml" to     
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>



"task-service/resources/war/persistence.xml to
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>



"task-service/target/war/persistence.xml" to
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>



2. Modified the "standalone.xml" just like you have it in your step 9. (Apart that I have MySQL credentials, and the way it is described in the Demo tutorial)


3. Double checked the build.xml and the section for the mysql driver
<property name="db.driver.jar.name" value="mysql-connector-java.jar" />



4. Ensured the standalone.xml to ensure driver name
<driver>mysql</driver>



match with:


          <driver name="mysql" module="com.mysql">
                    <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
          </driver>

5. Ensure build.xml has correct prefix:


<property name="db.driver.module.prefix" value="com/mysql"/>



6. Ensure the "db/driver_jar_module.xml" looks correct:


<module xmlns="urn:jboss:module:1.0" name="com.mysql">
   <resources>
     <resource-root path="mysql-connector-java.jar"/>
   </resources>
   <dependencies>
      <module name="javax.api"/>
      <module name="javax.transaction.api"/>
    </dependencies>
</module>


7. Ensure the "db\driver" has the right driver in the directory:  


mysql-connector-java.jar


8. Try to run the application and I get the same results.
Verified in the JBOSS AS Management console that the Human Task Service is running.
(See attachment "JBOSS Management.png")

9. Then I read on to change another persistence.xml in the jbpm-console:
- Uncompress the jbpm-5.3.0.Final-gwt-console.zip => jbpm-gwt-console-5.3.0.Final.war & jbpm-gwt-console-server-5.3.0.Final.war
- "Unwar" the jbpm-gwt-console-server-5.3.0.Final.war.
- Change the "jbpm-gwt-console-server-5.3.0.Final/WEB-INF/classes/META-INF/Persistence.xml" to
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>



10. Try to "re-war" "jbpm-gwt-console-server-5.3.0.Final" into its original package.
But this is where I am stuck!


This is my build.xml and I am trying to war this using ant with the follwing command: "ant build-war".


<?xml version="1.0" encoding="UTF-8"?>
<target name="build-war">
          <war destfile="jbpm-gwt-console-server-5.3.0.Final.war" webxml="jbpm-gwt-console-server-5.3.0.Final/WEB-INF/web.xml">
                    <fileset dir="jbpm-gwt-console-server-5.3.0.Final"/>
                    <lib dir="jbpm-gwt-console-server-5.3.0.Final/WEB-INF/lib"/>
                    <classes dir="jbpm-gwt-console-server-5.3.0.Final/WEB-INF/classes"/>
          </war>
</target>


I get the following message:


C:\War changes\New One\build.xml:2: Unexpected element "{}target" {antlib:org.ap
ache.tools.ant}target


How should the build.xml look like to "re-war" the directory: "jbpm-gwt-console-server-5.3.0.Final"?


Attached is my directory structure ("directory structure war.png")
--------------------------------------------------------------

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

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/20121005/edf51845/attachment.html 


More information about the jboss-user mailing list