CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2005
    Posts
    1

    SQL State: JZ006 SQL Exception Error Code: 0

    I get the following exception when I try to execute a expansive query on a sybase database. The funny part is the exception is not raised always but when the database is really busy/slow.

    The query which i am executing selects data into a temp table, and when processing is over, drops the table. Now whenver this exception is raised, the temp table doesnot get dropped which leads to the inablilty of the application to execute further queries as the database complains that the temp table already exists. By the way, the query is preceded by a statement which should drop the temp table if it already exists. So i cant seem to figure out why the database should complain that the table already exists.


    10:16:45.Thread-17.infracore.jdbc.ClsDbDataBase: SQL Exception Error Code: 0 SQL State: JZ006
    Error Message : JZ006: Caught IOException: java.io.IOException: JZ0PA: The query has been cancelled and the response discarded. The cancel was probably issued by another statement on the connection.
    java.sql.SQLException: JZ006: Caught IOException: java.io.IOException: JZ0PA: The query has been cancelled and the response discarded. The cancel was probably issued by another statement on the connection.
    at com.sybase.jdbc2.jdbc.ErrorMessage.raiseError(ErrorMessage.java:467)
    at com.sybase.jdbc2.tds.Tds.handleIOE(Tds.java:2815)
    at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1759)
    at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
    at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:201)
    at com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:182)
    at com.sybase.jdbc2.jdbc.SybStatement.executeLoop(SybStatement.java:1596)
    at com.sybase.jdbc2.jdbc.SybStatement.execute(SybStatement.java:1588)
    at com.sybase.jdbc2.jdbc.SybCallableStatement.execute(SybCallableStatement.java:129)
    at com.gs.cls.infracore.jdbc.ClsDbDataComm.execStatement(ClsDbDataComm.java:229)
    at com.gs.cls.infracore.jdbc.ClsDbDataBase.execSql(ClsDbDataBase.java:561)
    at com.gs.cls.infracore.jdbc.ClsDbDataBase.execSql(ClsDbDataBase.java:510)
    at com.gs.cls.infracore.ui.ClsTableModel.loadData(ClsTableModel.java:459)
    at com.gs.cls.infracore.ui.ClsTablePane$4.run(ClsTablePane.java:548)

    Does someone have any idea why something like this can occur? I want to know if it is a problem with the sybase driver, or if it is a problem with my code. I found reference to the exception code JZ006 being linked to StaleConnectionException. Can someone help?

  2. #2
    Join Date
    Jun 2019
    Posts
    1

    Re: SQL State: JZ006 SQL Exception Error Code: 0

    I am having similar problem. How did you solve this issue?

  3. #3
    Join Date
    Jun 2019
    Posts
    2

    Re: SQL State: JZ006 SQL Exception Error Code: 0

    > try to execute a expansive query on a sybase database. The funny part is the exception is not raised always but when the database is really busy/slow

    well, this looks like a DATABASE problem, not JAVA problem.
    try to execute your SQL from some SQL client app and reproduce the problem.

    If you can reproduce it with standard SQL client app - you know that the problem is somewhere in your SQL statements or in the DB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured