This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman 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

Win a copy of Elasticsearch in Action this week in the Big Data forum!
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
It is sorta covered in the JavaRanch Style Guide.
subject: using Oracle Sequences