Discussion:
[jboss-user] [jBPM] - jBPM 5.4: Structure of table ProcessInstanceInfo; invalid column "ID"
whabelitz
2013-02-06 12:57:42 UTC
Permalink
whabelitz [https://community.jboss.org/people/whabelitz] created the discussion

"jBPM 5.4: Structure of table ProcessInstanceInfo; invalid column "ID""

To view the discussion, visit: https://community.jboss.org/message/796337#796337

--------------------------------------------------------------
Hi,

We use jBPM 5.4 on a JBoss 7.1.1 server together with an Oracle database. We use JPA2 and put the necessary persistence configurations file inside our ejb.jar (persistence.xml (derived from jbpm-persistence-JPA2.xml) and JBPMorm-JPA2, ProcessInstanceInfoMapping-JPA2.xml, ExtraIndexes.hbm.xml from jbpm-persistence-jpa.jar)

We create the schema for jbpm by using the sql script which was created from the ant task "jbpm.schemaexport".
Inside these script the table ProcessInstanceInfo has the columns InstanceId, OPTLOCK, processId, startDate, lastReadDate, lastModificationDate, state, processInstanceByteArray.
This matches the description inside ProcessInstanceInfoMapping-JPA2.xml.

When working with processes, the following errors occurs:
INFO  [stdout] (http-localhost-127.0.0.1-8080-1) Hibernate: insert into ProcessInstanceInfo (id, lastModificationDate, lastReadDate, processId, processInstanceByteArray, startDate, state, OPTLOCK, InstanceId) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost-127.0.0.1-8080-1) SQL Error: 904, SQLState: 42000
ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost-127.0.0.1-8080-1) ORA-00904: "ID": invalid identifier

There is no column ID inside the table and no field with this name defined inside the mapping but there are get and set methods inside the corresponding class which referres to the field processInstanceId.

Any idea why this error occurrs and how to fix it?

Thanks
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/796337#796337]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
René Zoller
2013-02-27 09:33:36 UTC
Permalink
René Zoller [https://community.jboss.org/people/rzoller] created the discussion

"Re: jBPM 5.4: Structure of table ProcessInstanceInfo; invalid column "ID""

To view the discussion, visit: https://community.jboss.org/message/799826#799826

--------------------------------------------------------------
Hi whabelitz,

I've got the same problem with using a DB2 database. When generating the sql script only InstanceId will be created by the script. But the SQL-statement shows that a non existing id column is adressed. When you change hibernate.hbm2ddl.auto to +update+ an id column is created and you won't get an error. Nevertheless there seems to be something inconsistend. The class org.jbpm.persistence.processinstance.ProcessInstanceInfo has the correct annotation  ( https://github.com/droolsjbpm/jbpm/blob/master/jbpm-persistence-jpa/src/main/java/org/jbpm/persistence/processinstance/ProcessInstanceInfo.java https://github.com/droolsjbpm/jbpm/blob/master/jbpm-persistence-jpa/src/main/java/org/jbpm/persistence/processinstance/ProcessInstanceInfo.java). I can't see where the reference to id comes from.

Any idea?

René
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/799826#799826]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...