These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Problem running example included in hibernate.zip
PostPosted: Thu Jun 08, 2006 3:22 am 
Newbie

Joined: Thu Jun 08, 2006 3:00 am
Posts: 1
Hi guys..
i am very very new to hibernate... I've installed the Events & Person example in hibernate.zip. I am following all the instruction as available in the docs...
When i run the example, it shows all kind of information on the console, making it obvious that it has located oracle drivers and table mentioned in *.hbm.xml and also shows CRUD sql syntax but in the end it throws the following exception:

DEBUG JDBCExceptionReporter:63 - could not get next sequence value [select .hibernate_sequence.nextval from dual]
java.sql.SQLException: ORA-00936: missing expression

What i am missing here...plz tell
following is what i am using....
IDE: Eclipse 3.1.1 Ide
Database: Oracle 9i
hibernate: hibernate 3.1.3
JDK: 1.5
Driver: ojdbc14.jar (Oracle 10g driver <oracle.jdbc.driver.OracleDriver>)
dialect: <org.hibernate.dialect.Oracle9Dialect>
Aashu


Top
 Profile  
 
 Post subject: Re: Problem running example included in hibernate.zip
PostPosted: Thu Jun 08, 2006 3:53 am 
Beginner
Beginner

Joined: Wed May 17, 2006 3:38 am
Posts: 45
If one wants to use database generated id(using sequnce), and not want hibernate to generate the id, then us the following:

<generator class="native">
<param name="sequence">name_of_sequence</param>
</generator>


where name_of_sequence refers to the database sequence....try it.

_________________
===============================
Rate, if it helped


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

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.