-
1. Re: No auto-id for jbpm when running on Oracle
mputz Dec 16, 2008 7:22 AM (in response to janvandeklok)If you have created the jBPM tables using the provided jbpm.jpdl.oracle.sql script, a sequence should have been created, too:
create sequence hibernate_sequence;
The mapping files are held pretty generic when it comes to id generation:<id name="id" column="ID_"><generator class="native" /></id>
This allows Hibernate to select the appropriate strategy depending on the configured db dialect, for Oracle it will be 'sequence'. Hibernate then calls the sequence (by default, if not further specified, the one named 'hibernate_sequence') when new rows are inserted.
Have you set the dialect in hibernate.cfg.xml?<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
-
2. Re: No auto-id for jbpm when running on Oracle
janvandeklok Dec 16, 2008 8:51 AM (in response to janvandeklok)Ai Martin.... shame on me!!!
We have 2 hibernate.cfg.xml deployed in the jboss server: 1 that comes with the JBPM installation and 1 that was generated by SEAM for our application.
Since JBPM did create-drop the jbpm tables and that behaviour was NOT specified in the JBPM hibernate.cfg.xml but was specified in the SEAM hibernate.cfg.xml I thought hibernate was just using the SEAM configuration file. In the SEAM configuration file the proper oracle dialect was set, in the JBPM configuration file it was not!!
I changed the dialect and now the id generation work as does the hot deployment!!!
Thanks Martin I owe you one!!!!
What puzzles me however is that the JBPM hibernation reacts on the<property name="hbm2ddl.auto">create-drop</property>
specified in the seam config file,
while in the jbpm config file the following property was set<!-- Automatic schema creation (begin) --> <property name="hibernate.hbm2ddl.auto">none</property> <!-- Automatic schema creation (end) -->
I'm not a hibernate expert but these configuration files are using different keys for the same behaviour. That seems strange doesn't it?
Any way, Thanks for the help Martin.
Jan -
3. Re: No auto-id for jbpm when running on Oracle
kukeltje Dec 16, 2008 4:20 PM (in response to janvandeklok)No, no shame on you... But... I've got to make a statement....
You see Jan, even if Oracle is not (officially) supported (yet), it does work and there are great JBoss consultants/engineers/support staff/qa-people and unmentioned forum addicts that are able to help you out.... FOR FREE and get it working. Now try that at Bea/Oracle/.... ;-) -
4. Re: No auto-id for jbpm when running on Oracle
mputz Dec 16, 2008 4:30 PM (in response to janvandeklok)go, Ronald, go...!
and Jan, I'm glad to hear your issue is resolved!