When using c3p0, this error
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