Io exception: SO Exception was generated
843854Jul 24 2003 — edited Mar 15 2006I need to connect as sys to an oracle 9i database. I keep getting the above error. Details below:
The test program run
java test
JDBC driver version is 9.2.0.1.0
Io exception: SO Exception was generated
try {
DriverManager.registerDriver ( new oracle.jdbc.driver.OracleDriver());
// test the connect with a non sys user and get the jdbc version
String connstr = "jdbc:oracle:thin:" + "user" + "/" + "pswd" + "@" + "host" + ":" + "port" + ":" + "database";
conn = DriverManager.getConnection (connstr);
this.getMetaVersion();
conn.close();
// now set up the sys as sysdba connection
java.util.Properties info = new java.util.Properties();
info.put ("user", "sys");
info.put ("password", "pswd");
info.put ("internal_logon","sysdba");
conn = DriverManager.getConnection "jdbc:oracle:thin:@database",info);
} catch (SQLException e) {
System.out.println(e.getMessage());
}