Hello all,
I recently was able to insert/select an xml document from the database using a CLOB. We have a need to do the same thing using the Oracle XMLType object.
We are currently running Oracle 9i (9.2.0.1) on a Solaris Server.
My
java environment is WSAD 5.0.1 with Oracle XDK 9.2.0.5.0 running on Win2k.
Now my xml document appears to be well-formed (i even tried hard coding the
string "<
test>foo</test>"). But when I try to create an instance of the Oracle XMLType to set in my PreparedStatement I get an error. I have tried 2 of this type�s overloaded methods and each causes a different type of error...
XMLType xml = XMLType.createXML(con,
doc); always assigns null to xml. I don't get any exception and my connection object is fine because I prepare my statement before this line is hit.
XMLType xml = XMLType.createXML(con, xmlString); throws a ClassCastException. I am not sure why this is happening. But my log4j logger says that the class cast exception is coming from the OracleConnectionProxy.
Does anyone have any thoughts on this?
Any help would be greatly appreciated.
Thanks
EDIT: The method is XMLType.createXML() not XMLType.Crate().
[ December 09, 2003: Message edited by: Heath Lilley ]