-->
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: Problem with Clob and Oracle 9i
PostPosted: Wed Jul 25, 2007 12:58 pm 
Newbie

Joined: Wed Jul 25, 2007 12:14 pm
Posts: 3
Location: Atlanta
Hi,
I am new to hiberante and this forum.
I am using jsf, Hibernate 3.1 and Oracle 9i.
I am trying to insert data exceeding 4000 char in the oracle 9i database.
I am trying to use the hibernate TextType(native) mapping inorder to convert String to clob. But I am getting the following error message:

12:02:55,140 WARN [JDBCExceptionReporter] SQL Error: 932, SQLState: 42000
12:02:55,140 ERROR [JDBCExceptionReporter] ORA-00932: inconsistent datatypes: expected - got CLOB
I believe this is due to bug in oracle 9i.................

I have tried using oracle 10g drivers ,also changed
hibernate.jdbc.batch_size = 0
hibernate.jdbc.use_streams_for_binary true
But I am not able to get around this error.

I have also tried using the USER type class posted on the forum but that didn't work either.

1) Can anyone please tell me what changes are required to make hibernate texttype work with oracle 9i.
Or
2) Is there any other 9i data type that I can used if so what data type in hibernate does it map to.

Thanks and Regards,


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2007 1:48 pm 
Newbie

Joined: Mon Jul 02, 2007 2:12 pm
Posts: 18
Hi OP,

first, pls next time post more information about your problem.

Have a look here: http://www.orafaq.com/forum/t/65196/0/ maybe you run into problem ordering by clob columns?

I had a short text agains ORACLE XE 10g here, all fine.

@Entity
public class UserMemo {

@Id
@GeneratedValue (strategy = GenerationType.AUTO)
private long id;

@Type (type = "text" )
private String memo;

}


-Thomas


Top
 Profile  
 
 Post subject: re
PostPosted: Wed Jul 25, 2007 3:02 pm 
Newbie

Joined: Wed Jul 25, 2007 12:14 pm
Posts: 3
Location: Atlanta
Hi Thomas,
I have looked at the oracle error link.......I am not sorting the clobs as mentioned in the above link......as save method does not do a sort

here is some information about the problem,
1) I am having a String in the bean
2) A clob in the Oracle 9i
3) I am Using Hibernate TextType data to mapString-Clob
4) I am using Hibernate save method to insert the baen data into the data base.



I am getting the above mentioned errors:

12:02:55,140 WARN [JDBCExceptionReporter] SQL Error: 932, SQLState: 42000
12:02:55,140 ERROR [JDBCExceptionReporter] ORA-00932: inconsistent datatypes: expected - got CLOB

These are some of the things I have already tried........
I have tried using oracle 10g drivers ,also changed
hibernate.jdbc.batch_size = 0
hibernate.jdbc.use_streams_for_binary true

please let me know if more info is neede...

Thanks and Regards,
OP


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 27, 2007 3:10 am 
Newbie

Joined: Mon Jul 02, 2007 2:12 pm
Posts: 18
Hi OP,

pls have a look here:

Using Clobs/Blobs with Oracle and Hibernate http://www.hibernate.org/56.html

Maybe you really run into ORALCE 8/9 problem. I guess above thread can help. In 10g it runs fine (doublce checked to insert mor than 4000 chars).

-Thomas


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.