sql server 2008、jpetstore
已将sqljdbc4.jar放在了webapps应用程序的lib中
database.properties:
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=jpetstore;
username=
password=
运行时出现首页面,进入到http://localhost:8080/jpetstore/shop/index.shtml
然后总是出现错误
报错No suitable driver found for jdbc:microsoft:sqlserver://localhost:1433
Caused by: com.ibatis.dao.client.DaoException: Error starting SQL Map transaction. Cause: java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=jpetstore;
Caused by: java.sql.SQLException: No suitable driver found for jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=jpetstore;
at com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransaction.(SqlMapDaoTransaction.java:25)
at com.ibatis.dao.engine.transaction.sqlmap.SqlMapDaoTransactionManager.startTransaction(SqlMapDaoTransactionManager.java:48)
at com.ibatis.dao.engine.impl.DaoContext.startTransaction(DaoContext.java:82)
at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:60)
at $Proxy8.getProductListByCategory(Unknown Source)
at com.ibatis.jpetstore.service.CatalogService.getProductListByCategory(CatalogService.java:60)
at com.ibatis.jpetstore.presentation.CatalogBean.viewCategory(CatalogBean.java:134)
... 27 more
……
网上查了很多方法都不能解决,上来请问下