Hi all, I am having a bit of a problem making a simple database connection. Here is my code:
My original problem was �class not found�, but I moved my ojdbc14.jar file into my apache/tomcat5.5/shared/lib directory. Now I�m getting a �connection refused� error, but I can successfully use the same password and username when logging in through SQL Plus.
Does this have something to do with my tnsnames.ora file?
Did I put the ojdbc14.jar file in the right directory?
-Thanks [ March 08, 2005: Message edited by: Chris Staten ]
It was in my URL. The URL for the thin driver has a couple of different formats, but the one I'm using is:
*remove the "-" infront of "oracle" and "PORT" in the URL, I was just trying to remove the emotes.
My service name in the URL above was SERVICE.WORLD. This is also how it looked in my tnsnames.ora file. However, I didn't need the .WORLD portion of the SERVICE_NAME. I made the adjustment by changing SERVICE.WORLD to SERVICE (e.g. TESTDATABASE.WORLD became TESTDATABASE) and it now works.
[ March 08, 2005: Message edited by: Chris Staten ]
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop