tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <d...@cornell.edu>
Subject Re: Name jdbc is not bound in this Context
Date Thu, 02 Sep 2004 11:38:33 GMT
Remove this from your <Context>...</Context> definition:

<ResourceLink global="jdbc/cd_managerDB" name="jdbc/cd_managerDB"/>


You don't need it and it may interfere since you didn't define your data 
as a global resource.

--David

Ben Halton wrote:

>Hi, 
>
>I am getting the problem :  "javax.naming.NameNotFoundException: Name jdbc is not bound
in this Context" using Tomcat 5.025.
>
>I have seen suggested solutions to this problem, none of them seem to work.
>
>My web.xml: 
>
>        <resource-ref>
>		<description>Oracle Datasource example</description>
>		<res-ref-name>jdbc/cd_managerDB</res-ref-name>
>		<res-type>javax.sql.DataSource</res-type>
>		<res-auth>Container</res-auth>
>	</resource-ref>
>
>My cd_manager.xml (cd_manager is app context): 
>
><Context path="/cd_manager" docBase="cd_manager" debug="1" reloadable="true">
>	<ResourceLink global="jdbc/cd_managerDB" name="jdbc/cd_managerDB"/>
>	<Resource name="jdbc/cd_managerDB" auth="Container" type="javax.sql.DataSource"/>

>
>	<ResourceParams name="jdbc/cd_managerDB">
>	  <parameter>
>		<name>factory</name>
>		<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>	  </parameter>
>	  <parameter>
>		<name>driverClassName</name>
>		<value>oracle.jdbc.driver.OracleDriver</value>
>	  </parameter>
>	  <parameter>
>		<name>url</name>
>		<value>jdbc:oracle:thin:@localhost:1521:ppdb</value>
>	  </parameter>
>	  <parameter>
>		<name>username</name>
>		<value>cd_manager</value>
>	  </parameter>
>	  <parameter>
>		<name>password</name>
>		<value>password</value>
>	  </parameter>
>	  <parameter>
>		<name>maxActive</name>
>		<value>20</value>
>	  </parameter>
>	  <parameter>
>		<name>maxIdle</name>
>		<value>10</value>
>	  </parameter>
>	  <parameter>
>		<name>maxWait</name>
>		<value>-1</value>
>	  </parameter>
>	</ResourceParams>
></Context>
>
>I am trying to access this datasource with Spring: 
>
>    <bean id="cdDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
>        <property name="jndiName">
>            <value>jdbc/cd_managerDB</value>
>        </property>
>    </bean>
>
>Any help much appreciated.
>
>
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message