pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Pavel Jbanov <pavel.jbanov@shaw.ca>
To: pgsql-jdbc@postgresql.org
Subject: Re: postgresql 7.4.6-6, hibernate-2.1.6, jdbc3
Date: Tue, 25 Jan 2005 14:58:40 -0700
Message-ID: <1106690320.20161.111.camel@localhost> (raw)
In-Reply-To: <1106688054.20161.101.camel@localhost>
References: <1106687911.20161.97.camel@localhost>
	<1106688054.20161.101.camel@localhost>

In addition:

the query is:
select contact0_.contact_id as contact_id0_, contact0_.account_id as
account_id0_, contact0_.created as created0_, contact0_.first_name as
first_name0_, contact0_.last_name as last_name0_, contact0_.middle_name
as middle_n6_0_, contact0_.home_phone as home_phone0_,
contact0_.cell_phone as cell_phone0_, contact0_.business_phone as
business9_0_, contact0_.additional_phone as additio10_0_, contact0_.fax
as fax0_, contact0_.email as email0_, contact0_.email2 as email20_,
contact0_.res_address as res_add14_0_, contact0_.res_city as res_city0_,
contact0_.res_country as res_cou16_0_, contact0_.res_postal as
res_postal0_, contact0_.res_province as res_pro18_0_,
contact0_.mail_address as mail_ad19_0_, contact0_.mail_city as
mail_city0_, contact0_.mail_country as mail_co21_0_,
contact0_.mail_postal as mail_po22_0_, contact0_.mail_province as
mail_pr23_0_, contact0_.mail_same as mail_same0_, contact0_.modified as
modified0_ from contact contact0_ where contact0_.contact_id=?

(it was automatically generated by hibernate)

And the table is:
CREATE TABLE contact
(
  contact_id int8 NOT NULL,
  account_id varchar(30) NOT NULL,
  created timestamp NOT NULL,
  first_name varchar(255),
  last_name varchar(255),
  middle_name varchar(255),
  home_phone varchar(255),
  cell_phone varchar(255),
  business_phone varchar(255),
  additional_phone varchar(255),
  fax varchar(255),
  email varchar(255),
  email2 varchar(255),
  res_address varchar(255),
  res_city varchar(255),
  res_country int8,
  res_postal varchar(10),
  res_province varchar(255),
  mail_address varchar(255),
  mail_city varchar(255),
  mail_country int8,
  mail_postal varchar(10),
  mail_province varchar(255),
  mail_same bool,
  modified timestamp NOT NULL,
  CONSTRAINT contact_pkey PRIMARY KEY (contact_id),
  CONSTRAINT "$1" FOREIGN KEY (account_id) REFERENCES account
(account_id) ON UPDATE NO ACTION ON DELETE NO ACTION
) 
WITH OIDS;


On Tue, 2005-01-25 at 14:20, Pavel Jbanov wrote:
> Sorry, gone unfinished. :/
> 
> The exception is:
> Caused by: org.postgresql.util.PSQLException: ???????????? Byte f
>     at
> org.postgresql.jdbc1.AbstractJdbc1ResultSet.getByte(AbstractJdbc1ResultSet.java:244)
>     at
> org.postgresql.jdbc1.AbstractJdbc1ResultSet.getByte(AbstractJdbc1ResultSet.java:491)
>     at net.sf.hibernate.type.ByteType.get(ByteType.java:18)
>     at
> net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:62)
>     at
> net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.java:53)
>     at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:66)
>     at net.sf.hibernate.loader.Loader.hydrate(Loader.java:686)
>     at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:627)
>     at
> net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:586)
>     at net.sf.hibernate.loader.Loader.getRow(Loader.java:501)
>     at
> net.sf.hibernate.loader.Loader.getRowFromResultSet(Loader.java:213)
>     at net.sf.hibernate.loader.Loader.doQuery(Loader.java:281)
>     at
> net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
>     at net.sf.hibernate.loader.Loader.doList(Loader.java:1033)
>     at net.sf.hibernate.loader.Loader.list(Loader.java:1024)
>     at
> net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:854)
>     at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1544)
>     ... 36 more
> 
> What should I look at? Where can be the cause?
> 
> Thanks.
> 
> > Hi,
> > 
> > I have postgresql 7.4.6-6, hibernate-2.1.6, jdbc3 (pg74.215.jdbc3.jar).
> > I get this exception:
> > 
> > 
> > I have a pretty complex structure, but here I try to do a simple thing:
> > 
> > SomeBean foo = (SomeBean) session.get(SomeBean.class,
> > primary_key_value);
> > 
> > I have: <property name="show_sql">true</property>, so I tried executing
> > the query it generated directly, it executed without problems.
-- 
Pavel Jbanov
http://www.spicesoft.com/~pavel/




view thread (7+ messages)  latest in thread

Message-ID: <1106690320.20161.111.camel@localhost>
Permalink:  ../1106690320.20161.111.camel@localhost/
Also on:    postgresql.org/message-id/1106690320.20161.111.camel@localhost

 · 

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-jdbc@postgresql.org
  Cc: pavel.jbanov@shaw.ca
  Subject: Re: postgresql 7.4.6-6, hibernate-2.1.6, jdbc3
  In-Reply-To: <1106690320.20161.111.camel@localhost>
  References: <1106687911.20161.97.camel@localhost> <1106688054.20161.101.camel@localhost> <1106690320.20161.111.camel@localhost>

* 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