5 Replies Latest reply on Aug 17, 2006 2:28 PM by 503237

    SQLException No more data to read from socket

      I have built in my java code 2 dimensional curves (lines) and multicurves(multilines) using the JGeometry API. Yet when I try executeUpdate on my prepared statement to load them I get the above SQLException error "No more data to read from socket."
      I actually have more values that go in the row of data which I can load as long as the shape is not being loaded. In fact as long as I set the column to null everything gets loaded ( I create a dummy JGeometry object, call store on it to create A STRUCT object and then call STRUCTS getSqlValue method and use that in PreparedStatement's setNull method.)
      Has anyone expierenced a similar problem? Is there perhaps a limitation on the size of multiline one may have?
        • 1. Re: SQLException No more data to read from socket

          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
          at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
          at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
          at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:1160)

          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.

          regards, Andreas
          • 2. Re: SQLException No more data to read from socket
            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
            at oracle.jdbc.driver.DatabaseError.check_error(DatabaseError.java:885)
            at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:991)
            at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:941)
            at oracle.jdbc.driver.T4C70commoncall.receive(T4C70commoncall.java:97)
            at oracle.jdbc.driver.T4CConnection.do_rollback(T4CConnection.java:465)
            at mypackage.MyClass.load(MyClass.java:341)
            at mypackage.MyClass.main(MyClass.java:384)

            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.
            • 3. Re: SQLException No more data to read from socket
              Sorry I left out that I am using the ojdbc driver.
              • 4. Re: SQLException No more data to read from socket

                - 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)

                regards, Andreas
                • 5. Re: SQLException No more data to read from socket
                  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.