aspose file tools*
The moose likes JBoss/WildFly and the fly likes JBPM Deployment on Jboss-4.0.3SP1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBPM Deployment on Jboss-4.0.3SP1" Watch "JBPM Deployment on Jboss-4.0.3SP1" New topic
Author

JBPM Deployment on Jboss-4.0.3SP1

Jitendra Supe
Greenhorn

Joined: Aug 15, 2005
Posts: 5
I am new bee to JBPM. I have downloaded the JBPM Suite jbpm-jpdl-suite-3.2.1 and trying to deploy the sample application on that.

I have configured mySQL DB for my sample application.

While starting server with command (run -c jbpm)from <jbpm-home>\jbpm-jpdl-3.2.1\server\bin I am getting following error in Server.log file.2007-08-22 16:24:51,944 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select taskinstan0_.ID_ as ID1_27_, taskinstan0_.VERSION_ as VERSION3_27_, taskinstan0_.NAME_ as NAME4_27_, taskinstan0_.DESCRIPTION_ as DESCRIPT5_27_, taskinstan0_.ACTORID_ as ACTORID6_27_, taskinstan0_.CREATE_ as CREATE7_27_, taskinstan0_.START_ as START8_27_, taskinstan0_.END_ as END9_27_, taskinstan0_.DUEDATE_ as DUEDATE10_27_, taskinstan0_.PRIORITY_ as PRIORITY11_27_, taskinstan0_.ISCANCELLED_ as ISCANCE12_27_, taskinstan0_.ISSUSPENDED_ as ISSUSPE13_27_, taskinstan0_.ISOPEN_ as ISOPEN14_27_, taskinstan0_.ISSIGNALLING_ as ISSIGNA15_27_, taskinstan0_.ISBLOCKING_ as ISBLOCKING16_27_, taskinstan0_.TASK_ as TASK17_27_, taskinstan0_.TOKEN_ as TOKEN18_27_, taskinstan0_.PROCINST_ as PROCINST19_27_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN20_27_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM21_27_ from JBPM_TASKINSTANCE taskinstan0_ where (taskinstan0_.ACTORID_ in (?)) and taskinstan0_.ISSUSPENDED_<>1 and taskinstan0_.ISOPEN_=1
2007-08-22 16:24:51,944 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
2007-08-22 16:24:51,944 DEBUG [org.hibernate.impl.SessionFactoryImpl] Checking 0 named SQL queries
2007-08-22 16:24:51,944 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
2007-08-22 16:24:52,007 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4865147256602624
2007-08-22 16:24:52,007 DEBUG [org.jbpm.persistence.db.DbPersistenceService] beginning hibernate transaction
2007-08-22 16:24:52,007 DEBUG [org.hibernate.transaction.JDBCTransaction] begin
2007-08-22 16:24:52,007 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2007-08-22 16:24:52,007 DEBUG [org.hibernate.transaction.JDBCTransaction] current autocommit status: true
2007-08-22 16:24:52,007 DEBUG [org.hibernate.transaction.JDBCTransaction] disabling autocommit
2007-08-22 16:24:52,007 DEBUG [org.jbpm.persistence.db.DbPersistenceService] begun hibernate transaction org.hibernate.transaction.JDBCTransaction@78ae82
2007-08-22 16:24:52,022 DEBUG [org.jbpm.job.executor.JobExecutorThread] querying for acquirable job...
2007-08-22 16:24:52,022 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2007-08-22 16:24:52,022 DEBUG [org.hibernate.SQL] select top ? job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDATE4_26_, job0_.PROCESSINSTANCE_ as PROCESSI5_26_, job0_.TOKEN_ as TOKEN6_26_, job0_.TASKINSTANCE_ as TASKINST7_26_, job0_.ISSUSPENDED_ as ISSUSPEN8_26_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_26_, job0_.LOCKOWNER_ as LOCKOWNER10_26_, job0_.LOCKTIME_ as LOCKTIME11_26_, job0_.EXCEPTION_ as EXCEPTION12_26_, job0_.RETRIES_ as RETRIES13_26_, job0_.NAME_ as NAME14_26_, job0_.REPEAT_ as REPEAT15_26_, job0_.TRANSITIONNAME_ as TRANSIT16_26_, job0_.ACTION_ as ACTION17_26_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_26_, job0_.GRAPHELEMENT_ as GRAPHEL19_26_, job0_.NODE_ as NODE20_26_, job0_.CLASS_ as CLASS2_26_ from JBPM_JOB job0_ where (job0_.LOCKOWNER_ is null or job0_.LOCKOWNER_=?) and job0_.RETRIES_>0 and job0_.DUEDATE_<=? and job0_.ISSUSPENDED_<>1 order by job0_.DUEDATE_ asc
2007-08-22 16:24:52,038 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() Wed Aug 22 16:24:52 IST 2007 -> now [3]
2007-08-22 16:24:52,053 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() JbpmJobExector:172.17.225.114:1 -> lockOwner [2]
2007-08-22 16:24:52,053 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2007-08-22 16:24:52,053 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDATE4_26_, job0_.PROCESSINSTANCE_ as PROCESSI5_26_, job0_.TOKEN_ as TOKEN6_26_, job0_.TASKINSTANCE_ as TASKINST7_26_, job0_.ISSUSPENDED_ as ISSUSPEN8_26_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_26_, job0_.LOCKOWNER_ as LOCKOWNER10_26_, job0_.LOCKTIME_ as LOCKTIME11_26_, job0_.EXCEPTION_ as EXCEPTION12_26_, job0_.RETRIES_ as RETRIES13_26_, job0_.NAME_ as NAME14_26_, job0_.REPEAT_ as REPEAT15_26_, job0_.TRANSITIONNAME_ as TRANSIT16_26_, job0_.ACTION_ as ACTION17_26_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_26_, job0_.GRAPHELEMENT_ as GRAPHEL19_26_, job0_.NODE_ as NODE20_26_, job0_.CLASS_ as CLASS2_26_ from JBPM_JOB job0_ where (job0_.LOCKOWNER_ is null or job0_.LOCKOWNER_=?) and job0_.RETRIES_>0 and job0_.DUEDATE_<=? and job0_.ISSUSPENDED_<>1 order by job0_.DUEDATE_ asc]
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDAT' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403)
at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatement.java:90)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:756)
at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:111)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
2007-08-22 16:24:52,053 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1064, SQLState: 42000
2007-08-22 16:24:52,053 ERROR [org.hibernate.util.JDBCExceptionReporter] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDAT' at line 1
2007-08-22 16:24:52,069 ERROR [org.jbpm.db.JobSession] org.hibernate.exception.SQLGrammarException: could not execute query
2007-08-22 16:24:52,069 DEBUG [org.jbpm.JbpmContext] closing JbpmContext
2007-08-22 16:24:52,069 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@1e5ebbf
2007-08-22 16:24:52,069 DEBUG [org.jbpm.persistence.db.DbPersistenceService] committing hibernate transaction org.hibernate.transaction.JDBCTransaction@78ae82
2007-08-22 16:24:52,069 DEBUG [org.hibernate.transaction.JDBCTransaction] commit
2007-08-22 16:24:52,069 DEBUG [org.hibernate.transaction.JDBCTransaction] re-enabling autocommit
2007-08-22 16:24:52,069 DEBUG [org.hibernate.transaction.JDBCTransaction] committed JDBC Connection
2007-08-22 16:24:52,069 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
2007-08-22 16:24:52,069 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
2007-08-22 16:24:52,069 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
2007-08-22 16:24:52,069 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@19d277e
2007-08-22 16:24:52,069 ERROR [org.jbpm.job.executor.JobExecutorThread] exception in job executor thread. waiting 5000 milliseconds
org.jbpm.JbpmException: couldn't get acquirable jobs
at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:44)
at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:111)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2148)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:756)
at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
... 2 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDAT' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403)
at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatement.java:90)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
... 11 more
2007-08-22 16:24:57,100 DEBUG [org.jbpm.job.executor.JobExecutorThread] acquiring jobs for execution...
2007-08-22 16:24:57,100 DEBUG [org.jbpm.configuration.JbpmContextInfo] creating jbpm context with service factories '[tx, message, scheduler, logging, persistence, authentication]'
2007-08-22 16:24:57,100 DEBUG [org.jbpm.JbpmContext] creating org.jbpm.JbpmContext@8bf135
2007-08-22 16:24:57,100 DEBUG [org.jbpm.persistence.db.DbPersistenceServiceFactory] creating persistence service
2007-08-22 16:24:57,100 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
2007-08-22 16:24:57,100 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4865147277721600
2007-08-22 16:24:57,100 DEBUG [org.jbpm.persistence.db.DbPersistenceService] beginning hibernate transaction
2007-08-22 16:24:57,100 DEBUG [org.hibernate.transaction.JDBCTransaction] begin
2007-08-22 16:24:57,100 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
2007-08-22 16:24:57,100 DEBUG [org.hibernate.transaction.JDBCTransaction] current autocommit status: true
2007-08-22 16:24:57,100 DEBUG [org.hibernate.transaction.JDBCTransaction] disabling autocommit
2007-08-22 16:24:57,100 DEBUG [org.jbpm.persistence.db.DbPersistenceService] begun hibernate transaction org.hibernate.transaction.JDBCTransaction@8d5485
2007-08-22 16:24:57,100 DEBUG [org.jbpm.job.executor.JobExecutorThread] querying for acquirable job...
2007-08-22 16:24:57,116 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
2007-08-22 16:24:57,116 DEBUG [org.hibernate.SQL] select top ? job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDATE4_26_, job0_.PROCESSINSTANCE_ as PROCESSI5_26_, job0_.TOKEN_ as TOKEN6_26_, job0_.TASKINSTANCE_ as TASKINST7_26_, job0_.ISSUSPENDED_ as ISSUSPEN8_26_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_26_, job0_.LOCKOWNER_ as LOCKOWNER10_26_, job0_.LOCKTIME_ as LOCKTIME11_26_, job0_.EXCEPTION_ as EXCEPTION12_26_, job0_.RETRIES_ as RETRIES13_26_, job0_.NAME_ as NAME14_26_, job0_.REPEAT_ as REPEAT15_26_, job0_.TRANSITIONNAME_ as TRANSIT16_26_, job0_.ACTION_ as ACTION17_26_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_26_, job0_.GRAPHELEMENT_ as GRAPHEL19_26_, job0_.NODE_ as NODE20_26_, job0_.CLASS_ as CLASS2_26_ from JBPM_JOB job0_ where (job0_.LOCKOWNER_ is null or job0_.LOCKOWNER_=?) and job0_.RETRIES_>0 and job0_.DUEDATE_<=? and job0_.ISSUSPENDED_<>1 order by job0_.DUEDATE_ asc
2007-08-22 16:24:57,116 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() Wed Aug 22 16:24:57 IST 2007 -> now [3]
2007-08-22 16:24:57,116 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() JbpmJobExector:172.17.225.114:1 -> lockOwner [2]
2007-08-22 16:24:57,116 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2007-08-22 16:24:57,116 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDATE4_26_, job0_.PROCESSINSTANCE_ as PROCESSI5_26_, job0_.TOKEN_ as TOKEN6_26_, job0_.TASKINSTANCE_ as TASKINST7_26_, job0_.ISSUSPENDED_ as ISSUSPEN8_26_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_26_, job0_.LOCKOWNER_ as LOCKOWNER10_26_, job0_.LOCKTIME_ as LOCKTIME11_26_, job0_.EXCEPTION_ as EXCEPTION12_26_, job0_.RETRIES_ as RETRIES13_26_, job0_.NAME_ as NAME14_26_, job0_.REPEAT_ as REPEAT15_26_, job0_.TRANSITIONNAME_ as TRANSIT16_26_, job0_.ACTION_ as ACTION17_26_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_26_, job0_.GRAPHELEMENT_ as GRAPHEL19_26_, job0_.NODE_ as NODE20_26_, job0_.CLASS_ as CLASS2_26_ from JBPM_JOB job0_ where (job0_.LOCKOWNER_ is null or job0_.LOCKOWNER_=?) and job0_.RETRIES_>0 and job0_.DUEDATE_<=? and job0_.ISSUSPENDED_<>1 order by job0_.DUEDATE_ asc]
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDAT' at line 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2941)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1403)
at org.jboss.resource.adapter.jdbc.CachedPreparedStatement.executeQuery(CachedPreparedStatement.java:90)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2145)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:333)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:756)
at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:111)
at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)


