Re: [Microsoft][SQLServer 2000 Driver for JDBC]ResultSet can not re-read row data for column 7.

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Dec 16 2003 - 10:50:30 EST

  • Next message: Jim Menard: "NullPointerException during object registration"

    On Dec 16, 2003, at 5:42 AM, Bill Fan wrote:

    > Hi,
    >  
    > This problem sometimes (not always...) happened in my web application.
    > I understand this is something to do with MS SQL database. I'm not
    > sure how I can fix it when I'm using Cayenne.
    >  
    > The way to fix it In the straight JDBC way, I would specify the table
    > columns in a particular order in the sql query so that the columns
    > with primitive data type(int, float, char etc) appears first, then the
    > varchar columns, then the text columns appear last. When the resultset
    > is being looping through, I would retrieve the values
    > following straightly the order of columns in the query. With Cayenne,
    > I'm running out of idea....
    >  
    > Please note, the line has problem in the function below as indicated
    > by the Stack trace is
    >  
    >         List issueRows = ctxt.performQuery(query);

    Hi Bill,

     From what I I understand, this error happens when the same column in
    the result set is read more than once (or maybe some variations of
    this). Right away I can't think of a reason why Cayenne would do that.
    To track it down further could you provide some more information:

    1. What version of Cayenne are you using? The fact that
    CayenneRuntimeException message doesn't contain Cayenne version string
    (e.g. "org.objectstyle.cayenne.CayenneRuntimeException: [v.1.0.4 Dec 14
    2003]"), makes me think that it is pretty old. If this is indeed the
    case, could you try it with the latest version.

    2. What SQL is generated for the query before the exception is thrown?

    Thanks
    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Dec 16 2003 - 10:50:34 EST