Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Io exception: SO Exception was generated

843854Jul 24 2003 — edited Mar 15 2006
I 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());
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 12 2006
Added on Jul 24 2003
8 comments
12,704 views