db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patryk Laurent <pat...@snt-inc.com>
Subject Re: Null Connection Object
Date Fri, 24 Jan 2003 13:59:24 GMT
Derick,

Maybe this is too obvious, but I always get that error

1 - if I forget to start up mysql/psql on the new box, or 

2 - if I forget to allow TCP/IP connections on that instance of the
server (such as postmaster -i with PostgreSQL).  However I think mysql
allows connections by defauly so this may not apply.


Patryk
 

On Thu, 2003-01-23 at 21:32, Derick Fernando wrote:
> Hello,
> 
> I keep getting:
> 
> 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.aurajen46.web.om.BaseProductsPeer.doSelectVillageRecords(BaseProductsPee
> r.java:515)
> at
> com.aurajen46.web.om.BaseProductsPeer.doSelectVillageRecords(BaseProductsPee
> r.java:435)
> at com.aurajen46.web.om.BaseProductsPeer.doSelect(BaseProductsPeer.java:403)
> at com.aurajen46.web.modules.screens.Man.getDefaultShirt(Man.java:111)
> at com.aurajen46.web.modules.screens.Man.getcurrentItem(Man.java:165)
> at com.aurajen46.web.modules.screens.Man.doBuildTemplate(Man.java:63)
> at
> org.apache.turbine.modules.screens.VelocityScreen.doBuildTemplate(VelocitySc
> reen.java:111)
> at
> org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScreen.jav
> a:129)
> at org.apache.turbine.modules.Screen.build(Screen.java:99)
> at org.apache.turbine.modules.ScreenLoader.eval(ScreenLoader.java:129)
> #######################
> 
> But the same webapp, with the same databse name and same username etc works
> perfectly on two development stations. When I upload it to the host however,
> I keep getting this error. I've checked Torque.properties over and over, and
> can't find anything wrong with it:
> 
> torque.database.default=web
> torque.database.web.adapter=mysql
> ## Using torque's old pool
> torque.dsfactory.web.factory=org.apache.torque.dsfactory.TorqueDataSourceFac
> tory
> torque.dsfactory.web.pool.defaultMaxConnections=10
> torque.dsfactory.web.pool.maxExpiryTime=3600
> torque.dsfactory.web.pool.connectionWaitTimeout=10
> torque.dsfactory.web.connection.driver = org.gjt.mm.mysql.Driver
> torque.dsfactory.web.connection.url = jdbc:mysql://localhost/aura
> torque.dsfactory.web.connection.user = aurauser
> torque.dsfactory.web.connection.password = password
> 
> 
> Any Ideas?
> Thanks,
> Derick
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:turbine-torque-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:turbine-torque-user-help@jakarta.apache.org>
> 
> 


Mime
View raw message