Exception : ResultSet is from UPDATE. No Data

From: Chithu (chitrapandian_at_yahoo.com)
Date: 10/21/03

  • Next message: Lee Fesperman: "Re: Sending image into BLOL"
    Date: 20 Oct 2003 21:11:49 -0700
    
    

    Dear All,

    Database product version=3.23.41
    Database driver name=MySQL-AB JDBC Driver
    Database driver version=3.0.8-stable ( $Date: 2003/05/19 00:57:19 $,
    $Revision: 1.27.2.18 $ )

    Our application is an Multi-Threaded Java based application and uses 6
    MySQL connections to do various database transactions, and also we
    maintain PreparedStatement cache (200 per Connection), meaning we
    cache the PreparedStatement based on the SQL in a cache and use that
    cached PS for subsequent db operations.

    We are sure that, all are "SELECT" SQLs executed using executeQuery
    methos, no other SQLs and also Database Connection are in normal state
    only.

    Now, we are continously facing this after running our for 2-3 hrs., we
    are not sure where the problem is, following are the various
    exceptions
    thrown continously and the complete database is corrupted with invalid
    data, now the only way to recover from this is to reinitialise and
    restart our
    application.

    This is an highly critical issue. Kindly, guide us to debug the
    problem @ the earliest.

    -----------------------------------------------

    22:33:39:995 PM java.sql.SQLException: Column Index out of range ( 3 >
    1).
    22:33:39:995 PM at com.mysql.jdbc.ResultSet.getString(ResultSet.java:1749)
    22:33:39:995 PM at com.adventnet.nms.store.relational.RelationalObject$ForUserPropGet.fillUserProperties(RelationalObject.java:1761)
    22:33:39:995 PM at com.adventnet.nms.store.relational.RelationalObject.getObject(RelationalObject.java:602)
    ...
    ...

    22:34:09:467 PM java.sql.SQLException: Column 'status' not found.
    22:34:09:467 PM at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:2257)
    22:34:09:467 PM at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:1279)
    22:34:09:467 PM at
    com.adventnet.me.opmanager.server.poll.InterfaceDataCalculator.queryAndGetInterfaceStatus(InterfaceDataCalculator.java:87)
    .....
    .....

    22:34:09:547 PM java.lang.NullPointerException
    22:34:09:547 PM at com.mysql.jdbc.ResultSet.first(ResultSet.java:2283)
    22:34:09:547 PM at
    com.adventnet.me.opmanager.server.poll.InterfaceDataCalculator.queryAndGetInterfaceStatusPortObjectStatus(InterfaceDataCalculator.java:138)

    22:34:09:547 PM at com.adventnet.me.opmanager.server.poll.InterfaceDataCalculator.changeCollectedInfo(InterfaceDataCalculator.java:53)
    22:34:09:547 PM at com.adventnet.me.opmanager.server.poll.OpManagerDataDecoder.decode(OpManagerDataDecoder.java:108)
    ...

    22:35:00:861 PM java.sql.SQLException: Can not issue
    INSERT/UPDATE/DELETE with executeQuery()
    22:35:00:861 PM at com.mysql.jdbc.Statement.executeQuery(Statement.java:1161)
    22:35:00:861 PM at com.adventnet.nms.db.util.SQLQueryGenerator.getResult(SQLQueryGenerator.java:2103)
    22:35:00:861 PM at com.adventnet.nms.db.util.SQLQueryGenerator.executeQuery(SQLQueryGenerator.java:1934)
      

    22:35:13:639 PM java.sql.SQLException: Column 'NAME' not found.
    22:35:13:639 PM at com.mysql.jdbc.ResultSet.findColumn(ResultSet.java:2257)
    22:35:13:639 PM at com.adventnet.db.util.ResultSetWrapper.getString(ResultSetWrapper.java:161)
    22:35:13:639 PM at com.adventnet.nms.db.util.SQLQueryGenerator.getResult(SQLQueryGenerator.java:2164)
    ...
      

    22:35:31:214 MAP: SQLException : java.sql.SQLException: Invalid value
    for getInt() - 'spp-test6_Oracle_1521' at:
    java.sql.SQLException: Invalid value for getInt() -
    'spp-test6_Oracle_1521'
     at com.mysql.jdbc.ResultSet.getInt(ResultSet.java:1266)
     at com.adventnet.nms.store.DBVector.contains(DBVector.java:631)
     at com.adventnet.nms.mapdb.MapHandler.mapExists(MapHandler.java:577)
    ...

    22:33:40:215 PM java.sql.SQLException: ResultSet is from UPDATE. No
    Data
    22:33:40:215 PM at com.mysql.jdbc.ResultSet.next(ResultSet.java:2416)
    22:33:40:215 PM at com.adventnet.db.util.ResultSetWrapper.next(ResultSetWrapper.java:102)
    22:33:40:215 PM at com.adventnet.nms.store.relational.RelationalObject.formProperties(RelationalObject.java:612)
    ----------------------------------------------------------------

    Could be please let us know, is there any issues in MySQL Result set
    or is there any wrong sequence that we are doing ... ?.

    Because, it works fine in normal condition, at times this particular
    Exception is thrown, can you please explain the possible causes for
    this particular
    Exception (ResultSet is from UPDATE. No Data & Can not issue
    INSERT/UPDATE/DELETE with executeQuery()) ? or is there any
    possibility of changing the state of the Resultset in middle of the
    processing ??.

    This occurs only if the resultsets reallyResult() returns false, on
    tracing the source code, what will be the cause for this ?

    ANybody .. know when it will happen ..!
    Any help to resolve this issue is really appreciated.

    Thanks in advance for your help
      
    Regards,
    Chitrapandian N


  • Next message: Lee Fesperman: "Re: Sending image into BLOL"

    Relevant Pages

    • Re: ADO Connection Timeout
      ... so what happens when a connection failure forces one station to revert ... to a local database? ... Further, you *will* have contention issues, Jet does not support record ... to the central server, but you are willing to live with periods where it ...
      (microsoft.public.data.ado)
    • Re: ADO Connection Timeout
      ... When the first test is run, the results are stored in the central database. ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
      (microsoft.public.data.ado)
    • Re: ADO Connection Timeout
      ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
      (microsoft.public.data.ado)
    • Re: ADO Connection Timeout
      ... much rather write stored procedures and use server side cursors. ... local database, it is vital that I get the information to a central server. ... Once the connection is restored, ...
      (microsoft.public.data.ado)
    • Re: ESQL/C documentation nightmare
      ... documentation about explicit and implicit connections. ... CONNECTION connection statements for new applications of Version 6.0 ... the SQL database statements (such as ...
      (comp.databases.informix)

  • Quantcast