-->
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.  [ 3 posts ] 
Author Message
 Post subject: Oracle9i hangs
PostPosted: Wed Nov 26, 2003 4:52 pm 
Newbie

Joined: Wed Oct 22, 2003 1:07 pm
Posts: 10
Hi I am using
Oracle9i Release2,
jdbc Driver for 9.2.0.1 for jdk 1.4- ojdbc14.jar.

When I start tomcat, in my ContextListener, I try to create
SessionFactory by doing new Configuration().configure("/hibernate_astronomy.cfg.xml").buildSessionFactory();
it just hangs, it never prints the println statement after this line. During debugging, I realised that Hibernate is trying to get the connection as it prints out this on command prompt of Tomcat-

Nov 26, 2003 3:40:33 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Nov 26, 2003 3:40:33 PM net.sf.hibernate.dialect.Dialect <init>
INFO: Using dialect: net.sf.hibernate.dialect.Oracle9Dialect
Nov 26, 2003 3:40:34 PM net.sf.hibernate.util.NamingHelper getInitialContext
INFO: JNDI InitialContext properties:{}
Nov 26, 2003 3:40:34 PM net.sf.hibernate.connection.DatasourceConnectionProvider
configure
INFO: Using datasource: java:comp/env/jdbc/astronomyDS
Nov 26, 2003 3:40:34 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
INFO: Use outer join fetching: true

which means it is stuck at
Connection conn = connections.getConnection();
in SessionFactoryImpl

I am stuck. Any help is highly appreciated.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 26, 2003 5:31 pm 
Newbie

Joined: Wed Nov 26, 2003 3:03 pm
Posts: 9
Location: Denver, CO
Have you tried writing a small test JSP or something similar to make sure you can successfully retrieve the datasource via JNDI? It's kind of weird that it would just hang and not throw an exception...

Derek


Top
 Profile  
 
 Post subject: Re: Oracle9i hangs
PostPosted: Thu Nov 27, 2003 10:13 am 
Regular
Regular

Joined: Mon Oct 06, 2003 1:59 am
Posts: 52
Hi,

naveen0403 wrote:
Hi I am using
Oracle9i Release2,
jdbc Driver for 9.2.0.1 for jdk 1.4- ojdbc14.jar.

When I start tomcat, in my ContextListener, I try to create
SessionFactory by doing new Configuration().configure("/hibernate_astronomy.cfg.xml").buildSessionFactory();
it just hangs, it never prints the println statement after this line. During debugging, I realised that Hibernate is trying to get the connection as it prints out this on command prompt of Tomcat-

Nov 26, 2003 3:40:33 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
INFO: building session factory
Nov 26, 2003 3:40:33 PM net.sf.hibernate.dialect.Dialect <init>
INFO: Using dialect: net.sf.hibernate.dialect.Oracle9Dialect
Nov 26, 2003 3:40:34 PM net.sf.hibernate.util.NamingHelper getInitialContext
INFO: JNDI InitialContext properties:{}
Nov 26, 2003 3:40:34 PM net.sf.hibernate.connection.DatasourceConnectionProvider
configure
INFO: Using datasource: java:comp/env/jdbc/astronomyDS
Nov 26, 2003 3:40:34 PM net.sf.hibernate.impl.SessionFactoryImpl <init>
INFO: Use outer join fetching: true

which means it is stuck at
Connection conn = connections.getConnection();
in SessionFactoryImpl

I am stuck. Any help is highly appreciated.


you can create a Thread dump on the JVM process running tomcat to get the code causing the hung. This is done by kill -3 on Unix/Linux and CLTR-break on Win32.

There are many place that create a deadlock or a race condition. May be JDBC driver or maybe the connection pool (are you using commons-dbcp?).

_________________
"Wisest of the Maia was Ol


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