This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes can't connect to oracle Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "can Watch "can New topic
Author

can't connect to oracle

Zoltan Susan
Greenhorn

Joined: Jul 04, 2002
Posts: 2
Hello !
I can connect to Oracle 8.1.6. server with this methods (from a simple class).
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection ("jdbc racle:thin:@qwert:asdfg:yxcvb", "scott", "tiger");
But if I try to do this from a servlet, I get the "no more data to read from socket" exception.
(from the getConnection method)
What is the problem ?
Thanks.
Graham Thorpe
Ranch Hand

Joined: Mar 25, 2002
Posts: 265
If u r using oracle thin driver then run this one and observer whethere is connected or not

import java.io.*;
public class pp {
public static void main(String jj[]) {
try {
java.net.Socket sock1 = new java.net.Socket("Systemname",1521);
System.out.println(sock1);

sock1.close();
} catch (Exception ex) {
ex.printStackTrace();}
}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can't connect to oracle
 
Similar Threads
Network Adapter
java.io.IOException: Server returned HTTP response code: 500 for URL: http://localhost/HSMS/xmlcomm.
Struts: DB Connection
Oracle 7 and JDBC
connect to database