Hi,

I am trying to setup a postgresql datasource on tomcat 4.1 with much
frustration.
I have read all the threads out there concerning this matter and I can't
see to
find anyone who has a working example. What I have is this:

Redhat 7.2 server running:
Postgresql 7.2
Tomcat 4.1

I have a working Tomcat app that can connect to the Db and perform
queries when manually loading the driver
'Class.forName("org.postgresql.Driver");
and then doing a getConnection using the URL, Name, Password.

But when trying to get a connection using a Datasource, as in,

Context ctx = new InitialContext();
Context envctx = (Context)ctx.lookup("java:/comp/env");
DataSource ds = (DataSource)envctx.lookup("jdbc/postgres"); //jndi name
of the datasource
Connection conn = ds.getConnection();

the getConnection() statement throws an SQLException: Cannot load JDBC
driver class 'null'

I have gone over all the server.xml and web.xml files with a fine tooth
comb and assure
you that is not the problem. I have also tried using the jxDBCon drivers
with the same
results. I have come to the conclusion that it must be a tomcat problem.
Has anyone
gotten this to work with this config??

Paul Salazar

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

Reply via email to