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.  [ 3 posts ] 
Author Message
 Post subject: Clob
PostPosted: Thu Jul 07, 2011 6:01 am 
Newbie

Joined: Wed Jul 06, 2011 3:17 pm
Posts: 3
Hello

I use hibernate 3.6.1 and I need set a parameter with a clob, but don't work.

My code is:

values.add(Hibernate.getLobCreator(hbSession).createClob(paramValue));
types.add(new MaterializedClobType());
or
types.add(new ClobType());

Used at:
crit.add(Restrictions.sqlRestriction(sqlExpression, values.toArray(), types.toArray(new Type[values.size()])));

And Other code:
ClobType ct = new ClobType();
ct.fromString(param);
query.setParameter(paramsVal[0], ct, ClobType.INSTANCE);
Query is a SqlQuery

The SQL code is:
SELECT * FROM PRODUCT WHERE ID IN (SELECT * FROM TABLE(in_list_clob( ? )))

The error is:
java.lang.ClassCastException: $Proxy62 cannot be cast to java.lang.String

Thanks for help.


Top
 Profile  
 
 Post subject: Re: Clob
PostPosted: Fri Jul 08, 2011 5:42 am 
Newbie

Joined: Wed Jul 06, 2011 3:17 pm
Posts: 3
Anyone have an sugestion to help me?


Top
 Profile  
 
 Post subject: Re: Clob
PostPosted: Tue Jul 12, 2011 2:04 pm 
Newbie

Joined: Wed Jul 06, 2011 3:17 pm
Posts: 3
Isn't possible resolve?

I try many options and any can set a clob to database.


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