Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> XMLType and ClassCastException: oracle.sql.OPAQUE

XMLType and ClassCastException: oracle.sql.OPAQUE

From: languy <languy_at_online.stofanet.dk>
Date: Wed, 12 Jan 2005 14:46:39 +0100
Message-ID: <41e52a3f$0$22693$d40e179e@nntp04.dk.telia.net>


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());
      }

-- source snip --

I hope any one will be helpful with this problem.

Thanks in regards,
Jess Received on Wed Jan 12 2005 - 07:46:39 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US