-->
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: 3.3 TO 3.6.1 Upgrade and Large Strings
PostPosted: Tue Feb 15, 2011 1:51 pm 
Beginner
Beginner

Joined: Thu Oct 06, 2005 7:34 pm
Posts: 20
I just upgraded our application from Hibernate 3.3 to 3.6.1.Final and am now having problems getting large string storage working. We need a set of entity annotations that will work across all the major DBs but I'm stuck in a situation where I can either get things working in Oracle or PostgreSQL but not both.

With Oracle both the materialized_clob and clob types work but on PostgreSQL we get the following exception: http://uportal.pastebin.com/VuhkChRN Annotating all of our get methods with @Transactional fixes the problem but we have some reservations about requiring a TX for every read-only operation.

With PostgreSQL things just work if I use the text type but then on Oracle it fails with: http://uportal.pastebin.com/qujD3MFx

We were using the text type in 3.3 and it worked across all databases without any hiccups. How do I get this working in 3.6? We don't need schema compatibility between versions of our application we just need a single entity configuration that works to store a long String field across all the major DBs.


Top
 Profile  
 
 Post subject: Re: 3.3 TO 3.6.1 Upgrade and Large Strings
PostPosted: Wed Feb 16, 2011 10:58 pm 
Beginner
Beginner

Joined: Thu Oct 06, 2005 7:34 pm
Posts: 20
Any ideas here? This is a pretty blocker for us upgrade to 3.6 and being able to use JPA2. Like I said in the first post I don't care about the schema being backwards compatibility. What I need is a way to annotate a String field so arbitrary large values can be stored in Oracle, Postgres, MySQL and MSSQL without having to change code. We had that in 3.3 via the "text" field type but neither than nor the "clob" or "materialized_clob" types are working. Any ideas, tips, etc are much appreciated.


Top
 Profile  
 
 Post subject: Re: 3.3 TO 3.6.1 Upgrade and Large Strings
PostPosted: Thu Feb 17, 2011 5:58 am 
Newbie

Joined: Fri Jan 07, 2011 7:23 am
Posts: 19
Hi,
I can't answer your question but maybe the following links will help you a little bit. BTW, I've replaced all text/CLOB types by large strings because of Hibernate's LOB handling in combination with Postgresql. But there were some changes in 3.6.1 on this topic so I will try it again.
OK, here some background about Postgresql LOB handling from the Hibernate guys:
http://in.relation.to/Bloggers/PostgreSQLAndBLOBs (note the property 'hibernate.jdbc.use_streams_for_binary')
Here the improvement made in 3.6.1:
http://opensource.atlassian.com/project ... e/HHH-5830

Hope that helps a little bit! Please report your solution if you find one!

Robin.


Top
 Profile  
 
 Post subject: Re: 3.3 TO 3.6.1 Upgrade and Large Strings
PostPosted: Fri Feb 18, 2011 3:48 pm 
Beginner
Beginner

Joined: Thu Oct 06, 2005 7:34 pm
Posts: 20
Thanks for the reply and links. I'll do more reading into those changes and see if perhaps I can put together some small unit test like packages. Perhaps there are simply still some remaining issues in 3.6.1 that need to be addressed to make this work.


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.