Cause of No suitable driver found for

后端 未结 15 1684
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-14 02:17

I\'m trying to unit test (JUnit) a DAO i\'ve created. I\'m using Spring as my framework, my DAO (JdbcPackageDAO) extends SimpleJdbcDaoSupport. The testing class (JdbcPacka

15条回答
  •  悲哀的现实
    2020-12-14 03:10

    I was facing similar problem and to my surprise the problem was in the version of Java. java.sql.DriverManager comes from rt.jar was unable to load my driver "COM.ibm.db2.jdbc.app.DB2Driver".

    I upgraded from jdk 5 and jdk 6 and it worked.

提交回复
热议问题