NewProxyConnection cannot be cast to com.mysql.jdbc.Connection

When using c3p0, this error
Insert picture description here
was reported. In connection and prepareStatement, both were forced to transfer and reported similar errors above. The
reason is that the package guide is wrong. You should import java.sql.connection instead of com.mysql.jdbc.PreparedStatement;

For jdbc understanding, you can read this article database connection pool

Guess you like

Origin blog.csdn.net/WA_MC/article/details/113553362