Discussion:
[jboss-user] [jBPM] - JBPM 5.2 in DB2 - Sequence generation problem
Shiju John
2013-02-13 13:18:23 UTC
Permalink
Shiju John [https://community.jboss.org/people/shijuj] created the discussion

"JBPM 5.2 in DB2 - Sequence generation problem"

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

--------------------------------------------------------------
Hi

Currently i am using oracle DB. I am try to change the database to DB2.
In oracle, Session id generated using the sequences SESSIONINFO_ID_SEQ. But in DB2 the same sequence is not working .
Due to that problem knowledge session persistence is not working.

Please help?
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Jiri Svitak
2013-02-13 14:44:03 UTC
Permalink
Jiri Svitak [https://community.jboss.org/people/jsvitak] created the discussion

"Re: JBPM 5.2 in DB2 - Sequence generation problem"

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

--------------------------------------------------------------
Hello,

try to add the following property into your persistence.xml file:

<property name="hibernate.id.new_generator_mappings" value="false" />
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Shiju John
2013-02-14 05:20:02 UTC
Permalink
Shiju John [https://community.jboss.org/people/shijuj] created the discussion

"Re: JBPM 5.2 in DB2 - Sequence generation problem"

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

--------------------------------------------------------------
Hi jiri Svitak,
Thanks for ur replay. This is not working.  In oracle am using the sequence name SESSIONINFO_ID_SEQ
But in DB2 the same sequence is not taken for sessioninfo table. My Persistance.xml look like












<properties>*
<property name=++"hibernate.dialect"++* value=++"org.hibernate.dialect.DB2Dialect"++/>
<property name=++"hibernate.id.new_generator_mappings"++ value=++"false"++/>
<property name=++"hibernate.connection.autocommit"++ value=++"false"++/>
<property name=++"hibernate.max_fetch_depth"++ value=++"3"++/>
<property name=++"hibernate.hbm2ddl.auto"++ value=++"validate"++/>
<property name=++"hibernate.show_sql"++ value=++"false"++/>
<property name=++"hibernate.transaction.manager_lookup_class"++ value=+"com.TransactionManagerLookup"+ />
</properties>
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Jiri Svitak
2013-02-14 09:10:13 UTC
Permalink
Jiri Svitak [https://community.jboss.org/people/jsvitak] created the discussion

"Re: JBPM 5.2 in DB2 - Sequence generation problem"

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

--------------------------------------------------------------
Hello,

have you tried to recreate the schema (delete and create again) with the new settings? Which version of Hibernate and JBoss AS do you use? Sequence generation problem appeared after migration to Hibernate 4, now it's fixed in in jBPM 5.4. But it's possible that you face a different issue.
--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Shiju John
2013-02-14 09:52:41 UTC
Permalink
Shiju John [https://community.jboss.org/people/shijuj] created the discussion

"Re: JBPM 5.2 in DB2 - Sequence generation problem"

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

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

Am Using Hibernate 3 and JBoss 4. yes I recreated all the schema. but its not working.
Am  trying with option <property name=++"hibernate.hbm2ddl.auto"++ value=++"create"++/> then it is working.
But in this case also DB doesn't have a sequence named SESSIONINFO_ID_SEQ but its working properlly.



--------------------------------------------------------------

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

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Shiju John
2013-02-14 13:17:58 UTC
Permalink
Shiju John [https://community.jboss.org/people/shijuj] created the discussion

"Re: JBPM 5.2 in DB2 - Sequence generation problem"

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

--------------------------------------------------------------
Hi jiri Svitak,

Thankyou very much for ur support.
The issues got solved. Now change the sequences to identity in DB2.
--------------------------------------------------------------

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

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