-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Error on Postgres
PostPosted: Fri Aug 20, 2004 9:05 am 
Regular
Regular

Joined: Thu Sep 04, 2003 10:43 am
Posts: 61
Any SELECT query that has no parameters give the error reported below.
Other querys like INSERT, UPDATE od DELETE works fine. Also SELECT with parameters work fine.
E.g: this is the query that raise exception:

Quote:
Hibernate: select pagdacbanc0_.pkid as x0_0_, pagdacbanc0_.cod as x1_0_, pagdacbanc0_.cin_abi as x2_0_, pagdacbanc0_.des
as x3_0_, pagdacbanc0_.abi as x4_0_ from PAG_BANCHE_ISTITUTI pagdacbanc0_ where (pagdacbanc0_.pkid=pagdacbanc0_.hcod )


While this one works:
Quote:
Hibernate: select pagdacbanc0_.pkid as x0_0_, pagdacbanc0_.cod as x1_0_, pagdacbanc0_.cin_abi as x2_0_, pagdacbanc0_.des
as x3_0_, pagdacbanc0_.abi as x4_0_ from PAG_BANCHE_ISTITUTI pagdacbanc0_ where (pagdacbanc0_.pkid=pagdacbanc0_.hcod )a
nd(upper(pagdacbanc0_.des)like ? )


I also tried with Postgres 7.3 and other versions of the JDBC driver, but I alwasy has the same error.
If a perform the same query in JDBC, without Hibernate it works fine.

Any ideas?
Regards
Alessandro Rizzi

Hibernate version:
2.1.6
Full stack trace of any exception that occurs:
java.sql.SQLException: Cannot move to index of 0
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.absolute(AbstractJdbc2ResultSet.java:180)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.relative(AbstractJdbc2ResultSet.java:523)
at net.sf.hibernate.impl.ScrollableResultsImpl.scroll(ScrollableResultsImpl.java:51)
at it.saga.library.commonDataTypes.CdtBLGPkBaseClassBean.readCollection(CdtBLGPkBaseClassBean.java:731)
at PagBLGBancheIstituti_StatelessSessionBeanWrapper18.readCollection(PagBLGBancheIstituti_StatelessSessionBeanWr
apper18.java:2694)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Unknown Source)
Name and version of the database you are using:
Postgres 7.4.3 on
Red Hat Linux release 9 (Shrike) Kernel 2.4.20-8 on an i686
JDBC Driver: pg74.215.jdbc3.jar

Quote:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.