How to Approach a "Got Minus One from a Read Call" Error When Connecting to an Amazon Rds Oracle Instance

How to approach a Got minus one from a read call error when connecting to an Amazon RDS Oracle instance

The immediate cause of the problem is that the JDBC driver has attempted to read from a network Socket that has been closed by "the other end".

This could be due to a few things:

  • If the remote server has been configured (e.g. in the "SQLNET.ora" file) to not accept connections from your IP.

  • If the JDBC url is incorrect, you could be attempting to connect to something that isn't a database.

  • If there are too many open connections to the database service, it could refuse new connections.

Given the symptoms, I think the "too many connections" scenario is the most likely. That suggests that your application is leaking connections; i.e. creating connections and then failing to (always) close them.

Oracle 12c connection error:-Got minus one from a read call

In my case the issue, it is due to a malware. Whenever i am trying to connect to DB port, it was automatically getting changed by malware.

You can also identify the problem by using lsnrctl status command, for further information. You can also see the log file of listener.

Run a full scan on your machine and restart listener, hope that helps.

Found issue in java application connecting with oracle database,SQLException: Io exception: Got minus one from a read call ,how I can solve it?

Problem is solved, there was a problem in Oracle listener.
My listener wasn't active.

Always got ClassNotFound error when trying OpenJDK 11 + ojdbc10.jar for Oracle 19c

Change this line of your code:

Class.forName("oracle.jdbc.driver.OracleDriver");

to this:

Class.forName("oracle.jdbc.OracleDriver");

Refer to Oracle documentation, namely JDBC Developer's Guide

However, you no longer need to explicitly load the [JDBC] driver class so you can actually remove that line altogether. Refer to this SO question:

Class.forName(JDBC_DRIVER) no longer needed?

Also, the format of the connection URL has changed. Refer to Oracle Database XE Quick Start. Try the following:

jdbc:oracle:thin:@//localhost:1521/xe


Related Topics



Leave a reply



Submit