Here are contents of some important configuration files.

mysql-ds.xml

<?xml version="1.0" encoding="UTF-8"?>

<!-- $Id: mysql-ds.xml,v 1.3.2.3 2006/02/07 14:23:00 acoliver Exp $ -->
<!-- Datasource config for MySQL using 3.0.9 available from:
http://www.mysql.com/downloads/api-jdbc-stable.html
-->

<datasources>
<local-tx-datasource>
<jndi-name>DefaultDS</jndi-name>
<connection-url>jdbc:mysql://172.17.225.171:3306/jbpm_sample</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>password</password>
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<!-- should only be used on drivers after 3.22.1 with "ping" support
<valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name>
-->
<!-- sql to call when connection is created
<new-connection-sql>select * from something</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers
<check-valid-connection-sql>select * from something</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<metadata>
<type-mapping>mySQL</type-mapping>
</metadata>
</local-tx-datasource>
</datasources>


hibernate.cfg.xml



<?xml version='1.0' encoding='utf-8'?>

<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
<session-factory>

<!-- mysql dialect -->
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<!-- JDBC connection properties (begin) -->
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://172.17.225.171:3306/jbpm_sample</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">password</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>

<!-- JDBC connection properties (end) -->

<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>


<!-- ############################################ -->
<!-- # mapping files with external dependencies # -->
<!-- ############################################ -->

