David-

  I've not seen the specific problem you are having. What version of
postgresql are you using, and what 'version' of the postgresql driver? 
I use 7.2, with the driver in that release. (Though the driver in the
Castor repository should work too.) When I use the postgresql data
source, I configure it like this: (for my local postgres installation,
with the database name 'mediamgmt')

<database name="mediamgmt" engine="postgresql">
  <data-source class-name="org.postgresql.PostgresqlDataSource">
     <params database-name="mediamgmt"  user="user"  
          password="password" server-name="localhost"/>
  </data-source>
...

and as a driver, this way:

<database name="knowledgenet" engine="postgresql">
  <driver class-name="org.postgresql.Driver" 
          url="jdbc:postgresql://localhost/mediamgmt">
     <param name="user" value="user"/>
     <param name="password" value="password"/>
  </driver>
  ...



On Thu, 2002-03-07 at 09:08, David Blevins wrote:
> Hi all,
> 
> I trying to use Castor against PostgreSQL and having no luck.  With a config
> like this:
> 
> <database name="Local_TX_Database" engine="postgresql" >
>     <driver class-name="org.postgresql.Driver"
>              url="jdbc:postgresql://127.0.0.1:5432/openejbtest">
>         <param name="user" value="openejbuser" />
>         <param name="password" value="javaone" />
>     </driver>
> 
> ...I get this exception:
> 
> org.exolab.castor.jdo.PersistenceException: Nested error:
> java.sql.SQLException: ERROR:  entity: Permission denied.
> 
> This is strange, because if I use that same information against PostgreSQL's
> JDBC driver directly, it works just fine.
> 
> try{
>     Class.forName("org.postgresql.Driver");
>     Connection conn =
> DriverManager.getConnection("jdbc:postgresql://127.0.0.1/openejbtest",
> "openejbuser","javaone");
>     Statement stmt = conn.createStatement();
> } catch (Exception e){
>     e.printStackTrace();
> }
> 
> I tried using the other way of configuring Castor for PostgreSQL as shown at
> the website (which has a typo in it BTW, the 's' is missing from 'params' in
> the first PosgreSQL example).
> 
> <database name="Local_TX_Database" engine="postgresql" >
>     <data-source class-name="org.postgresql.PostgresqlDataSource">
>         <param server-name="127.0.0.1" port-number="5432"
> database-name="openejbtest"
>                 user="openejbuser" password="javaone" />
>     </data-source>
> 
> This gives me the infamous NullPointerException at
> org.postgresql.Connection.openConnection(Connection.java:148).  I am
> familiar with this error as I ran across it in my previous tests with just
> JDBC and PostgreSQL alone, it turned out that I had left the database name
> out of my JDBC URL as in:
> 
> DriverManager.getConnection("jdbc:postgresql://127.0.0.1/","openejbuser","ja
> vaone");
> When I caught the mistake and added the database name to the end of the URL,
> everything worked fine.  Maybe Castor is having the same trouble?
> 
> Anyway, none of my Castor/PostgreSQL attempts seem to work.  Any ideas?
> 
> Thanks,
> David
> 
> ----------------------------------------------------------- 
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>       unsubscribe castor-dev
-- 

Virtually, 
Ned Wolpert <[EMAIL PROTECTED]>

D08C2F45:  28E7 56CB 58AC C622 5A51  3C42 8B2B 2739 D08C 2F45 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to