Announcement Announcement Module
Collapse
No announcement yet.
Differences between Windows XP and Linux (Ubuntu 5.10) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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

      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.

      Comment


      • #4
        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.

        Comment

        Working...
        X