Cause of No suitable driver found for

后端 未结 15 1672
佛祖请我去吃肉
佛祖请我去吃肉 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:05

    Okay so here's the solution. Most everyone made really good points but none solved the problem (THANKS for the help). Here is the solution I found to work.

    1. Move jars from .../web-inf/lib to PROJECT_ROOT/lib
    2. Alter build path in eclipse to reflect this change.
    3. cleaned and rebuilt my project.
    4. ran the junit test and BOOM it worked!

    My guess is that it had something to do with how Ganymede reads jars in the /web-inf/lib folder. But who knows... It works now.

提交回复
热议问题