-->
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.  [ 9 posts ] 
Author Message
 Post subject: How to generate sequence for oracle db.
PostPosted: Sun Nov 23, 2003 2:49 pm 
Newbie

Joined: Sun Nov 23, 2003 1:46 pm
Posts: 15
Hi, I'm having a problema that is described on: http://forum.hibernate.org/viewtopic.php?t=925794
and i have a feeling that this is generated because the automatic sequence generation I'm trying to get using hibernate, the code fragment I'm using to do this follows:

Code:
<id name="id">
<generator class="sequence">
<param name="id">SQ_BD_SISTEMA</param>
</generator>
</id>


The pk field name is id and the sequence I have created for it is SQ_BD_SISTEMA, i've already tested with Weblogic8.1 automatic sequence generation for entity beans and it's working fine, so it's not a DB problem, I really think is an error sintax in that fragmet.
I also would like to find better documentation on this tags,if u know where, pls post a link.

tx in advance,

_________________
Marcos Maia


Top
 Profile  
 
 Post subject: new error
PostPosted: Sun Nov 23, 2003 3:08 pm 
Newbie

Joined: Sun Nov 23, 2003 1:46 pm
Posts: 15
Hi,

I have changed the xml to:

Code:
<id name="id" column="id">
<generator class="sequence">
<param name="sequence">SQ_BD_SISTEMA</param>
</generator>
</id>


and now I'm getting the follwing error:

Quote:
DBCP borrowObject failed: java.sql.SQLException: ORA-00604: error occurred at re
cursive SQL level 1
ORA-04031: unable to allocate 4200 bytes of shared memory ("shared pool","unknow
n object","sga heap","state objects")


It looks like I'll have to increase some parameter on oracle, any clues???

tx in adv,

_________________
Marcos Maia


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 23, 2003 3:55 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
try without DBCP to isolate the pb.

_________________
Emmanuel


Top
 Profile  
 
 Post subject: problem with dbcp
PostPosted: Sun Nov 23, 2003 4:42 pm 
Newbie

Joined: Sun Nov 23, 2003 1:46 pm
Posts: 15
Hi,

I tryied the same app without any changes using weblogic and it worked fine. Looks like DBCP has a bug with oracle driver????

_________________
Marcos Maia


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 23, 2003 6:10 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Why do you use dbcp with weblogic ? Weblogic datasources and pool already do the job and you paid for that.
I don't use external connection pooling mecanism when using a decent app server.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 23, 2003 7:24 pm 
Newbie

Joined: Sun Nov 23, 2003 1:46 pm
Posts: 15
Hi,

I problably expressed myself wrong(my english is not that good after all), wat I mean was that using weblogic it worked fine, I used weblogic pool and DataSource features of course, the problem is problably with catalina DBCP and oracle driver, where I get the errors.

regards,

_________________
Marcos Maia


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 11, 2004 10:06 am 
Newbie

Joined: Fri Feb 20, 2004 10:55 am
Posts: 13
The little house is falling down...

I'm not using dbcp, i use tomcat 5 with the hibernate built-in pool and i'm having the same problem with the sequence generation.

Anybody found the solution to this problem?

tks, Paulo Marcio


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 17, 2004 3:30 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
don't use hibernate built in pool in a production environment.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 14, 2004 12:12 pm 
Beginner
Beginner

Joined: Wed Aug 04, 2004 9:01 pm
Posts: 21
This is happening because the box you are running oracle on doesn't have sufficient memory allocated for the database. Try to increase the shared_pool_size on oracle side.


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