Results 1 to 4 of 4

Thread: Differences between Windows XP and Linux (Ubuntu 5.10)

  1. #1
    Join Date
    Feb 2006
    Posts
    2

    Default Differences between Windows XP and Linux (Ubuntu 5.10)

    Hi,

    I do have an issue accessing a data set in a database (4.1.12-Debian_1ubuntu3.1-log) on a Linux system (Ubuntu 5.10) using Spring 1.1.5.
    Despite the fact, that the dataset is present in the database (double checked in the mysql console executing the same query), the jt.queryForList command doesn't retrieve it.
    I do use the following code to access the data:
    <code>
    private final static String SQL_GET_ECGBLOB = "SELECT ECGData FROM ecg WHERE idECG = ?";

    if (log.isDebugEnabled()) log.debug("acquiring BLOB: "+SQL_GET_ECGBLOB+" with ?="+this.ecgId); // [1]
    List list = jt.queryForList(SQL_GET_ECGBLOB, new Object[]{new Integer(this.ecgId)});
    if (log.isDebugEnabled()) log.debug("got a list w/ "+list.size()+" entries from the database"); //[2]
    </code>

    The query is executed successfully (no exceptions, jt is defined,...), but retrieves only a resultset of size = 0.
    The exactly same code executed under Windows XP (Java 1.4.2), Spring 1.1.5, mysql 4.1.13a-nt, JDBC mysql connector 3.1.12 does retrieve the correct dataset.

    I have no clue what's going on. I hope I've provided all neccessary information for you guys to give me some pointers to get rid of this obvious error

    Thank you so much in advance,

    Kurt

    Logger output for different positions in the code:
    [1] SELECT ECGData FROM ecg WHERE idECG = ? with ?=1
    [2] got a list w/ 0 entries from the database

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Try using an older connector - 3.1.11 or 3.1.10. I have participated in threads where the list returned cased a null pointer exception out of the blue. You can also try to use maybe the 3.0.x version of the driver - in short experiment with the connector since at least I had problems with it and it has nothing to do with my code.
    Ofc, make sure you are running the queries against a database that has something to return.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #3
    Join Date
    Feb 2006
    Posts
    2

    Default

    Hi Costin,

    thank you for your reply and the suggestion to use different connectors.
    Unfortunately this didn't help at all. I also made sure that the data in the database exists by accessing tha table directly in the mysql console.
    The wired thing is, that the JDBC connector can access the database and some tables in general. I've added some queries in my code just for debugging. It seems that only prepared or dynamically generated statements do cause problems.

    Any more thoughts?

    Thank you in advance,

    Kurt

    Quote Originally Posted by costin
    Try using an older connector - 3.1.11 or 3.1.10. I have participated in threads where the list returned cased a null pointer exception out of the blue. You can also try to use maybe the 3.0.x version of the driver - in short experiment with the connector since at least I had problems with it and it has nothing to do with my code.
    Ofc, make sure you are running the queries against a database that has something to return.

  4. #4
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    upgrade your database and play with the connector. My guess would be that mysql is the cause of your problems. Maybe you can find more answers on the mysql forums.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Posting Permissions

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