<!-- following mapping file has a dependendy on -->
<!-- 'bsh-{version}.jar'. -->
<!-- uncomment this if you don't have bsh on your -->
<!-- classpath. you won't be able to use the -->
<!-- script element in process definition files -->
<mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>

<!-- following mapping files have a dependendy on -->
<!-- 'jbpm-identity.jar', mapping files -->
<!-- of the pluggable jbpm identity component. -->
<!-- Uncomment the following 3 lines if you -->
<!-- want to use the jBPM identity mgmgt -->
<!-- component. -->
<!-- identity mappings (begin) -->
<mapping resource="org/jbpm/identity/User.hbm.xml"/>
<mapping resource="org/jbpm/identity/Group.hbm.xml"/>
<mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
<!-- identity mappings (end) -->

<!-- following mapping files have a dependendy on -->
<!-- the JCR API -->

<!-- ###################### -->
<!-- # jbpm mapping files # -->
<!-- ###################### -->

<!-- hql queries and type defs -->
<mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />

<!-- graph.action mapping files -->
<mapping resource="org/jbpm/graph/action/MailAction.hbm.xml"/>

<!-- graph.def mapping files -->
<mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
<mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
<mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>

<!-- graph.node mapping files -->
<mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/MailNode.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
<mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>

<!-- context.def mapping files -->
<mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
<mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>

