Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 10330 invoked from network); 18 Aug 2004 19:06:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 Aug 2004 19:06:08 -0000 Received: (qmail 21237 invoked by uid 500); 18 Aug 2004 19:05:55 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 21018 invoked by uid 500); 18 Aug 2004 19:05:52 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 20911 invoked by uid 99); 18 Aug 2004 19:05:50 -0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=DNS_FROM_RFC_ABUSE,FROM_ENDS_IN_NUMS X-Spam-Check-By: apache.org Received: from [206.190.38.70] (HELO web50405.mail.yahoo.com) (206.190.38.70) by apache.org (qpsmtpd/0.27.1) with SMTP; Wed, 18 Aug 2004 12:05:48 -0700 Message-ID: <20040818190545.29949.qmail@web50405.mail.yahoo.com> Received: from [66.80.49.7] by web50405.mail.yahoo.com via HTTP; Wed, 18 Aug 2004 12:05:45 PDT Date: Wed, 18 Aug 2004 12:05:45 -0700 (PDT) From: David Graham Subject: Re: [DBUtils] Oracle 9.2.0 JDBC Timestamp Problem To: Jakarta Commons Developers List In-Reply-To: <41239739.8010306@datacomm.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks for finding this! It would be best to open a bugzilla ticket so the issue isn't lost or forgotten. Thanks, David --- Rolf Moser wrote: > Hello > > I just run into a Timestamp problem with the Oracle 9i (9.2.0) JDBC > Driver > When calling rs.getObject(index) on a DB field, defined as Timestamp(6), > > the resulting object is a oracle.sql.TIMESTAMP and not a > java.sql.Timestamp as with other JDBC Drivers. This leads to a null > value propagation if your Bean Property is defined as > java.sql.Timestamp. > > If calling rs.getTimestamp(index), Oracle correctly converts the > resulting value to a java.sql.Timestamp object. > > I looked at the current source and added the following statement to the > BeanProcessor processColumn Method as a workaround: > > } else if(propType.equals(Timestamp.class)) { > return rs.getTimestamp(index); > > This ensures that for a Bean property of type java.sql.Timestamp the > getTimestamp() method is called. > Otherwise the default getObject() mehod is called, so there souldn't be > a problem if someone wants the Oracle enhanced oracle.sql.TIMESTAMP > object. > > Regards > Rolf > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org