My Oracle Support Banner

Connection Reset Exception When Trying to Connect Using JDBC Driver (Doc ID 1596089.1)

Last updated on JUNE 05, 2023

Applies to:

JDBC - Version 11.2.0.1.0 and later
Information in this document applies to any platform.

Symptoms

Application fails intermittently to connect to the database using Oracle JDBC driver with exception:

Exception in thread "main" java.sql.SQLException: Io exception: Connection reset
       at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:133)
       at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:134)
       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:247)
       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:327)
       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:752)
       at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:469)
       at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:511)
       at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:199)
       at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:29)
       at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:538)
       at java.sql.DriverManager.getConnection(DriverManager.java:582)
       at java.sql.DriverManager.getConnection(DriverManager.java:185)
       at ConnectTest.main(ConnectTest.java:48)
Caused by: java.net.SocketException: Connection reset
       at java.net.SocketInputStream.read(SocketInputStream.java:168)
       at oracle.net.ns.Packet.receive(Packet.java:236)
       at oracle.net.ns.DataPacket.receive(DataPacket.java:88)
       at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:168)
       at oracle.net.ns.NetInputStream.read(NetInputStream.java:113)
       at oracle.net.ns.NetInputStream.read(NetInputStream.java:88)
       at oracle.net.ns.NetInputStream.read(NetInputStream.java:73)
       at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1075)
       at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1050)
       at oracle.jdbc.driver.T4C8TTIdty.receive(T4C8TTIdty.java:515)
       at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:360)
       ... 7 more

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.