<!-- taskmgmt.def mapping files -->
<mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>

<!-- module.def mapping files -->
<mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>

<!-- bytes mapping files -->
<mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>

<!-- file.def mapping files -->
<mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>

<!-- scheduler.def mapping files -->
<mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
<mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>

<!-- graph.exe mapping files -->
<mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
<mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>

<!-- module.exe mapping files -->
<mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>

<!-- context.exe mapping files -->
<mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
<mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>

<!-- job mapping files -->
<mapping resource="org/jbpm/job/Job.hbm.xml"/>
<mapping resource="org/jbpm/job/Timer.hbm.xml"/>
<mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
<mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>

<!-- taskmgmt.exe mapping files -->
<mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>

<!-- logging mapping files -->
<mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
<mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
<mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
<mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
<mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>

</session-factory>
</hibernate-configuration>


jbpm-ds.xml

<?xml version="1.0" encoding="UTF-8"?>

<datasources>

<local-tx-datasource>
<jndi-name>JbpmDS</jndi-name>
<connection-url>jdbc:mysql://172.17.225.171:3306/jbpm_sample</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
<password>password</password>
<min-pool-size>1</min-pool-size>
<max-pool-size>5</max-pool-size>
<idle-timeout-minutes>0</idle-timeout-minutes>
<track-statements/>
<prepared-statement-cache-size>32</prepared-statement-cache-size>
<metadata><type-mapping>MySQL</type-mapping></metadata>
</local-tx-datasource>
</datasources>


