-->
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.  [ 1 post ] 
Author Message
 Post subject: Empty Oracle Domain Table
PostPosted: Thu Jul 28, 2011 10:26 am 
Newbie

Joined: Fri Jan 21, 2011 5:59 pm
Posts: 1
We promoted new code to our production environment, and the application would not work.

The root error was: J2CA0045E: Connection not available while invoking method createOrWaitForConnection for resource jdbc/ORXAemployees.

The trace file appeared to indicate that the application used up all the connections in the connection pool, and eventually returned them. At least we seen that 10 connection close requests were issued (the max connections in the pool), and other applications waited until the application completed the response.

It turns out that the domain table was empty. Inserting one row to the table resolved the problem. Any ideas why this would be the case? Below are some specifics about our environment.

Thanks!


We tried the following connection settings:
Direct
Code:
<property name="hibernate.connection.datasource">jdbc/ORXAemployees</property>

Indirect
Code:
<property name="hibernate.connection.datasource">java:comp/env/jdbc/ORXAemployees</property>


The code to call the database:
Code:
@SessionTarget
Session session;
@TransactionTarget
Transaction transaction;

String tSQL = "from Employee emp " +
              "where emp.eventDate >= to_date('" + strBegDate + "','yyyy-mm-dd') and " +
              "      emp.eventDate <= to_date('" + strEndDate + "','yyyy-mm-dd') ";

StringBuffer hSQL = new StringBuffer(tSQL);
if(division != null) {
   hSQL.append("and emp.divisionName = '" + division + "' ");
}
hSQL.append("order by emp.eventDate, emp.divisionName ");

List<Employee> lstEmployee = new ArrayList<Employee>();
lstEmployee = session.createQuery(hSQL.toString()).list();



Environment:
Application Server: IBM Websphere Application Server 7.0
DB Server: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
JDBC Driver: Oracle JDBC driver, version: 11.1.0.7.0-Production
MVC Framework: Struts2 version 2.1.6
Object/Relational Mapping: Hibernate 3.3.0.SP1


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