This content has been marked as final. Show 5 replies
can you provide your stack trace? Do you use suitable drivers for your database?
Does your error looks like this?:
java.sql.SQLException: No more data to read from socket
This error most likely occurs in applications that use a database connections pool. When the application checked out a connection that has been timed out or has been staled, and used it to connect to the database, this error occurs.
You may need start your Oracle database server as well as your Java application. In a better designed system, however, the staled connection should be cleared out and a new connection should be establised automatically.
This means the pooled connections have died. The DBMS or a firewall has
killed them. Does your pool have test-connections-on-reserve set true?
It should. That should take care of the problem.
I am actually running a standalone application that does not have a connection pool.
My stack trace looks like the following:
java.sql.Exception: No more data to read from socket
Please do not be decieved from the rollback part. That is not where the error stems from. I know this because I have the rollback being performed in the catch block. When I commented it out there was still a SQLException thrown by the executeUpdate call I made.
Sorry I left out that I am using the ojdbc driver.
- which version of the driver & which database version?
- please provide your code snippet
- please comment out your rollback(); take only a System.out.println(Exception e)
My DBA solved the problem . She had not yet spatially indexed the shape column I was trying to insert into. After she indexed it everything worked fine.