[jboss-user] [JBoss jBPM] - How to configure jbpm-bpel-1.1.Beta3 with MySQL?

vhuhtine do-not-reply at jboss.com
Fri Apr 27 08:42:37 EDT 2007


Hello!

I'd like to use jbpm-bpel with MySQL instead of the Hypersonic database.

I changed the provided jbpm-bpel-ds.xml so that hibernate uses a local MySQL database:

14:57:26,121 INFO  [SettingsFactory] RDBMS: MySQL, version: 4.1.22-community-nt
  | 14:57:26,121 INFO  [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-3.1.14 ( $Date: 2006-10-18 17:40:15 +0200 (Wed, 18 Oct 2006) $, $Revision: 5888 $ )
  | 14:57:26,168 INFO  [Dialect] Using dialect: org.hibernate.dialect.MySQLDialect

Schema creation fails: 

14:57:32,355 ERROR [SchemaUpdate] could not complete schema update
  | org.hibernate.MappingException: No Dialect mapping for JDBC type: -1
  |         at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
  |         at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
  |         at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:255)
  |         at org.hibernate.mapping.Column.getSqlType(Column.java:182)
  |         at org.hibernate.mapping.Table.sqlCreateString(Table.java:383)
  |         at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:884)
  |         at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:140)
  |         at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
  |         at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1218)
  |         at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
  |         at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:94)
  |         at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:98)
  |         at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:281)
  |         at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:526)
  |         at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:109)
  |         at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)

After that

15:27:41,873 ERROR [JDBCExceptionReporter] Table 'jbpm.jbpm_job' doesn't exist
  | 15:27:41,873 ERROR [JobSession] org.hibernate.exception.SQLGrammarException: could not execute query
  | 15:27:41,873 ERROR [JobExecutorThread] exception in job executor thread. waiting 30000 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:2147)
  |         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
  |         at org.hibernate.loader.Loader.list(Loader.java:2023)
  |         at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:393)
  |         at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java: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.java:780)
  |         at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
  |         ... 2 more
  | Caused by: java.sql.SQLException: Table 'jbpm.jbpm_job' doesn't exist
  |         at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
  |         at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
  |         at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)
  |         at com.mysql.jdbc.Connection.execSQL(Connection.java:3026)
  |         at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1137)
  |         at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1231)
  |         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:1668)
  |         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:2144)
  |         ... 11 more

I'm using hibernate version 3.2.0.ga and jboss-4.0.5.GA .

Changing hibernate.hbm2ddl.auto from update to create makes no difference. 

I have also tried using org.hibernate.dialect.MySQLInnoDBDialect.

Any help is appreciated. Thanks!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041375#4041375

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041375



More information about the jboss-user mailing list