File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "can Watch "can New topic

can't connect to oracle

Zoltan Susan

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 ?
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

public class pp {
public static void main(String jj[]) {
try { sock1 = new"Systemname",1521);

} catch (Exception ex) {
I agree. Here's the link:
subject: can't connect to oracle
It's not a secret anymore!