Обсуждение: Problem with getBytes and TIME

Поиск
Список
Период
Сортировка

Problem with getBytes and TIME

От
Jon Swinth
Дата:
Using latest posted devpgjdbc2.jar with PostgreSQL 7.2.1.  Client is JBoss
(www.jboss.org).  In the latest version of JBoss, they switched from calling
ResultSet.getObject() to ResultSet.getBytes().  This works fine for most
column types except TIME.  When JBoss tries to deserilize a TIME column from
ResultSet.getBytes() it runs into the following error:
java.io.StreamCorruptedException:  InputStream does not contain a serialized
object.

Any work around for this besides changing the definition of the columns?

Re: Problem with getBytes and TIME

От
Barry Lind
Дата:
Jon,

I think this is a bug in JBoss.  According to the javadoc for
ResultSet.getBytes(), "The bytes represent the raw values returned by
the driver."  This would indicate that the format of the information is
database specific.  I don't see how JBoss could know or assume what the
format was for each different database.

thanks,
--Barry

Jon Swinth wrote:

>Using latest posted devpgjdbc2.jar with PostgreSQL 7.2.1.  Client is JBoss
>(www.jboss.org).  In the latest version of JBoss, they switched from calling
>ResultSet.getObject() to ResultSet.getBytes().  This works fine for most
>column types except TIME.  When JBoss tries to deserilize a TIME column from
>ResultSet.getBytes() it runs into the following error:
>java.io.StreamCorruptedException:  InputStream does not contain a serialized
>object.
>
>Any work around for this besides changing the definition of the columns?
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
>
>