-1

I need to create a oracle.xdb.XMLType from org.w3c.dom.Document. To create XMLType a native JDBC connection is required. I'm able to get java.sql.Connection but not able to Extact native connection(oracle.jdbc.OracleConnection). Any help is appreciated.

Ravindra S
  • 49
  • 6

1 Answers1

1

According to the source code, oracle.jdbc.OracleConnection is a subclass of java.sql.Connection.

So you may be able to type-cast from the latter to the former ... assuming that you got the connection object from an Oracle JDBC driver.

If the Connection an ibatis proxy, then the unwindConnection method on this page may be helpful.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • I tried that already and I got the erro: com.sun.proxy.$Proxy0 cannot be cast to oracle.jdbc.OracleConnection. This is an ibatis implementation. – Ravindra S Feb 03 '15 at 12:55