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.(OracleConnection.java:371)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:551)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:351)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at ora17003.main(ora17003.java:25)
The error stack provided us with another error, namely ERR=12505.The ORA-12505 error can provide more information about what happened.
Welcome to our forum for Oracle error: ORA-17002 Add your own message
getting error as Io exception: Got minus one from a read call, when trying to connect to Database from Java Code.
Add your message
Ask Your Question
If you need more information about this particular error message, you can leave a forum message.
We are replying to this message whenever we have some spare time, so please do not consider this as a private 'solve my critical issue asap' service.
Should you need professional Oracle Assistance to make your project a success, please have a look at our consultancy services.
Spam Protection
In order to prevent automatic generation of messages, we are asking for a validation code. This code is unique and is generated every time a new message is asked.
If you do not enter the validation correctly, your message will not be recorded.
Forum Rules
Please be polite, do not USE ALL UPPERCASE, no insults, violance or any other threats.
