pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql jdbc setObject JAVA_OBJECT error
2+ messages / 2 participants
[nested] [flat]
* pgsql jdbc setObject JAVA_OBJECT error
@ 2007-12-18 21:00 tyju tiui <jckdnk111@yahoo.com>
0 siblings, 1 reply; 2+ messages in thread
From: tyju tiui @ 2007-12-18 21:00 UTC (permalink / raw)
To: pgsql-jdbc
Hi,
I'm trying to use the 'setObject' method of a preparedStatement to store a POJO and I'm getting an error:
org.postgresql.util.PSQLException: Unsupported Types value: 2,000
I'm using build 8.2 Build 507 of the jdbc driver with PostgreSQL 8.2.5 on a Debian Etch server with Java 1.6.
Here's the snippet which throws the error above:
pstatement.setObject(1, myPojoInst, java.sql.Types.JAVA_OBJECT);
Any idea what I'm doing wrong?
Thanks,
Ty
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: pgsql jdbc setObject JAVA_OBJECT error
@ 2007-12-18 21:10 Kris Jurka <books@ejurka.com>
parent: tyju tiui <jckdnk111@yahoo.com>
0 siblings, 0 replies; 2+ messages in thread
From: Kris Jurka @ 2007-12-18 21:10 UTC (permalink / raw)
To: tyju tiui <jckdnk111@yahoo.com>; +Cc: pgsql-jdbc
On Tue, 18 Dec 2007, tyju tiui wrote:
> I'm trying to use the 'setObject' method of a preparedStatement to store
> a POJO and I'm getting an error:
> org.postgresql.util.PSQLException: Unsupported Types value: 2,000
>
The postgresql JDBC driver currently does not support storing Java objects
directly like this. Perhaps you could serialize them yourself and store
them in a bytea field?
Kris Jurka
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2007-12-18 21:10 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-12-18 21:00 pgsql jdbc setObject JAVA_OBJECT error tyju tiui <jckdnk111@yahoo.com>
2007-12-18 21:10 ` Kris Jurka <books@ejurka.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox