db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Wood <jus...@braidquest.com>
Subject Re: Connection NULL Torque Postgresql web app
Date Mon, 10 Nov 2003 05:26:58 GMT
Here's a snip from my props file.   

Make sure you have the line 'torque.database.default=vss' (vss is my database 
name) and that all you props then use that name.

#----------------------------------------------
torque.database.default=vss
torque.database.vss.adapter=postgresql

# Using commons-dbcp
torque.dsfactory.vss.factory=org.apache.torque.dsfactory.SharedPoolDataSourceFactory
torque.dsfactory.vss.pool.maxActive=30
torque.dsfactory.vss.pool.testOnBorrow=true
torque.dsfactory.vss.pool.validationQuery=SELECT 1

torque.dsfactory.vss.connection.driver = org.postgresql.Driver
torque.dsfactory.vss.connection.url = jdbc:postgresql://localhost/vss
torque.dsfactory.vss.connection.user = postgres
torque.dsfactory.vss.connection.password = postgres#01
#----------------------------------------------

Justin


On Friday 07 November 2003 21:02, Michael Bila wrote:
> I'm receiving the following error message
> Connection object was null. This could be due to a misconfiguration of the
> DataSourceFactory.
>
> I had no problem building torque and my db and tables. Just running my app
>
> It is a web app and I made a servelet and registered it in the web.xml to
> intiaite torque.
>
>
> I have tried many different configurations of the torque.properties file
>
> here is my current:
>
> # -------------------------------------------------------------------
> # $Id: Torque.master,v 1.5 2002/11/28 14:06:12 mpoeschl Exp $
> #
> # This is the configuration file for Torque.
> #
> # Note that strings containing "," (comma) characters must backslash
> # escape the comma (i.e. '\,')
> #
> # -------------------------------------------------------------------
>
> torque.applicationRoot = .
>
> # -------------------------------------------------------------------
> #
> #  L O G G I N G
> #
> # -------------------------------------------------------------------
> # We use Log4J for all Torque logging and we embed the log4j
> # properties within our application configuration.
> # -------------------------------------------------------------------
>
> # This first category is required and the category
> # must be named 'default'. This is used for all logging
> # where an explicit category is not specified.
>
> log4j.category.org.apache.torque = ALL, org.apache.torque
> log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
> log4j.appender.org.apache.torque.file =
> ${torque.applicationRoot}/logs/torque.log
> log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
> log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p
> %c - %m%n
> log4j.appender.org.apache.torque.append = false
>
> # -------------------------------------------------------------------
> #
> #  T O R Q U E  P R O P E R T I E S
> #
> # -------------------------------------------------------------------
> # These are your database settings. Look in the
> # org.apache.torque.pool.* packages for more information.
> #
> # The parameters to connect to the default database.  You MUST
> # configure these properly.
> # -------------------------------------------------------------------
> torque.database.default.adapter=postgresql
> torque.dsfactory.default.factory=org.apache.torque.dsfactory.TorqueDataSour
>c eFactory
>
> torque.dsfactory.default.pool.defaultMaxConnections=10
> torque.dsfactory.default.pool.maxExpiryTime=3600
> torque.dsfactory.default.pool.connectionWaitTimeout=10
>
> torque.dsfactory.default.connection.driver = org.postgresql.Driver
> torque.dsfactory.default.connection.url
> =jdbc:postgresql://localhost:5432/eqi
> que.dsfactory.default.connection.user = postgres
> torque.dsfactory.default.connection.password =
>
> Please let me know if you see anything wrong or have any advice.
> Thanks in advance
>
> Mike
>
>
>
>
> ________________________________________________________________________
> This email has been scanned for computer viruses.


---------------------------------------------------------------------
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