X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1B3903A5925 for ; Tue, 25 Jan 2005 21:59:23 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 25501-05 for ; Tue, 25 Jan 2005 21:59:13 +0000 (GMT) Received: from pd3mo3so.prod.shaw.ca (shawidc-mo1.cg.shawcable.net [24.71.223.10]) by svr1.postgresql.org (Postfix) with ESMTP id 9D01D3A5979 for ; Tue, 25 Jan 2005 21:59:14 +0000 (GMT) Received: from pd5mr8so.prod.shaw.ca (pd5mr8so-qfe3.prod.shaw.ca [10.0.141.184]) by l-daemon (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IAW00IG67PQG5D0@l-daemon> for pgsql-jdbc@postgresql.org; Tue, 25 Jan 2005 14:58:38 -0700 (MST) Received: from pn2ml2so.prod.shaw.ca ([10.0.121.146]) by pd5mr8so.prod.shaw.ca (Sun ONE Messaging Server 6.0 HotFix 1.01 (built Mar 15 2004)) with ESMTP id <0IAW00DCK7PIPMK0@pd5mr8so.prod.shaw.ca> for pgsql-jdbc@postgresql.org; Tue, 25 Jan 2005 14:58:30 -0700 (MST) Received: from S0106000ea62b9dcf.ed.shawcable.net (S0106000ea62b9dcf.ed.shawcable.net [68.148.132.9]) by l-daemon (iPlanet Messaging Server 5.2 HotFix 1.18 (built Jul 28 2003)) with ESMTP id <0IAW00BGU7PIC0@l-daemon> for pgsql-jdbc@postgresql.org; Tue, 25 Jan 2005 14:58:30 -0700 (MST) Date: Tue, 25 Jan 2005 14:58:40 -0700 From: Pavel Jbanov Subject: Re: postgresql 7.4.6-6, hibernate-2.1.6, jdbc3 In-reply-to: <1106688054.20161.101.camel@localhost> To: pgsql-jdbc@postgresql.org Message-id: <1106690320.20161.111.camel@localhost> MIME-version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Content-type: text/plain Content-transfer-encoding: 7bit References: <1106687911.20161.97.camel@localhost> <1106688054.20161.101.camel@localhost> X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.362 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, FORGED_RCVD_HELO X-Spam-Level: * X-Archive-Number: 200501/251 X-Sequence-Number: 12131 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: true, so I tried executing > > the query it generated directly, it executed without problems. -- Pavel Jbanov http://www.spicesoft.com/~pavel/