-->
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.  [ 5 posts ] 
Author Message
 Post subject: Unique constraint on table bid while install
PostPosted: Fri Jan 27, 2006 11:32 am 
Newbie

Joined: Fri Jan 27, 2006 11:14 am
Posts: 3
Hi all,
I've been trying to install hibernate 3.1 on windows and a Oracle 8i database. I've followed the installation guide copying the jar's in the directories. Having ant installed on my node the next step would be to run build eg. this seems to be ok but then the installation fails with a unique constraint violation when doing a insert on the table "bid". The installation creates three tables AUCIONITEM, AUCTIONUSER, BID but then it fails throwing a ora-00001 error for the table bid. I've checked the relevant sequence and it always stops at position 27.

Any ideas?

M


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 27, 2006 12:49 pm 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
Is your Dialect properly configured and do you use the primary key generator apropiate to your database. You can read more about this in the Hibernate Reference right at the beginning. (example)

Look in the wiki for information about oracle sequence/increment generation.

Regards Sebastian

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 2:48 pm 
Newbie

Joined: Fri Jan 27, 2006 11:14 am
Posts: 3
Sorry have to bring this up again.
Still get the same error with the example application eg to be installed during the installation (running "ant eg"). I have checked the Dialect and changed to to dialect.OracleDialect and have also searched this forum for hours now.
Any other ideas why hibernate throws me this error message SQLState:23000 and ORA-00001 during the initial installation. Again the tables are getting created (AUCTIONITEM, AUCTIONUSER,BID) and also the HIBERNATE_SEQUENCE but the build fails all the time .

Any ideas are highly appreciated

M


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 3:17 pm 
Senior
Senior

Joined: Tue Aug 23, 2005 8:52 am
Posts: 181
Are you sure your Tables are all empty before you run the install? 23000 and ORA-0001 are for "integrity constraint violation", so it looks like you ran it once successfully and then continue inserting records with the same key (or a column that has a unique index) . Thats probably why Oracle is complaining


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 31, 2006 4:28 pm 
Newbie

Joined: Fri Jan 27, 2006 11:14 am
Posts: 3
Well the tables are not exsisting to start with. They will get created during the build process same with the sequence and all other constraints. I have more the feeling that its trying to run the same sql statement twice into the same table such as:

insert into bid values ("1", "foo", "bar");
insert into bid values ("1", "bar", "foo");

where 1 is the primary key and therefore it fails. The sequence stops at 21 at each run. I'm just wondering if there are others to run into the same problem. It's a quite common installation (W2K, Oracle 8i, Hibernate 3.1). And its the blank installation and I'm not able to get hibernate up and running in the first place unless I get over the build process.

M


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.