简体   繁体   English

JDBC连接无法转换错误

[英]JDBC connection can't cast error

I am facing a problem while connecting to database 连接数据库时遇到问题

error message: 错误信息:

oracle.jdbc.driver.T4CConnection cannot be cast to com.sun.corba.se.pept.transport.Connection oracle.jdbc.driver.T4CConnection无法转换为com.sun.corba.se.pept.transport.Connection

What does it indicate? 它表示什么?

com.sun.corba.se.pept.transport.Connection is a communication interface, not a database interface. com.sun.corba.se.pept.transport.Connection是通信接口,而不是数据库接口。

Change your class reference to java.sql.Connection 将您的类引用更改为java.sql.Connection

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM