pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
domains handling problem
3+ messages / 3 participants
[nested] [flat]

* domains handling problem
@ 2011-02-22 09:53 Віталій Тимчишин <tivv00@gmail.com>
  2011-03-20 01:00 ` Re: domains handling problem Kris Jurka <books@ejurka.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Віталій Тимчишин @ 2011-02-22 09:53 UTC (permalink / raw)
  To: pgsql-jdbc

Hello.

Today I've got next exception on postgresql 9.0-801 jdbc4 driver:
Caused by: org.postgresql.util.PSQLException: Unsupported Types value: 2,001
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1745)
        at
org.postgresql.jdbc3.AbstractJdbc3Statement.setObject(AbstractJdbc3Statement.java:1483)
        at
org.postgresql.jdbc3g.AbstractJdbc3gStatement.setObject(AbstractJdbc3gStatement.java:47)
        at
org.postgresql.jdbc4.AbstractJdbc4Statement.setObject(AbstractJdbc4Statement.java:69)
        at
org.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statement.java:1751)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:163)
        at
org.apache.commons.dbcp.DelegatingPreparedStatement.setObject(DelegatingPreparedStatement.java:163)
        at
org.springframework.jdbc.core.StatementCreatorUtils.setValue(StatementCreatorUtils.java:356)
        at
org.springframework.jdbc.core.StatementCreatorUtils.setParameterValueInternal(StatementCreatorUtils.java:216)
        at
org.springframework.jdbc.core.StatementCreatorUtils.setParameterValue(StatementCreatorUtils.java:144)
        at
org.springframework.jdbc.core.simple.AbstractJdbcInsert.setParameterValues(AbstractJdbcInsert.java:611)
        at
org.springframework.jdbc.core.simple.AbstractJdbcInsert.access$1(AbstractJdbcInsert.java:602)
        at
org.springframework.jdbc.core.simple.AbstractJdbcInsert$1.createPreparedStatement(AbstractJdbcInsert.java:439)
        at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:580)

After looking a little deeper I've foudn out that driver report domain type
as Types.DISTINCT, but does not accept it in setObject call. And spring
library uses metadata to fill default SQL types to be sent to driver. I did
a workaround by hard-wiring Types.OTHER, but I suppose this to be driver bug
as driver should accept any sql type it provides from metadata.

-- 
Best regards,
 Vitalii Tymchyshyn

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: domains handling problem
  2011-02-22 09:53 domains handling problem Віталій Тимчишин <tivv00@gmail.com>
@ 2011-03-20 01:00 ` Kris Jurka <books@ejurka.com>
  2011-03-21 10:47   ` Re: domains handling problem Vitalii Tymchyshyn <tivv00@gmail.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Kris Jurka @ 2011-03-20 01:00 UTC (permalink / raw)
  To: Віталій Тимчишин <tivv00@gmail.com>; +Cc: pgsql-jdbc



On Tue, 22 Feb 2011, ??????? ???????? wrote:

> Today I've got next exception on postgresql 9..0-801 jdbc4 driver:
> Caused by: org.postgresql.util.PSQLException: Unsupported Types value: 2,001
>         atorg.postgresql.jdbc2.AbstractJdbc2Statement.setObject(AbstractJdbc2Statemen
> t.java:1745)
> 
> After looking a little deeper I've foudn out that driver report domain type
> as Types.DISTINCT, but does not accept it in setObject call. And spring
> library uses metadata to fill default SQL types to be sent to driver. I did
> a workaround by hard-wiring Types.OTHER, but I suppose this to be driver bug
> as driver should accept any sql type it provides from metadata.
>

I concur.  Fixed in CVS for 8.2+.

Kris Jurka


^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: domains handling problem
  2011-02-22 09:53 domains handling problem Віталій Тимчишин <tivv00@gmail.com>
  2011-03-20 01:00 ` Re: domains handling problem Kris Jurka <books@ejurka.com>
@ 2011-03-21 10:47   ` Vitalii Tymchyshyn <tivv00@gmail.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Vitalii Tymchyshyn @ 2011-03-21 10:47 UTC (permalink / raw)
  To: Kris Jurka <books@ejurka.com>; +Cc: pgsql-jdbc

20.03.11 03:00, Kris Jurka написав(ла):
>
>
> On Tue, 22 Feb 2011, ??????? ???????? wrote:
>> After looking a little deeper I've foudn out that driver report 
>> domain type
>> as Types.DISTINCT, but does not accept it in setObject call. And spring
>> library uses metadata to fill default SQL types to be sent to driver. 
>> I did
>> a workaround by hard-wiring Types.OTHER, but I suppose this to be 
>> driver bug
>> as driver should accept any sql type it provides from metadata.
>>
>
> I concur. Fixed in CVS for 8.2+.
>
Thanks. Welcome back to the list. Did not hear from you for some time. 
Hope you've had a good time.

Best regards, Vitalii Tymchyshyn



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2011-03-21 10:47 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-02-22 09:53 domains handling problem Віталій Тимчишин <tivv00@gmail.com>
2011-03-20 01:00 ` Kris Jurka <books@ejurka.com>
2011-03-21 10:47   ` Vitalii Tymchyshyn <tivv00@gmail.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