Please help me in solving this issue....
Jitendra Supe
Greenhorn

Joined: Aug 15, 2005
Posts: 5
I solved this problem by following below steps:

1. Install the MySQL JDBC driver in the $JBOSS_HOME/server/default/lib directory. See also �����SetUpAMysqlDatasource.
2. Delete $JBOSS_HOME/server/default/deploy/hsqldb-ds.xml.
3. Copy $JBOSS_HOME/docs/examples/jca/mysql-ds.xml to $JBOSS_HOME/server/default/deploy. Modify the <local-tx-datasource> element with your MySQL connection settings:
<connection-url>jdbc:mysql://your-hostname:your-port/your-database-name</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>your-user</user-name>
<password>your-pass</password>
4. In $JBOSS_HOME/server/default/conf/standardjaws.xml change the <type-mapping> element:
<type-mapping>mySQL</type-mapping>
5. In standardjbosscmp-jdbc.xml change the following, not necessarily contiguous, elements:
<datasource>java:/DefaultDS</datasource>
<datasource-mapping>mySQL</datasource-mapping>
<fk-constraint>true</fk-constraint>
6. Add the following within the <policy> element of login-config.xml:
<application-policy name = "MySqlDbRealm?">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule?" flag = "required">
<module-option name = "principal">your-user</module-option>
<module-option name = "userName">your-user</module-option>
<module-option name ="password">your-pass</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM?,name=DefaultDS</module-option>
</login-module>
</authentication>
</application-policy>
7. Replace file $JBOSS_HOME/server/default/deploy/jms/hsql-jdbc2-service.xml by file $JBOSS_HOME/docs/examples/jms/mysql-jdbc2-service.xml
8. Change MySqlDS? to DefaultDS in $JBOSS_HOME/server/default/deploy/jms/mysql-jdbc2-service.xml:
<mbean code="org.jboss.mq.pm.jdbc2.PersistenceManager"
name="jboss.mq:service=PersistenceManager">
<depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
<attribute name="SqlProperties?">
...
9. Rename hsqldb-jdbc-state-service.xml to mysql-jdbc-state-service.xml.
Also we need to explicitly add contents in JBPM repository for sample examples. Queries for same are available in the folder "jbpm-jpdl-suite-3.2.1\jbpm-jpdl-3.2.1\server\server\jbpm\data\hypersonic\jbpmDB.script" for hypersoninc db. You can migrate those to mySQL DB.

Let me know in case you want any more details.

- Jitendra
Arvind Aravamudhan
Greenhorn

Joined: Sep 26, 2007
Posts: 1
Hi ,

I tried out the steps that you had mentioned . Strangely I get this exception when i connect to Oracle or Mysql

