Hi, Please have a close look at http://castor.codehaus.org/database-conf.html, as this page shows you that you'll have to provide a <transaction-demarcation> element as well in addition to what you have already.
Regards Werner > -----Original Message----- > From: pacowan [mailto:[EMAIL PROTECTED] > Sent: Mittwoch, 11. Jänner 2006 03:44 > To: [email protected] > Subject: [castor-dev] getting a NullPointerException on > JDOManager.loadConfiguration > > 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(JDOCo > nfAdapter.java:40) > at > org.castor.jdo.engine.AbstractConnectionFactory.initialize(Abs > tractConnectionFactory.java:139) > at > org.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRe > gistry.java:177) > at > org.castor.jdo.engine.DatabaseRegistry.loadDatabase(DatabaseRe > gistry.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] > ------------------------------------------------- > > > ------------------------------------------------- If you wish to unsubscribe from this list, please send an empty message to the following address: [EMAIL PROTECTED] -------------------------------------------------

