I am getting following error when I pass array to stored procedure.
java.lang.ClassCastException: weblogic.jdbc.wrapper.PoolConnection_oracle_jdbc_driver_T4CConnection cannot be cast to oracle.jdbc.driver.OracleConnection
I am using Spring MVC with oracle 10g on Weblogic 11g server. I do a JNDI look up to connect to database. I also unchecked the Wrap data types check box in my Data sources configuration on weblogic server and restarted server. But still same error.
I am using ojdbc6-11.2.0.3.jar
Following is the like of code where I get the error
ArrayDescriptor arrayDescriptor =
ArrayDescriptor.createDescriptor("Frc.Typ_Frc_Varray",
(oracle.jdbc.driver.OracleConnection) dataSource.getConnection());
I have data source autowired as follows
@Autowired
DataSource dataSource;
尝试像这样进行转换:
(oracle.jdbc.driver.OracleConnection) ((WLConnection)dataSource.getConnection()).getVendorConnection()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.