Thanks for the reply Dain. You are right. I read the code wrong. The code calls a method based on the destination class first before attempting the getBytes() call. I'm guessing the reason for my issue is that the destination class is java.util.Date which maps to getTimestamp() which is probably not returning a value. This would explain why it goes on to call getBytes() and fails on the deserialization. I have since changed the schema to TIMESTAMP on the table so that I could get around the issue (it only takes up a little more space). I probably would have been forced into the change anyway because I would rather not use a java.sql class in a bean. Others have voiced the same desire. Maybe some day Sun will create java.util classes that represent the time-only, date-only, and date-time values that people often want to use.
So I guess the FYI should have been, you can no longer use java.util.Date in your bean against a TIME column in PostgreSQL. I do realize that you stopped using ResultSet.getObject() because some jdbc drivers don't let you call getBytes() after you have called getObject() on the same index. I don't think you had a choice but to do it the way you did. The only thing I can think of that may be useful would be a jbosscmp-jdbc.xml directive that allows us to specify the ResultSet get method used for a given attribute. > Date: Fri, 09 Aug 2002 14:45:55 -0500 > From: Dain Sundstrom <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] FYI on JBoss3.0.1 and PostgreSQL TIME > Reply-To: [EMAIL PROTECTED] > > Jon Swinth wrote: > > This is just a note for other users of PostgreSQL. With the latest > > version of JBoss3.0.1 you can no longer be able to use a column > > definition of TIME in Postgre. This is NOT a bug in JBoss, but rather a > > bug in jdbc driver for PostgreSQL (even the latest dev driver). The > > JBoss3.0.1 changes from attempting to call ResultSet.getObject() first to > > always calling ResultSet.getBytes() and deserializing the object. > > That's not true. JBossCMP checks for a mapping before calling getBytes. > Is the mapping type setup correctly? I use postgres and java.sql.Time > has been working for me. File a bug report if it is not working (it > should be working). > > -dain ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user