XMLType and ClassCastException: oracle.sql.OPAQUE -
01-12-2005
, 07:47 AM
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
-- source snip --
sql = "SELECT XMLType('"+ xmlstr +"') FROM DUAL";
System.out.print(sql);
conn = getConnection();
stmt = conn.createStatement();
rs = stmt.executeQuery(sql);
if (rs.next()) {
xmlObj = (XMLType)rs.getObject(1); // Line 100
System.out.println(xmlObj.toString());
}
-- source snip --
I hope any one will be helpful with this problem.
Thanks in regards,
Jess |