Sunday, April 4, 2010

RDS Connection for Postgres ''Datasource...

Hi,

I tried to use PostgreSql 8.4 with Fiber.

But my RDS Connection gives always the error

''Datasource not found:java:/comp/env/jdbc/testdb1''

The Server is up and running and I can see the table in Navicat, but I can not access it from RDS/Fiber.

I used the following string:

%26lt;Resource name=''jdbc/testdb1'' type=''javax.sql.DataSource''
?driverClassName=''org.postgresql.Driver''
?maxIdle=''10'' maxWait=''10000''
?url=''jdbc:postgresql://localhost:5432/testdb1''
?username=''postgres'' password=''mypass'' maxActive=''10''/%26gt;

And driver

postgresql-8.4-701.jdbc4.jar

in tomcat/lib/

What is wrong with it?

Thanks for any pointers!

Cheers!

Martin Zach

RDS Connection for Postgres ''Datasource...

Hi,

jupiy!

I found the problem by myself:

It works with

postgresql-8.4-701.jdbc3.jar

(3 instead of 4)

Hope this will help someone!

Martin

RDS Connection for Postgres ''Datasource...

Thanks for the update Martin.?I am glad things are now working for you.

So, to summarize your connections problems it was that you were originally using the PostgreSQL version 4 JDBC driver. The version 4 driver did not connect.?Changing to the version 3 driver did connect and work.

Others should note we are talking about the JDBC API versions and not about JDBC Type 3 versus Type 4 drivers.

Ken

No comments:

Post a Comment