-->
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.  [ 4 posts ] 
Author Message
 Post subject: Build Examples fails with StringIndexOutOfBoundsException
PostPosted: Fri Jul 30, 2004 11:07 pm 
Newbie

Joined: Fri Jul 30, 2004 11:00 pm
Posts: 2
I'm an absolute beginner with Hibernate.
I installed it and am following the instructions to run it against a postgres DB.
After doing:
build eg
the script successfully creates some tables but stops here:

[java] Setting up some test data
[java] Viewing all auction item objects
[java] java.lang.StringIndexOutOfBoundsException: String index out of range
: 23
[java] at java.lang.String.charAt(String.java:444)
[java] at org.postgresql.jdbc2.ResultSet.toTimestamp(ResultSet.java:165
3)
[java] at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java:39
8)
[java] at org.postgresql.jdbc2.ResultSet.getTimestamp(ResultSet.java:61
7)
[java] at net.sf.hibernate.type.TimestampType.get(TimestampType.java:22
)
[java] at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.j
ava:62)
[java] at net.sf.hibernate.type.NullableType.nullSafeGet(NullableType.j
ava:53)
[java] at net.sf.hibernate.type.AbstractType.hydrate(AbstractType.java:
66)
[java] at net.sf.hibernate.loader.Loader.hydrate(Loader.java:611)
[java] at net.sf.hibernate.loader.Loader.loadFromResultSet(Loader.java:
552)
[java] at net.sf.hibernate.loader.Loader.instanceNotYetLoaded(Loader.ja
va:511)
[java] at net.sf.hibernate.loader.Loader.getRow(Loader.java:426)
[java] at net.sf.hibernate.loader.Loader.doQuery(Loader.java:209)
[java] at net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCol
lections(Loader.java:133)
[java] at net.sf.hibernate.loader.Loader.doList(Loader.java:955)
[java] at net.sf.hibernate.loader.Loader.list(Loader.java:946)
[java] at net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.jav
a:846)
[java] at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1543)

[java] at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
[java] at org.hibernate.auction.Main.viewAllAuctionsSlow(Main.java:86)
[java] at org.hibernate.auction.Main.main(Main.java:366)
[java] Exception in thread "main"

BUILD FAILED


Postgres is 7.4.2 on RedHat Linux 8
I'm running Hibernate on XP using java 1.4.2_01
The postgress driver is pg72jdbc.jar

Thanks in advance


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 30, 2004 11:58 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
looks like a bug in your postgres driver


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 31, 2004 9:41 am 
Newbie

Joined: Fri Jul 30, 2004 11:00 pm
Posts: 2
Thanks for the reply.

Is anyone using hibernate successfully with Postgresql?
What driver version are you using?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 01, 2004 10:53 am 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
You need 74 jdbc driver

regards


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

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.