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
|
|