db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prescott Balch <presc...@prescottbalch.org>
Subject Re: Null Connection Object
Date Sat, 25 Jan 2003 13:10:18 GMT
I had the same problem and finally determined, with help from this fine  
list, that I needed to specify the name of the database in my  
schema.xml, e.g.:

<database name="mydatabasename">

where "mydatabasename" equals the value of torque.database.default in  
the Torque.properties file.

I had simply coded:

<database>

On Thursday, January 23, 2003, at 08:32 PM, 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(BaseProduc 
> tsPee
> r.java:515)
> at
> com.aurajen46.web.om.BaseProductsPeer.doSelectVillageRecords(BaseProduc 
> tsPee
> r.java:435)
> at  
> com.aurajen46.web.om.BaseProductsPeer.doSelect(BaseProductsPeer.java:40 
> 3)
> 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(Veloc 
> itySc
> reen.java:111)
> at
> org.apache.turbine.modules.screens.TemplateScreen.doBuild(TemplateScree 
> n.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.TorqueDataSour 
> ceFac
> 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