-->
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.  [ 2 posts ] 
Author Message
 Post subject: Does Postgres Dialect support sequences
PostPosted: Tue Dec 13, 2005 10:44 am 
Newbie

Joined: Tue Sep 23, 2003 7:02 am
Posts: 16
The following exception is thrown when I try to build a session factory. I was under the impression that the "org.hibernate.dialect.PostgreSQLDialect" dialect supports sequences. Am I wrong or is there something wrong with my config.

<id name="id" column="id">
<generator class="sequence">
<param name="sequence">CORDER_SEQ</param>
</generator>
</id>

Any help would be appreciated. Thanks Lee

net.sf.hibernate.MappingException: could not instantiate id generator

at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:82)

at net.sf.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:82)

at net.sf.hibernate.persister.AbstractEntityPersister.<init>(AbstractEntityPersister.java:630)

at net.sf.hibernate.persister.EntityPersister.<init>(EntityPersister.java:714)

at net.sf.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:42)

at net.sf.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:137)

at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:768)

at com.bs.cms.component.HibernateConfig.init(HibernateConfig.java:39)

at com.bs.cms.Controller.initiateCMSComponents(Controller.java:60)

at com.bs.cms.Controller.startCMS(Controller.java:41)

at com.bs.cms.Controller.init(Controller.java:26)

at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2141)

at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4582)

at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4676)

at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:820)

at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:542)

at com.evermind.server.Application.getHttpApplication(Application.java:889)

at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:690)

at com.evermind.server.http.HttpSite.getApplication(HttpSite.java:420)

at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:422)

at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)

at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)

at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)

at java.lang.Thread.run(Thread.java:534)

Caused by: net.sf.hibernate.MappingException: Dialect does not support sequences

at net.sf.hibernate.dialect.Dialect.getSequenceNextValString(Dialect.java:319)

at net.sf.hibernate.id.SequenceGenerator.configure(SequenceGenerator.java:62)

at net.sf.hibernate.id.IdentifierGeneratorFactory.create(IdentifierGeneratorFactory.java:78)

... 23 more


Top
 Profile  
 
 Post subject: Fixed
PostPosted: Tue Dec 13, 2005 11:20 am 
Newbie

Joined: Tue Sep 23, 2003 7:02 am
Posts: 16
problem solved I was using the wrong dialect.

changed it to.

net.sf.hibernate.dialect.PostgreSQLDialect


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

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.