0 Replies Latest reply on Nov 16, 2005 7:44 AM by stscit04

    JBoss 3.2.6 + DB2 8.1 TIMESTAMP finder

    stscit04 Newbie


      I have the following finder

      @ejb.finder signature="java.util.Collection
      * findByOpenAndOlderThan(java.util.Date d)" query="SELECT
      * OBJECT(tx) FROM Transaction AS tx WHERE
      tx.merchantTimestamp < ?1
      * AND tx.sc=0 AND tx.bankTimestamp IS NULL"
      The field in DB2 are of type TIMESTAMP. The finder fails with

      Find failed: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/LINUX] SQL0401N The data types of the operands for the operation "<" are not compatible. SQLSTATE=42818

      If I use the db2 prompt to select from the db, it works. Unfortunatly,
      I cannot how the String that jboss gives in the SQL looks like,
      because the log only shows an ? in the generated SQL instead of the
      actual value.

      Thanks for any advice,