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
Explanation of Generic <T Extends Comparable<? Super T>> in Collection.Sort/ Comparable Code
Making Spring-Data-Mongodb Multi-Tenant
Do Not Use System.Out.Println in Server Side Code
Find Out What Jvm Eclipse Is Running On
Checked VS Unchecked Exceptions in Java
Jaxb Mapping Cyclic References to Xml
Differencebetween Reader and Inputstream
How to Disable 'X-Frame-Options' Response Header in Spring Security
Understanding Scanner's Nextline(), Next(), and Nextint() Methods
How to Remove Accents from a Unicode String
Java Erasure with Generic Overloading (Not Overriding)
Why Is Files.Lines (And Similar Streams) Not Automatically Closed
Java - Using Accessor and Mutator Methods
How to Enable Wire Logging for a Java Httpurlconnection Traffic