tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graff, David" <>
Subject RE: JNDI Problem
Date Tue, 17 Aug 2004 16:14:01 GMT
Temporarily remove the res-ref entry from your web.xml file, and through the
admin console add a resource link to the global resource in the context of
your web app.

Or add manually a resource link entry in your server.xml to the context

This is an annoying little quirk.

-----Original Message-----
From: Bussie, Andre D []
Sent: Tuesday, August 17, 2004 11:49 AM
Subject: JNDI Problem

Trying to set access datasource via JNDI. Using Tomcat 5.0.19 however I
get the following error message

Cannot create JDBC driver of class '' for connect URL 'null', cause:


Here is my server.xml file snippet


<Resource name="hsqldb" type="javax.sql.DataSource"/>

<ResourceParams name="hsqldb">
































Here is web.xml snippet

<!-- JNDI Resource Declarations -->


   <description>Resource reference to a HSQLDB datasource instance

     that is configured in the server.xml file.







JSP code to access 

Context initContext = new InitialContext();

Context envContext  = (Context)initContext.lookup("java:/comp/env");

DataSource ds = (DataSource)envContext.lookup("hsqldb");

Connection conn = ds.getConnection();



I followed the instructions from the tomcat web page what is causing
this and how can I get this resolved to access the datasource through


Anyone .........



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message