This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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
It's not a secret anymore!