12:23:15,328 WARN [JDBCExceptionReporter] SQL Error: 1064, SQLState: 42000
12:23:15,328 ERROR [JDBCExceptionReporter] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDAT' at line 1
12:23:15,329 ERROR [JobSession] org.hibernate.exception.SQLGrammarException: could not execute query
12:23:16,340 ERROR [JobExecutorThread] exception in job executor thread. waiting 5000 milliseconds
org.jbpm.JbpmException: couldn't get acquirable jobs


Is there any other conf required other than the ones you had mentioned . Any doc from JBoss available on this ?

Thanks
Regards

Arvind.A
Sangeetha Muthu
Greenhorn

Joined: Jul 02, 2008
Posts: 1
Originally posted by Jitendra Supe:
I solved this problem by following below steps:

1. Install the MySQL JDBC driver in the $JBOSS_HOME/server/default/lib directory. See also �����SetUpAMysqlDatasource.
2. Delete $JBOSS_HOME/server/default/deploy/hsqldb-ds.xml.
3. Copy $JBOSS_HOME/docs/examples/jca/mysql-ds.xml to $JBOSS_HOME/server/default/deploy. Modify the <local-tx-datasource> element with your MySQL connection settings:
<connection-url>jdbc:mysql://your-hostname:your-port/your-database-name</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>your-user</user-name>
<password>your-pass</password>
4. In $JBOSS_HOME/server/default/conf/standardjaws.xml change the <type-mapping> element:
<type-mapping>mySQL</type-mapping>
5. In standardjbosscmp-jdbc.xml change the following, not necessarily contiguous, elements:
<datasource>java:/DefaultDS</datasource>
<datasource-mapping>mySQL</datasource-mapping>
<fk-constraint>true</fk-constraint>
6. Add the following within the <policy> element of login-config.xml:
<application-policy name = "MySqlDbRealm?">
<authentication>
<login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule?" flag = "required">
<module-option name = "principal">your-user</module-option>
<module-option name = "userName">your-user</module-option>
<module-option name ="password">your-pass</module-option>
<module-option name = "managedConnectionFactoryName">jboss.jca:service=LocalTxCM?,name=DefaultDS</module-option>
</login-module>
</authentication>
</application-policy>
7. Replace file $JBOSS_HOME/server/default/deploy/jms/hsql-jdbc2-service.xml by file $JBOSS_HOME/docs/examples/jms/mysql-jdbc2-service.xml
8. Change MySqlDS? to DefaultDS in $JBOSS_HOME/server/default/deploy/jms/mysql-jdbc2-service.xml:
<mbean code="org.jboss.mq.pm.jdbc2.PersistenceManager"
name="jboss.mq:service=PersistenceManager">
<depends optional-attribute-name="ConnectionManager">jboss.jca:service=DataSourceBinding,name=DefaultDS</depends>
<attribute name="SqlProperties?">
...
9. Rename hsqldb-jdbc-state-service.xml to mysql-jdbc-state-service.xml.
Also we need to explicitly add contents in JBPM repository for sample examples. Queries for same are available in the folder "jbpm-jpdl-suite-3.2.1\jbpm-jpdl-3.2.1\server\server\jbpm\data\hypersonic\jbpmDB.script" for hypersoninc db. You can migrate those to mySQL DB.

Let me know in case you want any more details.

- Jitendra


Hi Jitendra,
I am facing the same problem. I followed the steps you have given. Still the error exists.
Could you please help me on this.

Regards,
Sanvani
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

"sanvani sanvani"

Please check your private message for a message from JavaRanch.


[My Blog] [JavaRanch Journal]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Sangeetha M",
Please check your private messages.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
betul aydin
Greenhorn

Joined: Jan 08, 2008
Posts: 19
hi I am new at jbpm and I have seem problem what is solution can you say me?
sancy lee
Greenhorn

Joined: Sep 08, 2008
Posts: 1
Hi Jitendra,
I am facing the same problem. I tried the steps you have given. But I still confronted with the errors.
Would you mind helping me on this? Thanks~~
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JBPM Deployment on Jboss-4.0.3SP1