-->
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: Sequence problems in Firebird
PostPosted: Sun Feb 19, 2006 7:32 pm 
Newbie

Joined: Mon Jun 20, 2005 11:07 am
Posts: 16
Hibernate version:3.1

How can I use Sequences in Firebird with Hibernate, using Hibernate Annotations???

The code of my id is
Quote:
// Property accessors
@Id(generate = GeneratorType.SEQUENCE)
@Column(name = "ID_TLT", unique = true, nullable = false, insertable = true, updatable = true, precision = 0, scale = 0)
public Long getId() {
return this.id;
}


but it's throwing a this stack trace:

Quote:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in URL [file:/C:/Tools/wtpstable/eclipse/workspace/pousadacontrol/web/WEB-INF/classes/applicationContext-dao.xml]: Initialization of bean failed; nested exception is org.hibernate.MappingException: could not instantiate id generator
org.hibernate.MappingException: could not instantiate id generator
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:92)
at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:151)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:178)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1005)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:800)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:726)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:269)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:87)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:72)
at org.springframework.test.AbstractSpringContextTests.loadContextLocations(AbstractSpringContextTests.java:121)
at org.springframework.test.AbstractDependencyInjectionSpringContextTests.loadContextLocations(AbstractDependencyInjectionSpringContextTests.java:210)
at org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:101)
at org.springframework.test.AbstractDependencyInjectionSpringContextTests.setUp(AbstractDependencyInjectionSpringContextTests.java:178)
at junit.framework.TestCase.runBare(TestCase.java:125)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: org.hibernate.MappingException: Dialect does not support sequences
at org.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:430)
at org.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:65)
at org.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:88)
... 27 more



What am I doing wrong??
Thanks in advance and Best Regards

Rafael Mauricio Nami


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.