Hibernate Books

All times are UTC - 5 hours [ DST ]

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: ORA-02289 sequence does not exist
PostPosted: Wed Nov 07, 2012 2:23 am 

Joined: Wed Nov 07, 2012 2:14 am
Posts: 1

While developing a web application using spring and hibernate i am getting the following execption.

java.sql.SQLException: ORA-02289: sequence does not exist

While i am trying to insert the data into a table i am usign sequence to increment the value of request_id.

I am using the following coding for inserting

public class HibernateConfig
public static SessionFactory sessionFactory;
public static SessionFactory getSessionFactory()
sessionFactory = new Configuration().configure().buildSessionFactory();
return sessionFactory;
public void postRequest(RequestInfo requestInfo)
Session session = null;
Transaction trans = null;
SessionFactory sessionFactory = null;

session= sessionFactory.openSession();
trans = session.beginTransaction();


In hibernate mapping i have mentioned like this

<id name="requestId" type="int" column="request_id" >
<generator class="sequence">
<param name="sequence">REQUEST_INFO_SEQ</param>

i am using oracle 11g.

Can any one give me solution for this.

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

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.