Re: Schema Change Error

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Robert Klemme (bob.news_at_gmx.net)
Date: 11/19/04


Date: Fri, 19 Nov 2004 15:32:01 +0100


"rahulkav" <rahulkav@discussions.microsoft.com> schrieb im Newsbeitrag
news:F331C7F1-E196-445B-AE0B-2D33FEDC4AC3@microsoft.com...
> Hi,
>
> We are getting following Exception in our Java application:
>
> ====================================================
>
> java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for
> JDBC][SQLServer]Could not complete cursor operation because the table
schema
> changed after the cursor was declared.
> at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
Source)
> at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown
> Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown
> Source)
> at
com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown
> Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSRequest.getRow(Unknown Source)
> at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.getRow(Unknown
Source)
> at
>
com.microsoft.jdbc.sqlserver.SQLServerImplResultSetServerSideCursor.positi
onCursor(Unknown Source)
> at com.microsoft.jdbc.base.BaseResultSet.next(Unknown Source)
>
> ---------------------------------------------------------------------
>
> We have a Java application which is running for 24 hours and we have
> implemented our own connection pooling. We are connected to SQL Server
2000
> with Serverice pack 3 installed.
>
> We get the above error when there is a schema change i.e. Creating a new
> table, Dropping an existing table. This schema change is done by a
stored
> procedure which is run in parallel with our Java application.
> We have restared our application but sometimes it doesn't make any
> difference. The tables created and droped are in tempDB.
>
> This error doesn't occur regularly and all environments. It seems to be
an
> intermittent error i.e. some bug in SQL Server.

I'd rather suspect it's an error in your application logic: you change
something concurrently that your cursor relies on. You need some kind of
mutual exclusion mechanism. Also, make sure you have closed all
statements and result sets when you return a connection to the pool.

Regards

    robert



Relevant Pages

  • Schema Change Error
    ... JDBC]Could not complete cursor operation because the table schema ... We have a Java application which is running for 24 hours and we have ... We get the above error when there is a schema change i.e. ... intermittent error i.e. some bug in SQL Server. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: xsd files only: enough to start writing app. code of a DB-related component ?
    ... junior Java programmer (know Java but this is a J2EE project ... These schema definition files aren't very numerous (about 20 ... claims to be able to generate database structure. ...
    (comp.lang.java.programmer)
  • Jaxb and xsd Help requested
    ... (Note the xsd below is part of a bigger xsd file i ... the source schema. ... Java content class for GuestCountType complex type. ...
    (comp.lang.java.programmer)
  • Changing the cursor graphic
    ... I have written an MFC application which can be embedded into a java application by means of JNI. ... My C++ app has its own cursor, which is displayed when the mouse is over the display of the C++ app in my OnSetCursor() handler, so it gets updated as soon as the mouse moves over it). ... I don't understand why the java app is changing the cursor, but I need to find a way of preventing it from happening or changing it back instantly. ...
    (microsoft.public.vc.mfc)
  • Re: Changing the cursor graphic
    ... I have written an MFC application which can be embedded ... into a java application by means of JNI. ... My C++ app has its own cursor, which is displayed when the mouse is over the ... I don't understand why the java app is changing the cursor, ...
    (microsoft.public.vc.mfc)