I am using Oracle's XML database feature and the column is defined as SYS.XMLTYPE
. I am using the below JDBC code to select/update this field.
XMLType xmlType = (XMLType) rs.getObject(1);
stmt.setObject(1, XMLType.createXML(connection, xmlString));
I had to configure the data source in Tomcat's context.xml as below to get it to work (by adding the following type, factory and driverClassName).
<Resource
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
driverClassName="oracle.jdbc.driver.OracleDriver"
...
However, when deploying in WebSphere I am getting the below Exceptions. Could anybody help me with the equivalent data source configuration in WAS 6.1 to get rid of these errors?
java.lang.ClassCastException: oracle.sql.OPAQUE incompatible with oracle.xdb.XMLType
java.lang.ClassCastException: com.ibm.ws.rsadapter.jdbc.WSJdbcConnection incompatible with oracle.jdbc.OracleConnection