<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Re: How to set up jBPM5.3 to use MS SQL Server 2008 ?
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/villeit">Ville Itämaa</a> in <i>jBPM</i> - <a href="https://community.jboss.org/message/763476#763476">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>Hi Thomas Setiabudi!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have been trying to also get a new database, but I am using MySQL instead. </p><p>I have also managed to generate the tables in the database. </p><p>But when I try to run the demo application (through Eclipse), I get the following error:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-java">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
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I have browsed following threads to find the error to no avail:</p><p><a class="jive-link-thread-small" href="https://community.jboss.org/thread/201620" target="_blank">https://community.jboss.org/thread/201620</a></p><p><a class="jive-link-message-small" href="https://community.jboss.org/message/758919#758919">https://community.jboss.org/message/758919#758919</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>What I have done sofar:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>1. Changed hibernate dialect in: </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>"db/persistence.xml" to  </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/></span>
</code></pre><p> (I have also tried the MySQLDialect, but noticed that I run an InnoDB version of MySQL)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>"task-service/resources/META-INF/persistence.xml" to     </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>"task-service/resources/war/persistence.xml to</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>"task-service/target/war/persistence.xml" to</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>3. Double checked the build.xml and the section for the mysql driver</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><property name="db.driver.jar.name" value="mysql-connector-java.jar" /></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>4. Ensured the standalone.xml to ensure driver name</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><driver></span>mysql<span class="jive-xml-tag"></driver></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>match with:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml">          <span class="jive-xml-tag"><driver name="mysql" module="com.mysql"></span>
                    <span class="jive-xml-tag"><xa-datasource-class></span>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource<span class="jive-xml-tag"></xa-datasource-class></span>
          <span class="jive-xml-tag"></driver></span>
</code></pre><p>5. Ensure build.xml has correct prefix:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><property name="db.driver.module.prefix" value="com/mysql"/></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>6. Ensure the "db/driver_jar_module.xml" looks correct:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><module xmlns="urn:jboss:module:1.0" name="com.mysql"></span>
   <span class="jive-xml-tag"><resources></span>
     <span class="jive-xml-tag"><resource-root path="mysql-connector-java.jar"/></span>
   <span class="jive-xml-tag"></resources></span>
   <span class="jive-xml-tag"><dependencies></span>
      <span class="jive-xml-tag"><module name="javax.api"/></span>
      <span class="jive-xml-tag"><module name="javax.transaction.api"/></span>
    <span class="jive-xml-tag"></dependencies></span>
<span class="jive-xml-tag"></module></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>7. Ensure the "db\driver" has the right driver in the directory:  </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>mysql-connector-java.jar</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>8. Try to run the application and I get the same results.</p><p>Verified in the JBOSS AS Management console that the Human Task Service is running.</p><p>(See attachment "JBOSS Management.png")</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>9. Then I read on to change another persistence.xml in the jbpm-console:</p><p>- 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</p><p>- "Unwar" the jbpm-gwt-console-server-5.3.0.Final.war.</p><p>- Change the "jbpm-gwt-console-server-5.3.0.Final/WEB-INF/classes/META-INF/Persistence.xml" to</p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>10. Try to "re-war" "jbpm-gwt-console-server-5.3.0.Final" into its original package.</p><p>But this is where I am stuck!</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>This is my build.xml and I am trying to war this using ant with the follwing command: "ant build-war".</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><?xml version="1.0" encoding="UTF-8"?></span>
<span class="jive-xml-tag"><target name="build-war"></span>
          <span class="jive-xml-tag"><war destfile="jbpm-gwt-console-server-5.3.0.Final.war" webxml="jbpm-gwt-console-server-5.3.0.Final/WEB-INF/web.xml"></span>
                    <span class="jive-xml-tag"><fileset dir="jbpm-gwt-console-server-5.3.0.Final"/></span>
                    <span class="jive-xml-tag"><lib dir="jbpm-gwt-console-server-5.3.0.Final/WEB-INF/lib"/></span>
                    <span class="jive-xml-tag"><classes dir="jbpm-gwt-console-server-5.3.0.Final/WEB-INF/classes"/></span>
          <span class="jive-xml-tag"></war></span>
<span class="jive-xml-tag"></target></span>
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I get the following message:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code">C:\War changes\New One\build.xml:2: Unexpected element "{}target" {antlib:org.ap
ache.tools.ant}target
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>How should the build.xml look like to "re-war" the directory: "jbpm-gwt-console-server-5.3.0.Final"?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Attached is my directory structure ("directory structure war.png")</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/763476#763476">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>