V
V
Vitaly2014-08-15 14:58:05
Oracle
Vitaly, 2014-08-15 14:58:05

Why does this error occur when working with Java-JDBC-Oracle?

My server written in Java receives various data from Oracle using the JDBC driver and during operation very often unexpectedly gives a Connection Wrong error and then refuses to work with Oracle, and this happens even with a small load on the database (more than 2-3 simultaneous connections do not happen) . At the same time, everything works fine through SQL Plus and SQL Developer, and the problem is solved only by restarting Oracle.
Prompt, in what there can be a reason.
The following error occurs:

oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:489)
oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:553)
oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:254)
oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:528)
java.sql.DriverManager.getConnection(Unknown Source)
java.sql.DriverManager.getConnection(Unknown Source)
com.database.JdbcConnect.Connect(JdbcConnect.java:21)
com.database.DBOperation.connect(DBOperation.java:45)
com.database.DBOperation.getNotify(DBOperation.java:293)
com.database.DBOperation.getUnreadNotifyCount(DBOperation.java:249)
com.server.ClientHandler.getUnreadNotifyCount(ClientHandler.java:223)
com.server.ClientHandler.messageReceived(ClientHandler.java:76)
com.server.ClientHandler.handle(ClientHandler.java:40)
com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
sun.net.httpserver.AuthFilter.doFilter(Unknown Source)
com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(Unknown Source)
com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
java.lang.Thread.run(Unknown Source)


1) Connections at the dedicated server
2) limit on the maximum number of connections:
e02f225651cc44a6a368dc5f88245686.bmp

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly, 2015-07-02
@silverhawk90

The problem was solved. The problem was in the overflow of allocated memory for Oracle due to the fact that open cursors were not automatically closed when disconnecting from the database.

D
Danila, 2014-08-19
@Ke1eth

Is there any statistic about how long it takes?
And another question: is this the only connection created or taken from the connection pool?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question