tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ben Halton" <benhal...@email.com>
Subject Name jdbc is not bound in this Context
Date Wed, 01 Sep 2004 22:27:18 GMT
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.


-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


---------------------------------------------------------------------
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