我的tomcat 总是报数据源找不到! 请大侠门帮我看一下!
web.xml:
<resource-ref>
<res-ref-name> jdbc/orcl </res-ref-name>
<res-type> java.sql.DataSource </res-type>
<res-auth> Container </res-auth>
</resource-ref>
tomcat server.xml
<Context path= "/firsttest " reloadable= "false " docBase= "First " >
<Resource
name= "jdbc/orcl "
auth= "Container "
type= "javax.sql.DataSource "
factory= "org.logicalcobwebs.proxool.ProxoolDataSource "
proxool.alias= "orcl "
user= "infocenter "
password= "infocenter "
delegateProperties= "foo=bar "
proxool.driver-url= "jdbc:oracle:thin:@192.168.0.178:1521:XE "
proxool.driver-class= "oracle.jdbc.driver.OracleDriver "
proxool.house-keeping-sleep-time = "90000 "
proxool.maximum-new-connections = "20 "
proxool.prototype-count = "3 "
proxool.maximum-connection-count = "10 "
proxool.minimum-connection-count = "3 "
proxool.house-keeping-test-sql = "select CURRENT_DATE from dual "
proxool.test-before-use = "true "
/>
------解决方案--------------------Error creating bean with name 'dataSource ' defined in ServletContext resource 这错误应该是
javax.naming.NamingException: Cannot create resource instance
不能建立 资源的实例
我认为是数据源的问题呀你试下在conf/Catalina/localhost下建立与你WEBAPP同名的***.xml
tomcat5.5 加入下面的内容 要是tomcat6.0的话 连Catalina和localhost这两个文件夹也自己建立
<Context path= "/firsttest " reloadable= "false " docBase= "First " >
<Resource
name= "jdbc/orcl "
auth= "Container "
type= "javax.sql.DataSource "
factory= "org.logicalcobwebs.proxool.ProxoolDataSource "
proxool.alias= "orcl "
user= "infocenter "
password= "infocenter "
delegateProperties= "foo=bar "
proxool.driver-url= "jdbc