Ed.
    I went home last nite to see how I had configured the Postgres data source & found that I used DriverManagerDataSource as you did so my remarks about ConnectionDataSource are probably not useful.  Sorry.  I notice that you specify the driver class as "postgresql.Driver" and I use "org.postgresql.Driver".  Also I use the ejb-location name because my understanding is that it includes the services implied by the other JNDI entry points: location, xa-location,  including pooling.
 
    A mystery, when I went looking for com.evermind.sql.ConnectionDataSource I could not find it in orion.jar or in the orion api docs.   But it must be somewhere because it works quite well here at work with Oracle8i.
 
   
----- Original Message -----
From: Ed Bras
Sent: Friday, January 26, 2001 12:31 PM
Subject: frustrated

Hellu there,
 
I am getting a bit frustrated as I don't seem to able to connect to my Postgres database, through the data-sources.xml file in the <home orion>/config dir.
 
I have seen about "all" newsgroup question about this issue but stilllll nothing...
 
Anyway, I do get the following error:
---
Fri Jan 26 16:09:57 GMT+01:00 2001   [warn] ERR: javax.naming.NameNotFoundException: jdbc/postgresPooledDS not found
---
 
I retrieve the name with the following code:
---
  try {
   javax.naming.InitialContext ic = new javax.naming.InitialContext();
   DataSource ds = (DataSource) ic.lookup("jdbc/postgresPooledDS");
  }
---
 
And I have the following data-sources.xml file:
----
<?xml version="1.0"?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://www.orionserver.com/d
tds/data-sources.dtd">
 
<data-sources>
        <data-source
                name="postgres"
                class="com.evermind.sql.DriverManagerDataSource"
                location="jdbc/postgresDS"
                pooled-location="jdbc/postgresPooledDS"
                xa-location="jdbc/xa/postgresXADS"
                ejb-location="jdbc/postgresEJBDS"
                connection-driver="postgresql.Driver"
                username="wwwunweb5"
                password="tpve1pw"
                url="jdbc:postgresql://localhost/wwwunweb5"
                inactivity-timeout="30"
                schema="database-schemas/postgresql.xml"
        />
</data-sources>
---
 
What am I doing wrong ??
I tried all the names (jdbc/postgresPooledDs, jdbc/postgresDS, etc..), but ... nothing.
 
BTW:
- I did put the postgres driver in  the <orion home>/lib dir (postgres.jar file). I have used this file to make a direct connection which works. The postgres.jar file is part of the J2EE_CLASSPATH variable.
- Where can I find good information about how to set this up ? Or can someone send this to me as there should an article one http://orionsupport.com/ but this server is unreachable ?
 
Please some help ??
 
Regards,
Ed Bras

Reply via email to