`
fanfree
  • 浏览: 6378 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

将JBPM(3.2.3)部署到Jboss+MySQL

阅读更多

首先下载jbpm-jpdl-3.2.3;

1.修改jbpm-jpdl-3.2.3\db\jbpm.jpdl.mysql.sql,将脚本前的“alter table JBPM_ACTION XXX”删除掉(这些是升级数据库用的不需要);

2.修改\jbpm-jpdl-3.2.3\deploy\jbpm-console.war文件的hibernate.cfg.xml

   修改为:

            <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>

    <!-- JDBC connection properties (begin) -->
    <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
    <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/jbpmdb</property>
    <property name="hibernate.connection.username">root</property>
    <property name="hibernate.connection.password">root</property>
    <!-- JDBC connection properties (end) -->

 

3.修改\jbpm-jpdl-3.2.3\server\server\jbpm\deploy\jbpm-ds.xml;

   将内容修改为:

         <datasources>

   <local-tx-datasource>
      <jndi-name>JbpmDS</jndi-name>
      <connection-url>jdbc:mysql://localhost:3306/jbpmdb</connection-url>
      <driver-class>com.mysql.jdbc.Driver</driver-class>
      <user-name>root</user-name>
      <password>root</password>

      <metadata>
            <type-mapping>MySQL</type-mapping>
      </metadata>
    </local-tx-datasource>
</datasources>

 

4.将jbpm-console.war和jbpm-ds.xml文件copy到jboss部署目录就可以了

 

 

 

分享到:
评论
3 楼 fanfree 2009-01-06  
更换一下mysql的版本试试;或者吧Sql语句显示出来排除下
2 楼 fanfree 2009-01-06  
应该是jbpm.jpdl.mysql.sql生成数据结构的问题,换一下mysql版本试试
1 楼 lerry_ma 2009-01-01  
我按你说的做了,但启动就出现下面的问题,请帮我看看,谢谢!!
14:18:32,174 WARN  [JDBCExceptionReporter] SQL Error: 1064, SQLState: 42000
14:18:32,179 ERROR [JDBCExceptionReporter] You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right sy
ntax to use near '? job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.
DUEDATE_ as DUEDAT' at line 1
14:18:32,189 ERROR [JobSession] org.hibernate.exception.SQLGrammarException: cou
ld not execute query
14:18:32,197 ERROR [JobExecutorThread] exception in job executor thread. waiting
80000 milliseconds
org.jbpm.JbpmException: couldn't get acquirable jobs
        at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:43)
        at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread
.java:114)
        at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58
)
Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
ava:67)
        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
er.java:43)
        at org.hibernate.loader.Loader.doList(Loader.java:2223)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
        at org.hibernate.loader.Loader.list(Loader.java:2099)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.ja
va:338)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java
:172)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.j
ava:811)
        at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:39)
        ... 2 more
Caused by: java.sql.SQLException: You have an error in your SQL syntax; check th
e manual that corresponds to your MySQL server version for the right syntax to u
se near '? job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_
as DUEDAT' at line 1
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2901)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1584)
        at com.mysql.jdbc.Connection.serverPrepare(Connection.java:4932)
        at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1312)
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepar
eStatement(BaseWrapperManagedConnection.java:349)
        at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareS
tatement(BaseWrapperManagedConnection.java:344)
        at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(Wr
appedConnection.java:187)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatch
er.java:505)
        at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatch
er.java:423)
        at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatc
her.java:139)
        at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1547)
        at org.hibernate.loader.Loader.doQuery(Loader.java:673)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
ader.java:236)
        at org.hibernate.loader.Loader.doList(Loader.java:2220)
        ... 11 more

相关推荐

Global site tag (gtag.js) - Google Analytics