You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Harrison <pe...@nothingbutnet.co.nz> on 2003/08/19 15:09:12 UTC

Issue moving from 4.0 to 4.1

I am moving from Tomcat 4.0 to 4.1, and I am having an issue with the 
DefaultContext.

With 4.0 we had an entry under the DefaultContext that sets up a resource for 
our connection pool.

       <DefaultContext debug="0" reloadabe="true">        

          <Resource name="jdbc/project" auth="SERVLET"
                    type="javax.sql.DataSource"/>

          <ResourceParams name="jdbc/project">
            <parameter><name>user</name><value>foo</value></parameter>
            <parameter><name>password</name><value>bar</value></parameter>
            <parameter><name>driverClassName</name>
              <value>org.postgresql.Driver</value></parameter>
            <parameter><name>driverName</name>
              <value>jdbc:postgresql://localhost/foo</value></parameter>
          </ResourceParams>

        </DefaultContext>

Each time we deploy we would delete the old project directory and put a new 
jar file in the webapps directory. Under T 4.0.X this works fine. However, 
under 4.1 I have tried the same thing with no luck. I know there was a change 
- that user changes to username and driverName to url in the JNDI parameters:

       <DefaultContext debug="0" reloadable="false">        

          <Resource name="jdbc/project" auth="SERVLET"
                    type="javax.sql.DataSource"/>

          <ResourceParams name="jdbc/project">
            <parameter><name>username</name><value>foo</value></parameter>
            <parameter><name>password</name><value>bar</value></parameter>
            <parameter><name>driverClassName</name>
              <value>org.postgresql.Driver</value></parameter>
            <parameter><name>url</name>
              <value>jdbc:postgresql://localhost/foo</value></parameter>
          </ResourceParams>

	</DefaultContext>

however I am still getting the following error:
javax.naming.NameNotFoundException: Name jdbc is not bound in this Context

If I specify the resource in a specific Context all is well - except that the 
war file doesn't unpack. If I have the resources in the DefaultContext it 
appears to be ignored.

Help.

Regards,
Peter

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