I am developing a spring web application . A JAR file which I use in my application , is looking for DataSource using JNDI. I configured the element in my tomcat's server.xml. The configuration is as below ,
<GlobalNamingResources> <Resource name="jdbc/abcd" auth="Container" type="javax.sql.DataSource" maxActive="70" maxWait="10000" username="xxxx" password="yyyy" validationQuery="SELECT 1 from dual" driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:@xx.xxx.xx.xx:xxxx:zzzz" testOnBorrow="false" testOnReturn="false" testWhileIdle="true" timeBetweenEvictionRunsMillis="120000" minEvictableIdleTimeMillis="3600000" /> </GlobalNamingResources> The Resource name configured above , "jdbc/abcd" is the same which the JAR is looking for, But its not able to find this configured data source . Does anyone know what could be the reason ?
Am getting the below exception ,
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context