4 Replies Latest reply on Feb 29, 2004 9:42 AM by pilhuhn

    java.sql.Timestamp instead of java.util.Date

    ereze

      I have a 'lastLoginTime' field in the User Entity where:

      1) in the database MySQL it is of type TIMESTAMP (mysql supports only the grenularity of up to the second)

      2) In the User Entity:
      public java.util.Date getLastLoginTime( ) ;


      Now here's the problem:

      A) Object vv = user.getLastLoginTime(); ---> the vv would be of type
      java.util.Date as should.

      B) Object value = PropertyUtils.getSimpleProperty(this, name);
      called from within the UserBean.java would return a value of type
      java.sql.Timestamp

      I am using JBoss 3.2.1, Windows XP, MySQL 4.0.15,

      Any idea why is this happening ?

      Thanks in advance,

      Erez