I've got turbine working with postgresql to the point where turbine
itself can access the database, for ID broker and users etc. However,
when one of my om classes generated by torque tries to access the
database, I get a null pointer exception, which has the message: 

"java.lang.NullPointerException: Connection object was null. This
could be due to a misconfiguration of the DataSourceFactory. Check the
logs and Torque.properties to better determine the cause."

I've got a test program that uses the om classes outside of Turbine,
which works fine. I had to add the following properties to the
properties file for it to work: 

torque.database.default=laser
torque.database.laser.driver = org.postgresql.Driver
torque.database.laser.url = jdbc:postgresql://localhost:5432/laser
torque.database.laser.username = laser
torque.database.laser.password = laser

torque.dsfactory.laser.factory=org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
torque.dsfactory.laser.pool.defaultMaxActive=10
torque.dsfactory.laser.pool.testOnBorrow=true
torque.dsfactory.laser.pool.validationQuery=SELECT 1
torque.dsfactory.laser.connection.driver = org.postgresql.Driver
torque.dsfactory.laser.connection.url = jdbc:postgresql:laser
torque.dsfactory.laser.connection.user = laser
torque.dsfactory.laser.connection.password = laser

I've tried adding these properties to my TurbineResouces.properties,
but to no effect. 

Does anyone have any idea what I need to do to get my classes to be
able to access the database? Is the a complete reference for what can
go in Torque and Turbine property files somewhere? 

Thanks.

-- 
 Matt Hughes
  + [EMAIL PROTECTED]
  + GNU Privacy Guard Public (gnupg.org) key fingerprint: 
     A8FD CE1E 6CB6 2C62 F22B F341 FA56 EFC3 9E34 F28B
  + Find this key at http://pgp.mit.edu/ as keyid 0x9E34F28B
  + @ human monk called MadMax (nethack.org)

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to