SQLGrammarException SQL Error: 1054, SQLState: 42S22
thecurse1 Nov 27, 2005 6:57 AMHi,
versions: jbpm-starters-kit-3.0.2, mySQL 4.1.11 and mySQL 5, java 1.5
I get this error when try to save a processdefinition.
My code is:
...
static JbpmSessionFactory jbpmSessionFactory = JbpmSessionFactory.buildJbpmSessionFactory();
...
JbpmSession jbpmSession = jbpmSessionFactory.openJbpmSession();
jbpmSession.beginTransaction();
jbpmSession.getGraphSession().saveProcessDefinition(definition);
jbpmSession.commitTransaction();
....
and the error is:
...
12:41:12,759 DEBUG [SchemaValidationHelper] activating schema validation...
12:41:12,799 INFO [STDOUT] Hibernate: insert into JBPM_PROCESSDEFINITION (NAME_, VERSION_, ISTERMINATIONIMPLICIT_, STARTSTATE_) values (?, ?, ?, ?)
12:41:12,799 INFO [STDOUT] Hibernate: insert into JBPM_NODE (NAME_, PROCESSDEFINITION_, ISASYNC_, ACTION_, SUPERSTATE_, CLASS_) values (?, ?, ?, ?, ?, 'R')
12:41:12,809 WARN [JDBCExceptionReporter] SQL Error: 1054, SQLState: 42S22
12:41:12,809 ERROR [JDBCExceptionReporter] Unknown column 'ISASYNC_' in 'field list'
12:41:12,819 INFO [STDOUT] org.hibernate.exception.SQLGrammarException: could not insert: [org.jbpm.graph.node.StartState]
...
...
Caused by: java.sql.SQLException: Unknown column 'ISASYNC_' in 'field list'
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2847)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2376)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1860)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1957)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1880)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1741)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:104)
at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1958)
... 51 more
12:41:12,819 ERROR [GraphSession] org.hibernate.exception.SQLGrammarException: could not insert: [org.jbpm.graph.node.StartState]
12:41:12,819 ERROR [JbpmSession] org.hibernate.TransactionException: Transaction not successfully started
...
I used the generated create scripts for the mysql database. Are these incorrect?