一个Struts数据源问题
在Struts-config.xml中配置一个数据源
<data-sources>
<data-source key= "noticemanagerDB " type= "org.apache.commons.dbcp.BasicDataSource ">
<set-property property= "driverClassName "
value= "oracle.jdbc.driver.OracleDriver " />
<set-property property= "url "
value= "jdbc:oracle:thin:@127.0.0.1:1521:orcl " />
<set-property property= "username " value= "admin " />
<set-property property= "password " value= "admin " />
</data-source>
</data-sources>
为什么在运行时总是报错
严重: Initializing application data source noticemanagerDB
java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource
------解决方案--------------------参考tomcat或者服务器的数据源配置文档,数据源配置在struts配置文件里本来就怪怪的
我的异常网推荐解决方案:java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource,http://www.aiyiweb.com/j2ee/182233.html