dbTalk Databases Forums  

XMLType and ClassCastException: oracle.sql.OPAQUE

comp.database.oracle comp.database.oracle


Discuss XMLType and ClassCastException: oracle.sql.OPAQUE in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
languy
 
Posts: n/a

Default 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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.