You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Scott Shorter <ss...@orionsec.com> on 2003/10/24 16:27:34 UTC

Torque.properties not being read?

Hi all, new user here, trying to get my bearings.

In running a simple test application that currently does little more
than try to query, I'm getting a TorqueException with the message "There
was no DataSourceFactory configured for the connection got" (where 'got'
is the database name).

I do have the following in my  Torque.properties file:

torque.dsfactory.got.factory=org.apache.torque.dsfactory.SharedPoolDataS
ourceFactory
torque.dsfactory.got.pool.defaultMaxActive=10
torque.dsfactory.got.pool.testOnBorrow=true
torque.dsfactory.got.pool.validationQuery=SELECT 1
torque.dsfactory.got.connection.driver = org.gjt.mm.mysql.Driver
torque.dsfactory.got.connection.url = jdbc:mysql://localhost:3306/got
torque.dsfactory.got.connection.user =
torque.dsfactory.got.connection.password =

Which makes me wonder whether Torque.properties is being read or not.  I
have it located in the torque directory under the location from which I
am running my test - this seems like the place to put it, based on the
"Run-Time Properties" section of
http://db.apache.org/torque/tutorial/step2.html

Any suggestions?

Thanks,
Scott


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


Re: Torque.properties not being read?

Posted by Michael Della Bitta <md...@columbia.edu>.
Yeah, I had to hunt for that too... I saw a mention of the need for it 
in the documentation, but found example code elsewhere (thanks to 
Google.)

Michael

On Friday, October 24, 2003, at 12:42  PM, Scott Shorter wrote:

>> Are you explicitly loading the properties and initializing
>> Torque? It doesn't do that for itself...
>
> Thanks, that actually did the trick - I found that in the mailing list
> archives a few minutes before I got your message.
>
> Perhaps the website could have some sample code, I don't recall seeing
> Torque.init() referenced anywhere in the tutorial or guides... I could
> be mistaken.
> -
> Scott
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


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


RE: Torque.properties not being read?

Posted by Scott Shorter <ss...@orionsec.com>.
> Are you explicitly loading the properties and initializing 
> Torque? It doesn't do that for itself...

Thanks, that actually did the trick - I found that in the mailing list
archives a few minutes before I got your message.

Perhaps the website could have some sample code, I don't recall seeing
Torque.init() referenced anywhere in the tutorial or guides... I could
be mistaken.
-
Scott


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


Re: Torque.properties not being read?

Posted by Michael Della Bitta <md...@earthlink.net>.
Scott:

Are you explicitly loading the properties and initializing Torque? It  
doesn't do that for itself...

Michael

On Friday, October 24, 2003, at 10:27  AM, Scott Shorter wrote:

> Hi all, new user here, trying to get my bearings.
>
> In running a simple test application that currently does little more
> than try to query, I'm getting a TorqueException with the message  
> "There
> was no DataSourceFactory configured for the connection got" (where  
> 'got'
> is the database name).
>
> I do have the following in my  Torque.properties file:
>
> torque.dsfactory.got.factory=org.apache.torque.dsfactory.SharedPoolData 
> S
> ourceFactory
> torque.dsfactory.got.pool.defaultMaxActive=10
> torque.dsfactory.got.pool.testOnBorrow=true
> torque.dsfactory.got.pool.validationQuery=SELECT 1
> torque.dsfactory.got.connection.driver = org.gjt.mm.mysql.Driver
> torque.dsfactory.got.connection.url = jdbc:mysql://localhost:3306/got
> torque.dsfactory.got.connection.user =
> torque.dsfactory.got.connection.password =
>
> Which makes me wonder whether Torque.properties is being read or not.   
> I
> have it located in the torque directory under the location from which I
> am running my test - this seems like the place to put it, based on the
> "Run-Time Properties" section of
> http://db.apache.org/torque/tutorial/step2.html
>
> Any suggestions?
>
> Thanks,
> Scott
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


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