|
ORA-17002: Io exception: %s
This can have several causes and is indicated by the string following this error code. One possible cause is that the database is configured for Multi Threaded Server mode, you might get the 'Network Adapter Could not Establish Connection' error. If this is the case, make sure the fully qualified host name of the server the database is running on is resolvable from the client you're trying to make the connection from. When the database is configured in MTS mode, the servername (as seen by lsnrctl command) is passed back to the client and the client reconnects to a shared process at that hostname. Often, the domain is not added to the server name, and if the client is residing in a different domain, this can cause problems. Following example will show you what happens when an invalid connection string is entered. There is a database running at the correct server, we provide the correct SERVICE_NAME, however, the port is incorrect:
String cs;
cs = readEntry ("connectionstring (machine:port:sid) : ");
String user;
user = readEntry ("user: ");
String pw;
pw = readEntry ("Password: ");
// connect to the database
final Connection conn = DriverManager.getConnection( "jdbc:oracle:thin:@"+cs, user, pw );
Running the Java program:
connectionstring (machine:port:sid) : dev01:1522:ORA920
user: muyser
Password: **********
Failed to connect for the following reason:
17002: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093120)(ERR=12505)(ERROR_STACK=(ERROR=(CO
DE=12505)(EMFI=4))))
java.sql.SQLException: Io exception: Connection refused(DESCRIPTION=(TMP=)(VSNNUM=153093120)(ERR=12505)(ERROR_
STACK=(ERROR=(CODE=12505)(EMFI=4))))
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3664)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:353)
at oracle.jdbc.driver.OracleConnection.
The error stack provided us with another error, namely ERR=12505.The ORA-12505 error can provide more information about what happened. Forum Messages
Add your message for ORA-17002
| |||
