File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes using Oracle Sequences Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "using Oracle Sequences" Watch "using Oracle Sequences" New topic

using Oracle Sequences

blr sam

Joined: Jan 15, 2002
Posts: 7
Hi all,
I am using auto-key generation for CMP with Oracle in EJB2.0 on WL 6.1.
Everything works fine if i am start off with a blank table and start inserting/updating records.
If i already have some records in the table, when i try to insert some records using the sequence, Oracle throws a exception which is shown by the bean. When i check in Oracle, whats the last_number used, its the latest. Why does weblogic start using the sequence always from 1?
They only as of now is keep calling create - so that WL reaches that number....
Anybody knows what can be done here???
blr sam

Joined: Jan 15, 2002
Posts: 7
Hi All,
The current valus of the sequence in Oracle was itself reset to 1. When this was corrected
everything just worked.
Now i am having problems with date... : :roll:
Thanks anyway
I agree. Here's the link:
subject: using Oracle Sequences
Similar Threads
Basic question regarding Hibernate, Oracle and Sequence Numbers
registeration process logic
Insert records on table creation hibernate
getting Primary key when inserting
Hibernate-Oracle Sequence...