-->
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.  [ 2 posts ] 
Author Message
 Post subject: Postgresql, OID, Hibernate and Tomcat
PostPosted: Thu May 13, 2004 12:29 pm 
Newbie

Joined: Thu Oct 09, 2003 6:57 am
Posts: 17
Location: France
Hi all,

I use Postgresql 7.2.3
If I want to use Postgresql OID and Hibernate I must specify in the hibernate configuration file :
Hibernate.cfg.xml :
<property name="connection.compatible">7.1</property>

If not, I have an OIDIN error.
I tested in a test class, all work fine.

Now I want it work fine with my web application.
I retrieve datasource with
<property name="connection.datasource">java:comp/env/jdbc/myWebApp</property>

datasource configuration is in tomcat server.xml.
But it appears that in this case, Hibernate doesn't set connection.compatible.

I think I must say that in servel.xml, but I don't know how.
Have you an idea, to inform the "compatible" parameters in a configuration file or in my java class (where I retrieve my Session) ?

Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 14, 2004 10:25 am 
Newbie

Joined: Thu Oct 09, 2003 6:57 am
Posts: 17
Location: France
I found,

just put :
jdbc:postgresql://host:port/database?compatible=7.1

for database url.
In this case you can work with hibernate and postgresql OID.

J


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.