Hi,
Does the <Resource> tag contain the same name as the <ResourceParams> ?
;)


Yoav Shapira
Millennium Research Informatics


>-----Original Message-----
>From: Bussie, Andre D [mailto:[EMAIL PROTECTED]
>Sent: Monday, July 26, 2004 10:58 AM
>To: [EMAIL PROTECTED]
>Subject: Tomcat DataSource
>
>I'm using Tomcat 5.0.19. I configured a datasource via the Tomcat Admin
>tool to configure a datatsource listed below is the server.xml file
>settings for the datasource
>
><ResourceParams name="hsqldb">
>
>      <parameter>
>
>        <name>maxWait</name>
>
>        <value>5000</value>
>
>      </parameter>
>
>      <parameter>
>
>        <name>maxActive</name>
>
>        <value>4</value>
>
>      </parameter>
>
>      <parameter>
>
>        <name>password</name>
>
>        <value></value>
>
>      </parameter>
>
>      <parameter>
>
>        <name>url</name>
>
>        <value>jdbc:hsqldb.hsql://localhost</value>
>
>      </parameter>
>
>      <parameter>
>
>        <name>driverClassName</name>
>
>        <value>org.hsqldb.jdbcDriver</value>
>
>      </parameter>
>
>      <parameter>
>
>        <name>maxIdle</name>
>
>        <value>2</value>
>
>      </parameter>
>
>      <parameter>
>
>        <name>username</name>
>
>        <value>sa</value>
>
>      </parameter>
>
>    </ResourceParams>
>
>
>
>However when I try to access the datasource from a jsp file I get the
>following error
>
>2004-07-26 10:42:19 StandardWrapperValve[jsp]: Servlet.service() for
>servlet jsp threw exception
>
>javax.naming.NameNotFoundException: Name hsqldb is not bound in this
>Context
>
>
>
>Code snippet listed below
>
><% InitialContext ctx = new InitialContext();
>
>      DataSource ds = (DataSource)ctx.lookup("java:comp/env/hsqldb");
>
>      Connection conn = ds.getConnection();
>
>      try{
>
>
>
>Any suggestions on what can be causing this error. Why isn't in the
>context and how do I bind it to the context?
>
>
>
>Andre' D. Bussie
>
>Sourcing Rotational Program
>
>MAC-MAR
>
>532 Fellowship Rd
>
>Moorestown, NJ 08057
>
>856.787.3273
>
>856.952.7325 - Cell
>
>[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to