-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: issue while using <generator> for both MySQL and Oracle
PostPosted: Tue May 25, 2010 3:28 am 
Beginner
Beginner

Joined: Fri Sep 28, 2007 4:58 am
Posts: 21
Location: Chennai, India
Hi All,

i have an issue while using the generator class sequence. In mysql defined as auto increment and in Oracle defined as Sequences. Both dialects we are using simultaneously. please suggest me the common approach for both.

<generator class="sequence" > <param name="sequence">DAILY_SEQ</param> </generator>.
i have to use mysql and Oracle Db's. while using Mysql, getting the below error.

Error@HibernateUtil startup org.hibernate.MappingException: could not instantiate id generator
org.hibernate.MappingException: could not instantiate id generator
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:98)
at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:192)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at Hibernate.Cosolidation.getSession(Cosolidation.java:737)
at Hibernate.Cosolidation.processHistoryData(Cosolidation.java:98)
at Hibernate.Cosolidation.<init>(Cosolidation.java:59)
at consolidate.AuditSearchDataConsolidate.main(AuditSearchDataConsolidate.java:52)
Caused by: org.hibernate.MappingException: Dialect does not support sequences
at org.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:595)
at org.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:65)
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:94)
... 7 more
- Exception in History ->
java.lang.RuntimeException: Exception building SessionFactory: could not instantiate id generator
at Hibernate.Cosolidation.getSession(Cosolidation.java:746)
at Hibernate.Cosolidation.processHistoryData(Cosolidation.java:98)
at Hibernate.Cosolidation.<init>(Cosolidation.java:59)
at Consolidate.main(Consolidate.java:52)
Caused by: org.hibernate.MappingException: could not instantiate id generator
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:98)
at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:192)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at Hibernate.Cosolidation.getSession(Cosolidation.java:737)
... 3 more
Caused by: org.hibernate.MappingException: Dialect does not support sequences
at org.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:595)
at org.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:65)
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:94)
... 7 more


Thanks in Advance.

Regards,
Purushotham podaralla

_________________
Purushotham Podaralla


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.