Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> XMLType and ClassCastException: oracle.sql.OPAQUE
Hi There,
I'm trying to create a XMLType using the SELECT XMLTYPE('expr') FROM DUAL. When I'm trying to fetch the data I'll get an ClassCastException and I'm wondering why.
java.lang.ClassCastException: oracle.sql.OPAQUE oracle.xdb.XMLType PA.getXmlType(java.lang.String) PA.java:100
conn = getConnection(); stmt = conn.createStatement(); rs = stmt.executeQuery(sql); if (rs.next()) { xmlObj = (XMLType)rs.getObject(1); // Line 100 System.out.println(xmlObj.toString()); }
I hope any one will be helpful with this problem.
Thanks in regards,
Jess
Received on Wed Jan 12 2005 - 07:46:39 CST