1. 程式人生 > >javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

from edr javax classname exception tomcat not data vax

在tomcat的context文件裏加上數據源,

-->
<Resource validationQuery="select ‘x‘ from dual" testOnBorrow="true" maxWait="5000" maxIdle="2" maxActive="50" password="commu" username="commu" url="jdbc:oracle:thin:@192.168.1.150:1521:orcl" driverClassName="oracle.jdbc.driver.OracleDriver" type="javax.sql.DataSource" name="acc_cm"/>

<Resource validationQuery="select ‘x‘ from dual" testOnBorrow="true" maxWait="5000" maxIdle="2" maxActive="50" password="acc_ic" username="acc_ic" url="jdbc:oracle:thin:@192.168.1.150:1521:orcl" driverClassName="oracle.jdbc.driver.OracleDriver" type="javax.sql.DataSource" name="acc_ic"/>

<Resource validationQuery="select ‘x‘ from dual" testOnBorrow="true" maxWait="5000" maxIdle="2" maxActive="50" password="acc_op" username="acc_op" url="jdbc:oracle:thin:@192.168.1.150:1521:orcl" driverClassName="oracle.jdbc.driver.OracleDriver" type="javax.sql.DataSource" name="acc_op"/>

<Resource validationQuery="select ‘x‘ from dual" testOnBorrow="true" maxWait="5000" maxIdle="2" maxActive="50" password="acc_st" username="acc_st" url="jdbc:oracle:thin:@192.168.1.150:1521:orcl" driverClassName="oracle.jdbc.driver.OracleDriver" type="javax.sql.DataSource" name="acc_st"/>

javax.naming.NameNotFoundException: Name jdbc is not bound in this Context