| Author |
Strange problem in Tom CAT + oracle +JDBC connection
|
Pallav sharma
Greenhorn
Joined: Oct 18, 2004
Posts: 3
|
|
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
|
 |
Shailesh Chandra
Ranch Hand
Joined: Aug 13, 2004
Posts: 1076
|
|
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.
|
Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
|
 |
Pallav sharma
Greenhorn
Joined: Oct 18, 2004
Posts: 3
|
|
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??
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
|
By assuming that you are gettin this 404 error from you r tamcat server, i think that your tomcat is running fine.
|
 |
Shailesh Chandra
Ranch Hand
Joined: Aug 13, 2004
Posts: 1076
|
|
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.
|
 |
Pallav sharma
Greenhorn
Joined: Oct 18, 2004
Posts: 3
|
|
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
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
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.
|
 |
 |
|
|
subject: Strange problem in Tom CAT + oracle +JDBC connection
|
|
|