0 Replies Latest reply on Mar 28, 2002 5:07 PM by Wellie Chao

    JBoss 3.0 beta CMP 2.0 handling of Date fields

    Wellie Chao Newbie

      Has anyone else experienced problems with the 2002-02-21 beta of JBoss 3.0 when using Date fields in entity beans (CMP)? I keep getting the following error:

      2002-03-28 16:34:32,302 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCo
      mmand.UserBean] Could not create entity
      java.sql.SQLException: ERROR: Bad date external representation '\254\355\000\00

      The above error is the result of a call to setCreationDate(d) where d = new Date(System.currentTimeMillis()). I've set up jbosscmp-jdbc.xml and ejb-jar.xml with entries for creationDate, and I defined the public abstract getter and setter to be of type java.sql.Date. Does anyone know how to fix the Date problem? I'm using PostgreSQL 7.1.2 with the PostgreSQL JDBC driver, version 7.2.