I'm in the process of upgrading from Castor-0.3.21 to the recent Milestone version, and I'm having trouble with the
DataSource.

Here's my jdo-conf:

-------------------------
<!DOCTYPE jdo-conf PUBLIC "-//EXOLAB/Castor JDO Configuration DTD Version 1.0//EN"
                           "http://castor.org/jdo-conf.dtd";>
<jdo-conf>
 <database name="my_db_name" engine="postgresql">
   <jndi name="java:comp/env/jdbc/myDB" />
   <mapping href="mapping.xml" />
 </database>
</jdo-conf>
-------------------------
though i've had the same problem with the below configuration not using jndi (which i prefer)

-------------------------
<jdo-conf>
 <database name="my_db_name" engine="postgresql">
   <data-source class-name="org.postgresql.PostgresqlDataSource">
     <param name="serverName" value="db" />
     <param name="databaseName" value="my_db" />
     <param name="portNumber" value="5432" />
     <param name="user" value="my_login" />
     <param name="password" value="my_passwd" />
  </data-source>
  <mapping href="mapping.xml" />
</database>
</jdo-conf>
-------------------

here is the code causing the exception:

--------------
JDOManager.loadConfiguration( location + "WEB-INF/etc/database.xml" );
---------------

and here is the resulting exception:
--------------------
java.lang.NullPointerException
at org.castor.jdo.util.JDOConfAdapter.getTransactionManager(JDOConfAdapter.java:40) at org.castor.jdo.engine.AbstractConnectionFactory.initialize(AbstractConnectionFactory.java:139) at org.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:177) at org.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRegistry.java:136) at org.exolab.castor.jdo.JDOManager.loadConfiguration(JDOManager.java:316) at org.exolab.castor.jdo.JDOManager.loadConfiguration(JDOManager.java:349)
-------------------------

the database connection worked fine with the castor-0.3.21.
do i need an updated postgresql driver or something? i'm using postgres 7.2.1

thanks!
-peter




-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to