db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Brady <paul.br...@macalla.com>
Subject RE: Misconfiguration of the DataSourceFactory?
Date Thu, 15 May 2003 09:01:10 GMT
Ok, figured it out, my configuration was totally wrong! Changed it to the
following:
log4j.rootCategory=DEBUG,default
log4j.appender.default=org.apache.log4j.FileAppender
log4j.appender.default.file=./torque.log
log4j.appender.default.layout=org.apache.log4j.SimpleLayout

torque.database.default=sisp
torque.database.sisp.adapter=mysql

torque.dsfactory.sisp.factory=org.apache.torque.dsfactory.TorqueDataSourceFa
ctory
torque.dsfactory.sisp.pool.defaultMaxConnections=10
torque.dsfactory.sisp.pool.maxExpiryTime=3600
torque.dsfactory.sisp.pool.connectionWaitTimeout=10
torque.dsfactory.sisp.connection.driver=org.gjt.mm.mysql.Driver
torque.dsfactory.sisp.connection.url=jdbc:mysql://localhost:3306/sisp
torque.dsfactory.sisp.connection.user=paul
torque.dsfactory.sisp.connection.password=paul

torque.idbroker.cleverquantity=true
torque.manager.useCache=true

-----Original Message-----
From: Paul Brady [mailto:paul.brady@macalla.com] 
Sent: 15 May 2003 09:23
To: 'torque-user@db.apache.org'
Subject: Misconfiguration of the DataSourceFactory?

Has anyone come across this exception (below)? It occurs when I attempt to
do a doSelect() as follows:

        Criteria criteria = new Criteria();
        criteria.add(CampaignSubscriberPeer.CAMPAIGN_ID, strCampaignId);

        return doSelect(criteria);

I'm using mysql and my runtime properties are as follows:
log4j.rootCategory=DEBUG,default
log4j.appender.default= com.mysql.jdbc.Driver
log4j.appender.default.file=./torque.log
log4j.appender.default.layout=org.apache.log4j.SimpleLayout

torque.database.default=sisp
torque.database.bookstore.driver=org.gjt.mm.mysql.Driver
torque.database.bookstore.url=jdbc:mysql://127.0.0.1/sisp
torque.database.bookstore.username=paul
torque.database.bookstore.password=paul

Cheers,
Paul.

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.
	at org.apache.torque.util.Transaction.rollback(Transaction.java:179)
	at org.apache.torque.util.BasePeer.doSelect(BasePeer.java:1333)
	at
com.macalla.sisp.db.torque.BaseCampaignSubscriberPeer.doSelectVillageRecords
(BaseCampaignSubscriberPeer.java:364)
	at
com.macalla.sisp.db.torque.BaseCampaignSubscriberPeer.doSelectVillageRecords
(BaseCampaignSubscriberPeer.java:331)
	at
com.macalla.sisp.db.torque.BaseCampaignSubscriberPeer.doSelect(BaseCampaignS
ubscriberPeer.java:300)
	at
com.macalla.sisp.db.torque.CampaignSubscriberPeer.getCampaignSubscribers(Cam
paignSubscriberPeer.java:25)
	at
com.macalla.sisp.db.SubscriberDBManager.getCampaignSubscribers(SubscriberDBM
anager.java:58)
	at
com.macalla.sisp.smsri.SMSCampaign.startCampaign(SMSCampaign.java:66)
	at
com.macalla.sisp.smsri.SMSCampaignManager.start(SMSCampaignManager.java:77)
	at
com.macalla.sisp.smsri.SMSCampaignManager.main(SMSCampaignManager.java:88)

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org

Mime
View raw message