-
1. Re: Oracle Connection Pool Hanging at Startup
smagoun Aug 31, 2001 10:49 AM (in response to timhaley)I second the motion....at least some useful output in normal (not debug) mode would be nice, since this is an error condition that's not obvious to most people. Our web guys are using JBoss to build a frontend for our app, and they have a bad habit of not setting up their systems correctly. Even a message that says "Database connection broken" would be useful, since they wouldn't panic about "it just stopped working!"
-
2. Re: Oracle Connection Pool Hanging at Startup
ianb Aug 31, 2001 2:13 PM (in response to timhaley)The only time I have encounterd this problem is when the Data source definition is wrong. Check your URL is correct - right SID, etc. Is your tnslistener running? Another problem I have found (but it's probably not applicable here as you are using the thin driver and are using localhost) is if you rename your machine you will have entries in listener.ora which refer to the old machine name.
-
3. Re: Oracle Connection Pool Hanging at Startup
deanf Sep 5, 2001 1:53 AM (in response to timhaley)TimHaley,
I had the exact same problem. After reading your question and the answers, I wrote a small Java program that connected using the thin driver. That program did not get a connection, so I knew it was not JBoss. I ended up rebooting my Linux box that hosts the db. Once I did that and restarted the database and listener, the program worked. I then tried JBoss and it worked. I tried my program a couple of more times and it failed after a couple of connects. Therefore, I have a problem in my database someplace. That being said, you can use the code below (modified for your URL) to test your driver.
import java.sql.*;
import oracle.jdbc.driver.*;
import java.math.*;
public class Test {
public static void main(String[] args) {
System.out.println("starting test program");
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn2 = DriverManager.getConnection("jdbc:oracle:thin:@192.168.1.111:1521:ora8",
"scott",
"tiger");
System.out.println("Got connection");
}
catch (Exception e) {
System.out.println(e);
}
}
}
I found out that the listener was confused or my db was confused. I'm running Oracle 8 on Linux - I rebooted, started the db and the tnslsnr process - once I did, everything worked fine.
I figured out I had a problem by writing a -
4. Re: Oracle Connection Pool Hanging at Startup
deanf Sep 5, 2001 2:08 AM (in response to timhaley)Me again - forget the junk on the bottom of the previous reply - left over bytes.
After further review, I think that everything is OK until I run JBoss. When I start JBosss, it gets a connection OK, but then I can't get one using another Java program (like the test program I supplied above). This happens even after shutting JBoss down. I have to kill and restart the tnslsnr process on the database host to resolve the problem.
Note - this happens most of the time, although once it only failed after starting JBoss, stopping it and then restarting it.
Sooooooooo, what is JBoss doing and why? -
5. Re: Oracle Connection Pool Hanging at Startup
thedug Sep 5, 2001 2:23 AM (in response to timhaley)JBoss tests connections.. If it can't get a connection it blocks.. if blocking is set to true. Which is what you are witnessing. I believe jBoss 2.4 has a timeOut setting for blocking...
-
6. Re: Oracle Connection Pool Hanging at Startup
atatinen Sep 5, 2001 3:54 AM (in response to timhaley)this could be really dumb...but just for the kicks please change ur name in the URL to actual name of ur machine or IP number (not 127.0.0.1).
i had a similar problem and that resolved my issue. i am not sure if it is the same but if it is well and good.
the problem seems with the thin driver that it actually tries to do a DNS resolution.
well its just a thought...give it a try and please let me know if it works. -
7. Re: Oracle Connection Pool Hanging at Startup
thedug Sep 5, 2001 11:22 AM (in response to timhaley)Also, did you notic that the SIDs are different?