posted 15 years ago
Hi, folks,
I have a hibernate POJO object, which has a method
public void setResults(Clob results) {
this.results = results;
}
but i have variable pro, which is Map type and has some values.
I need to pass this Haspmap value to this mehtod,
like this,
dataobject.setResults((Clob)pro);
it can complie. but when i run it,
I got an exception,
17:24:12,332 ERROR [STDERR] at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
17:24:12,332 ERROR [STDERR] Caused by: javax.transaction.TransactionRolledbackException: java.util.HashMap cannot be cast to java.sql.Clob; nested exception is:
java.lang.ClassCastException: java.util.HashMap cannot be cast to java.sql.Clob
How can i fix this issue? there is any way to cast Hashmap to a Clob.
Please help, Thank you!
Chwang