facebook

error: "ORA-02289"

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #267574 Reply

    predbit
    Member

    Hi everybody,
    I obtain this error while trying to insert a record in a table with a sequence id: “ORA-02289: sequence does not exist”.
    I already read related discussion, and understood that this error generally refers to an uncorrectly specified sequence name, but I’m sure this is not my case!!

    Following there is part of the table mapping:

    
    <generator class="sequence">
              <param name="sequence">MY_SEQUENCE</param>
    </generator>
    

    I am using Hibernate with Oracle database.. Can anyone help me?

    Thanks in advance, and sorry if my English isn’t perfect!

    #267624 Reply

    Haris Peco
    Member

    predbit,

    You have to create sequence MY_SEQUENCE in your schema (as your default or login user).The command is like this :

    CREATE SEQUENCE MY_SEQUENCE
    START WITH 1
    INCREMENT BY 1

    Regards,

    #267665 Reply

    predbit
    Member

    Thanks Peco..

    But I have that sequence in DB..

    My problem was probably due to something in the cache of JBoss… I was going crazy!!!!

    #267679 Reply

    Haris Peco
    Member

    I suppose that you have sequence in another schema/user.
    Check if your login credentails and seqeunce’s schema are the same.
    You can try add schema prefix in sequence param as :

    <param name=”sequence”>YOUR_SCHEMA.MY_SEQUENCE</param>

    Regards,

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: error: "ORA-02289"

You must be logged in to post in the forum log in