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

Reply via email to