Results 1 to 12 of 12
  1. #1
    Join Date
    Jul 2009
    Posts
    8

    Unanswered: CLI0601E Invalid statement handle

    I've run my Java program in the DB2 server. It returns all values needed but in the end the error below occured :

    COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0601E Invalid statement handle or statement is closed. SQLSTATE=S1000

    There are no data inserted into the table in the database.

    Please tell me what is going on?


  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Maybe if you post the DB2 version and OS, along with the code that is causing the problem, you might get some constructive help.

    Andy

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Staying on the same level of details: your application has a bug that causes the statement handle to be invalidated. That's why DB2 is giving you this error.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  4. #4
    Join Date
    Jul 2009
    Posts
    8
    Quote Originally Posted by ARWinner
    Maybe if you post the DB2 version and OS, along with the code that is causing the problem, you might get some constructive help.

    Andy
    Currently, I am using the Db2 ver 8.2
    Server p series.
    OS AIX 1.3.

    Thank u very much

  5. #5
    Join Date
    Jul 2009
    Posts
    8
    Quote Originally Posted by stolze
    Staying on the same level of details: your application has a bug that causes the statement handle to be invalidated. That's why DB2 is giving you this error.

    Thank u for ur answer.
    How can I detect the bug?

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by makweatan
    Thank u for ur answer.
    How can I detect the bug?
    Yoo hawe ollreadee deeteckted ze bahg. Nau yoo nied two ficks ze same.
    ---
    "It does not work" is not a valid problem statement.

  7. #7
    Join Date
    Jul 2009
    Posts
    8
    Quote Originally Posted by n_i
    Yoo hawe ollreadee deeteckted ze bahg. Nau yoo nied two ficks ze same.

    Sorry....haha....

    what I meant was how to get rid of the bug? Is there any application to do it? I am soo new in DB2....thanks....


  8. #8
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    It might be quite difficult to guess without seeing the code, don't you think? This kind of error generally happens when you close a cursor (explicitly or by a commit) and then try to fetch from it.
    ---
    "It does not work" is not a valid problem statement.

  9. #9
    Join Date
    Jul 2009
    Posts
    8
    Quote Originally Posted by n_i
    It might be quite difficult to guess without seeing the code, don't you think? This kind of error generally happens when you close a cursor (explicitly or by a commit) and then try to fetch from it.

    I want to paste the code but it's too long....

  10. #10
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Then reduce the code to a few lines that still exhibit the problem. I guess once you are down to a few dozen lines, you'll find the problem yourself rather quickly.

    The alternative is that you start to sprinkle your code with debug information and validate the statement handle at various places. That way, you can narrow down where the handle becomes invalid.
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

  11. #11
    Join Date
    Jun 2008
    Posts
    1

    Red face CLI0601E Invalid statement handle

    Funny thing happened to me whilst updating automated db policy via control center :

    [IBM][JDBC Driver] CLI0601E Invalid statement handle or
    statement is closed. SQLSTATE=S1000

    System info:

    oslevel -s
    AIX 6100-07-04-1216


    Instance "feddba" uses "64" bits and DB2 code release "SQL09076" with
    level identifier "08070107".
    Informational tokens are "DB2 v9.7.0.6", "s120516", "IP23321", and Fix Pack
    "6".

  12. #12
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    Not enough information. Next time, start a new thread.

    Andy

Posting Permissions

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