-->
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.  [ 4 posts ] 
Author Message
 Post subject: cannot get oracle connection
PostPosted: Mon Dec 22, 2008 4:44 pm 
Newbie

Joined: Mon Jun 16, 2008 1:15 pm
Posts: 15
Short Description:
Oracle throws ora-00604 and ora-04031, which sort of indicating that oracle used up its shared pool, but what made it really interesting is that:

1) There was no other operation competing for resources at that point (at least based on jboss log, and I assume that nothing other than so and so project runs on ts3).

2) Also this was the very first thing happened this morning, according to JBoss log. The last thing on Friday was successful, and TS3 was idle through the weekend. (What happened was that JBoss/Hibernate, was trying to grab a connection, so it could prepare a statement, but it couldn’t get any connection.)


Hibernate version: Default that came with JBoss 4.2.2

Mapping documents:n/a

Code between sessionFactory.openSession() and session.close():n/a

Full stack trace of any exception that occurs:
Code:
[org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Throwable while attempting to get a new connection: null

org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1

ORA-04031: unable to allocate 4064 bytes of shared memory ("shared pool","select distinct(-privilege#)...","sga heap(1,0)","kglsim heap")


Name and version of the database you are using:oracle 11g

The generated SQL (show_sql=true):
Code:
from SavedItemSearch as sis                             

           where (sis.allUsers = '1' or sis.personCreated = :personCreated


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 22, 2008 6:05 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
Any time I see "recursive" I figure that SGA might be in jeopardy. Same with Java stack space & recursive calls. Can you post the SQL generated, rather than the HQL?

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 22, 2008 7:25 pm 
Newbie

Joined: Mon Jun 16, 2008 1:15 pm
Posts: 15
cbredesen wrote:
Any time I see "recursive" I figure that SGA might be in jeopardy. Same with Java stack space & recursive calls. Can you post the SQL generated, rather than the HQL?


Here is the sql query, and it is rather simple:
Code:
select * from saved_item_searches sis

where (sis.all_users ='1' or sis.person_created =:person_created)

;


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 22, 2008 9:18 pm 
Red Hat Associate
Red Hat Associate

Joined: Mon Aug 16, 2004 11:14 am
Posts: 253
Location: Raleigh, NC
That's not generated by Hibernate. Turn on debug logging for org.hibernate.SQL in log4j or enable the property hibernate.show_sql=true.

_________________
Chris Bredesen
Senior Software Maintenance Engineer, JBoss


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