tomcat5.5的
我在conf/context.xml下加入如下代码
<Context path= "/WEB_TEST " docBase= "E:\workspace\WEB_TEST " reloadable= "true " debug= "99 " crossContext= "true " verbosity= "DEBUG ">
<WatchedResource> WEB-INF/web.xml </WatchedResource>
<Resource name= "jdbc/TestDB "
auth= "Container "
type= "javax.sql.DataSource "
driverClassName= "com.microsoft.jdbc.sqlserver.SQLServerDriver "
maxIdle= "20 "
maxWait= "5000 "
username= "sa "
password= "sa "
maxActive= "4 "
url= "jdbc:microsoft:sqlserver://192.168.0.2:1433;DatabaseName=pubs?autoReconnect=true ">
</Resource>
</Context>
在web.xml下也写了相应的代码,应该都没有错,可最终运行的时候就报
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.microsoft.jdbc.sqlserver.SQLServerDriver '
是DataSource对像获得连接对像时报的(ds.getConnection)
------解决方案--------------------
在这配数据源 有没有把driver放到common下