Today, I had a task to change a column’s data type in oracle from varchar2 to xmltype and reflect the same in JDBC code. The version of oracle was 9.2.0. I considered this task to be an easy one as Java 6 added the support for XML data type which is SQLXML type. I changed the data type in JDBC code accordingly.
To my surprize it did not work.
After googling for few minutes I came to know that java-6 uses JDBC-4 and which is not supported by the version of oracle I was using. So I had to resort to the solution used for this prior to Java-6. I found the following link very helpful for the using xml type data with the help of JDBC: