-->
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: Oracle sequence generator problem
PostPosted: Mon Aug 15, 2005 7:04 am 
Newbie

Joined: Mon Aug 15, 2005 6:57 am
Posts: 7
After reading documentation and all, I understood that the method to use the Oracle sequence generator for generation of id's is:

<id name="id" column="ID" type="java.lang.Long" unsaved-value="null">
<generator class="sequence">
<param name="sequence">PFX_APP_MC_CORRESPONDENCE_SEQ</param>
</generator>
</id>

I am using oracle 9i and the sequence PFX_APP_MC_CORRESPONDENCE_SEQ exists. Even so, hibernate fails to find the correct sequence name, and gives the following error:

...
Hibernate: select hibernate_sequence.nextval from dual
15-aug-2005 12:41:01 net.sf.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 2289, SQLState: 42000
15-aug-2005 12:41:01 net.sf.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: ORA-02289: sequence does not exist
...

For some reason, Hibernate insists on using the default sequence name hibernate_sequence.

Anyone knows what might be wrong?


Top
 Profile  
 
 Post subject: Solved
PostPosted: Mon Aug 15, 2005 8:52 am 
Newbie

Joined: Mon Aug 15, 2005 6:57 am
Posts: 7
Sorry for bothering; upgrade to hibernate 3 solved the problem.


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.