1 Reply Latest reply on Dec 16, 2008 4:05 PM by kukeltje

    No auto-id generation for JBPM running on Oracle

    janvandeklok

      Hello,

      We are running seam/jbpm on oracle. The jbpm version is 3.3.0 GA
      We ran into several problems that we did not experience when running the stuff on HSQLB.

      One of the problems (and this is probably also the cause for other oracle related problems) is that oracle does not have auti-id fields. As far as I can see, JBPM has not solved this problem meaning that we cannot start processinstances using the jbpm-console because hibernate tries to write records with a null in its id field.

      Here is the exception:


      2008-12-16 11:29:36,580 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1400, SQLState: 23000
      2008-12-16 11:29:36,627 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-01400: cannot insert NULL into ("JANVDKLOK"
      ."JBPM_TOKEN"."ID_")


      And yes, we have specified the oracle dialect.


      I could not find any solution to this problem in the documentation.
      I suppose the solution will be :
      - creating one or more (for each table) oracle sequences and apply triggers to the database that get new id's for each new record.

      Since I don't want to reinvent the wheel :
      - has anybody founda solution to this problem?
      - Have I overlooked anything inthe documentation?

      Jan van de Klok