FreeTDS-JDBC driver: Intermittent and random SQLException

Suddaby, Rod RSuddaby at NRCan.gc.ca
Tue Dec 7 12:47:22 EST 1999


Hi all,
  When INSERTing rows into a MS SQLServer 7.0 DB I get a SQLException error
with
the following stack trace:

       java.sql.SQLException: Statement was not known by the connection
	      at java.lang.Throwable.fillInStackTrace (Native Method)
	      at java.lang.Throwable.fillInStackTrace (Compiled Code)
	      at java.lang.Throwable.<init> (Compiled Code)
	      at java.lang.Exception.<init> (Compiled Code)
	      at java.sql.SQLException.<init> (Compiled Code)
	      at com.internetcds.jdbc.tds.Statement.close (Compiled Code)
	      at com.internetcds.jdbc.tds.Statement.finalize
(Statement.java:96)
	      at java.lang.ref.Finalizer.runFinalizer (Compiled Code)
	      at java.lang.ref.Finalizer.access$1 (Compiled Code)
	      at java.lang.ref.Finalizer$FinalizerThread.run (Compiled Code)

  This exception is thrown during a batch update to the DB using the
Statement.executeUpdate() method.
(I'm just reading in a text file of space delimited values and inserting
into SQLServer)

The odd thing is:
         a) the record being inserted at the time the exception is thrown is
inserted successfully into the DB table.
         b) the exception is not thrown every time the process executes, and

         c) if run on the same input data file, it is not thrown at the same
location

Does anyone have any pointers?
Thanks for any advice.
Rod.
Rod M. Suddaby
rsuddaby at NRCan.gc.ca
Information Systems Specialist                                 Phone: (780)
435-7246
Canadian Forest Service
Northern Forestry Centre
Edmonton, Alberta



More information about the FreeTDS mailing list