pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dean Schulze <dschulze@knowledgefactor.com>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: JDBC Driver can't read UUID from database
Date: Tue, 5 Jun 2012 23:26:53 +0000
Message-ID: <CBF3F1DC.2E8%dschulze@knowledgefactor.com> (raw)


I'm using Hibernate (3.6 and 4.0) with Postgresql 9.1.  Our tables have UUIDs in them and your driver is trying to convert UUIDs to longs:


Caused by: org.postgresql.util.PSQLException: Bad value for type long : dbada1e4-a165-4601-b34e-d08428cd81df

at org.postgresql.jdbc2.AbstractJdbc2ResultSet.toLong(AbstractJdbc2ResultSet.java:2796)

at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getLong(AbstractJdbc2ResultSet.java:2019)

at org.postgresql.jdbc4.Jdbc4ResultSet.getBlob(Jdbc4ResultSet.java:52)

at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getBlob(AbstractJdbc2ResultSet.java:335)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.hibernate.engine.jdbc.internal.proxy.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:104)

... 32 more

I've tried chaining the Hibernate annotations to treat them as Strings and CLOBs but I get the same exception.

Driver versions I've tried are 9.0-801.jdbc4 and 9.1-901.jdbc4

This is a show stopper.

view thread (4+ messages)  latest in thread

Message-ID: <CBF3F1DC.2E8%dschulze@knowledgefactor.com>
Permalink:  ../CBF3F1DC.2E8%25dschulze@knowledgefactor.com/
Also on:    postgresql.org/message-id/CBF3F1DC.2E8%dschulze@knowledgefactor.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: dschulze@knowledgefactor.com
  Subject: Re: JDBC Driver can't read UUID from database
  In-Reply-To: <CBF3F1DC.2E8%dschulze@knowledgefactor.com>
  References: <CBF3F1DC.2E8%dschulze@knowledgefactor.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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