Hi all.

I've made some progress - I'm closer to the wall I've been hitting my head on :-) 
Oracle works, but PostgreSQL doesn't.

The error that I made in my previous attempts was in server.xml. I user capital 
letters for <Paramaeter>, instead of <parameter>. Now that is OK, but I'm still stuck, 
this time with different symptoms. For testing purposes, I've setup an equivalent 
entry for an Oracle connection and it works.

Here is my PostgreSQL related part of server.xml:

<Resource name="jdbc/AddressBookDB" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/AddressBookDB">
  <parameter>
    <name>driverClassName</name>
    <value>org.postgresql.Driver</value>
  </parameter>
  <parameter>
    <name>driverName</name>
    <value>jdbc:postgresql://localhost/test</value>
  </parameter>
  <parameter>
    <name>user</name>
    <value>test</value>
  </parameter>
  <parameter>
    <name>password</name>
    <value>test00</value>
  </parameter>
</ResourceParams>

When I list all objects bound to "java:/comp/env/jdbc" context, I get two references, 
the first one is Oracle, the second is PostgreSQL:

---------------------------------
TestOracleDB: tyrex.jdbc.xa.EnabledDataSource:Enabled DataSource
---------------------------------
AddressBookDB: org.apache.naming.ResourceRef:Reference Class Name: 
javax.sql.DataSource Type: scope Content: Shareable Type: auth Content: Container 
Type: user Content: test Type: password Content: test00 Type: driverName Content: 
jdbc:postgresql://localhost/www Type: driverClassName Content: org.postgresql.Driver
---------------------------------

Any ideas? This is looking "much better" than in previous attempt, but still it is 
no-go.

Nix.


Reply via email to