Menu

Cannot Find Stored Procedure

Help
2005-06-20
2012-08-15
  • rich_bond_11

    rich_bond_11 - 2005-06-20

    jTDS - Version 1.0.3
    MSSQL - SQL2000 Service pack 3.
    Even though all the primary key constraints are met - when we execute an UPDATE on a Table we are getting this error reported:

    2005-06-20 14:33:26,846 java.sql.SQLException: Could not find stored procedure '#jtds000019'.
    at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:364)
    at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2778)
    at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2214)
    at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:597)
    at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:465)
    at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:427)
    at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeUpdate(JtdsPreparedStatement.java:397)
    at com.bis.dbservices.metadatamanager.propertymetadatadao.PropertyDAO.updateProperty(PropertyDAO.java:489)
    at com.bis.dbservices.metadatamanager.MetaDataManager.updateProperty(MetaDataManager.java:3070)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
    at sun.rmi.transport.Transport$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

     
    • Alin Sinpalean

      Alin Sinpalean - 2005-06-21

      This is caused by the combination of some more serious issue (such as a deadlock detected by the server) that caused a rollback and the use of temporary stored procedures by jTDS as implementation for preparing statements. jTDS can handle its own rollbacks but when the server does a rollback because of an error, jTDS doesn't know about it and so it doesn't remove the temporary stored procedure from the cache.

      With jTDS 1.1 the default implementation for prepared statement handling has been changed from temporary stored procedures (prepareSQL=1) to sp_prepare/sp_execute (prepareSQL=3), so a simple upgrade to 1.1 should make this problem disappear. However you seem to be having a more serious problem (probably a deadlock) which you should look into anyway. Check the rest of your error log.

      Alin.

       

Log in to post a comment.