Forums Register Login

Strange problem in Tom CAT + oracle +JDBC connection

+Pie Number of slices to send: Send
Hi
I need to invoke a simple servlet which has JDBC
connection with oracle9i. I am able to create connetion with
Web Logic successfully But now I am trying to make it with jakarta tom cat 5.0.16 which giving me problem

Problem Statement :

First Part
***********

When Oracle service is stopped on my machine,

I am able to invoke servlet from browser and it is showing Debugging statement and showing this error ------>

Exception was thrown: ORA-06401: NETCMN: invalid driver designator
-----------------------------------------------------------------------

Second Part
**********

When oracle service is running on my machine

no response from Tom cat console and even No connetion <br>
between BROWSER AND TOM CAT ie. browser is not invoking servlet by hitting url .

My code for JDBC connection is
-------------------------------


<<<
System.out.println("Establishing driver");
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection("jdbc racle ci:@HostName:1521 rcl","scott","tiger");
System.out.println("connetion established ");

Essence is
*************

So not getting response from tom cat when oracle service is running is one problem and Not sure about connection string is second problem ....

pls help me regarding this

thanks a lot in advance
+Pie Number of slices to send: Send
Dear Pallav,

pelase provide following information

1. Are you getting any System.out.println on console
2. put your code in try catch block if it is not in try-catch
3. if you are getting any exception what is it
4. verify your classpath if oracle.jdbc.driver.OracleDriver is in your classpath

hope after verifying these steps your problem will solve.
+Pie Number of slices to send: Send
Hi Shailesh,
I started Tom cat server and oracle services was running, then I hit the url,first it promp user/password dialogue box above then written XDB , so I have given scott / tiger, then it says PAGE NOT FOUND
ERROR 404 ..
now I am getting error whether tom cat is running or not
and is it problem related with tom cat realms??
+Pie Number of slices to send: Send
By assuming that you are gettin this 404 error from you r tamcat server, i think that your tomcat is running fine.
+Pie Number of slices to send: Send
 

Originally posted by Pallav sharma:


Not sure about connection string is second problem ....




Pallav,
Even I thing your tomcat is running fine.
try to run examples of tomcat to verify that tomcat has no problem

and you didn't tell if you are gettting any System.out.println in console.

even if your problem is with connection , you should get "Establishing driver" printed in console.

and try to make thin connection by using string

DriverManager.getConnection("jdbc racle:thin:@HostName:1521 rcl,"scott","tiger");

is there any stackTrace in your console.
+Pie Number of slices to send: Send
Hi Shailesh,

About Tom Cat
*************
Tom cat is fine since I am getting test messages in Tom cat console WHEN oracle service is not running on those run Listner is not there Exceptions are coming which is obvious.

what is happening
*****************

Again I am telling you what is happening here please do give attention

1 start Tom cat
2 oracle service is running
3 given path in url to invoke servlet
4 user password box pop up and just below the heading bar XDB is written
5 I given the scott/tiger
6 error 404 is came

and NO response in tom cat server console

if oracle service not running
so 4 and 5 step never comes only
in 6 step blank screen will come

and In Tom cat console EXCEPTION : No listner is there
will come ...



sorry for big story but only this is my problem
and No example for JDBC connetion is there in Tom cat example
other example is running fine ..

thanks for your efforts
+Pie Number of slices to send: Send
what driver are you using for ORACLE.

is it thin driver, or
oci driver.

thin driver requires SID
oci driver requires TNS service name

for TNS service name the listener must be configured. just check it.
Whatever. Here's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1510 times.
Similar Threads
Oracle d.b URL explanation please
NameNotFoundException with MS Access
WSAD Connectivity to remote Oracle 8i db for enity ejb mapping
Netbeans and MS Access
Problem in inserting record to Oracle Database.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:12:13.