Hi David,

Here is what I have in my TR.props for the TurbineAvalonComponentService
(good luck on using it ;)).

services.AvalonComponentService.classname=org.apache.turbine.services.av
aloncomponent.TurbineAvalonComponentService
services.AvalonComponentService.earlyInit=true
services.AvalonComponentService.componentConfiguration =
/WEB-INF/conf/componentConfiguration.xml
services.AvalonComponentService.componentRoles =
/WEB-INF/conf/roleConfiguration.xml
services.AvalonComponentService.lookup = org.apache.torque.avalon.Torque

My componentConfiguration.xml looks like this:
<!--
========================================================================
-->
<!--
-->
<!--  Component Configuration for Avalon Components
-->
<!--
-->
<!-- $Id: componentConfiguration.xml,v 1.1 2003/06/20 00:11:04 henning
Exp $ -->
<!--
-->
<!--
========================================================================
-->
<componentConfig>
    <!-- Torque Component -->
    <torque>
       <configfile>/WEB-INF/conf/Torque.properties</configfile>
    </torque>
</componentConfig>

My roleConfiguration.xml looks like this:
<!--
========================================================================
-->
<!--
-->
<!--  Role Configuration for Avalon Components
-->
<!--
-->
<!-- $Id: roleConfiguration.xml,v 1.2 2003/06/20 00:31:36 henning Exp $
-->
<!--
-->
<!--
========================================================================
-->
<role-list>
    <!-- Torque Component Role Configuration -->
    <role name="org.apache.torque.avalon.Torque"
          shorthand="torque"
          default-class="org.apache.torque.avalon.TorqueComponent" />
</role-list>

My Torque.properties File looks like this:
# -------------------------------------------------------------------
# $Id: Torque.template,v 1.3 2003/07/18 15:11:55 buddy 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 =
M:/borc/src/webapp/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

# -------------------------------------------------------------------
#
#  D E F A U L T S
#
# -------------------------------------------------------------------
#
# These values kick in, if you don't explicitly override them in your
# various database settings. At the moment they're only used if you
# configure the TorqueDataSourceFactory of the
Jdbc2PoolDataSourceFactory
# as your data source provider. It does not work with JNDI.
#
# The example is shown for TorqueDataSource.
#
# -------------------------------------------------------------------

# If > 0, then a monitoring thread is started for every pool to
# display the number of created, available and checked out connections
# The interval is in seconds.
torque.defaults.pool.logInterval = 0

# Time to wait for a connection to the databas in Seconds.
torque.defaults.pool.connectionWaitTimeout = 10

# Maximum number of connections cached in a database definition. Note
# that, if you have multiple database definitions which access the
# same database URL, they don't share the connections but you have
# multiple pools and each has this maximum number. So if you have a
# connection licensed database engine, you must multiply this number by
# the number of times you use a specific database URL.
torque.defaults.pool.defaultMaxConnections = 80

# Lifetime of a connection in the pool. Defaults to one hour
torque.defaults.pool.maxExpiryTime = 3600

# Sets the driver for the data sources.
torque.defaults.connection.driver = org.gjt.mm.mysql.Driver

# Sets the URL for the datasources
torque.defaults.connection.url = jdbc:mysql://192.168.0.113/borc

# Sets login and password for the data sources.
torque.defaults.connection.user = buddy
torque.defaults.connection.password = Karacho

# -------------------------------------------------------------------
#
#  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=borc
torque.database.borc.adapter=mysql
torque.database.oldborc.adapter=mysql
## Using torque's old pool
#torque.dsfactory.borc.factory=org.apache.torque.dsfactory.TorqueDataSou
rceFactory
#torque.dsfactory.borc.pool.defaultMaxConnections=10
#torque.dsfactory.borc.pool.maxExpiryTime=3600
#torque.dsfactory.borc.pool.connectionWaitTimeout=10
#torque.dsfactory.borc.connection.driver = org.gjt.mm.mysql.Driver
#torque.dsfactory.borc.connection.url =  jdbc:mysql://192.168.0.113/borc
#torque.dsfactory.borc.connection.user = buddy
#torque.dsfactory.borc.connection.password = Karacho

## Using Jdbc2Pool
#torque.dsfactory.borc.factory=org.apache.torque.dsfactory.Jdbc2PoolData
SourceFactory
torque.dsfactory.borc.factory=org.apache.torque.dsfactory.PerUserPoolDat
aSourceFactory
torque.dsfactory.borc.pool.defaultMaxActive=10
torque.dsfactory.borc.pool.testOnBorrow=true
torque.dsfactory.borc.pool.validationQuery=SELECT 1
torque.dsfactory.borc.connection.driver =org.gjt.mm.mysql.Driver
torque.dsfactory.borc.connection.url = jdbc:mysql://192.168.0.113/borc
torque.dsfactory.borc.connection.user = buddy
torque.dsfactory.borc.connection.password = Karacho

#torque.dsfactory.oldborc.factory=\
#  org.apache.torque.dsfactory.Jdbc2PoolDataSourceFactory
torque.dsfactory.oldborc.factory=org.apache.torque.dsfactory.PerUserPool
DataSourceFactory
torque.dsfactory.oldborc.pool.defaultMaxActive=10
torque.dsfactory.oldborc.pool.testOnBorrow=true
torque.dsfactory.oldborc.pool.validationQuery=SELECT 1
torque.dsfactory.oldborc.connection.driver=org.gjt.mm.mysql.Driver
torque.dsfactory.oldborc.connection.url=jdbc:mysql://192.168.0.113/BORC
torque.dsfactory.oldborc.connection.user=buddy
torque.dsfactory.oldborc.connection.password=Karacho
# Determines if the quantity column of the IDBroker's id_table should
# be increased automatically if requests for ids reaches a high
# volume.

torque.idbroker.cleverquantity=true

# Determines whether the managers cache instances of the business
objects.
# And also whether the MethodResultCache will really cache results.

torque.manager.useCache = true

Mit freundlichen Gr�ssen
 
J�rgen Hoffmann
ByteACTION GmbH
 
cert. Perl Programmer
cert. Linux System Administrator
cert. Java Programmer



-----Urspr�ngliche Nachricht-----
Von: David Wynter [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 28. August 2003 15:30
An: Turbine Users List
Betreff: RE: Torque 3.1 and Turbine 2.3


Hi J�rgen,

I am about to try this for another Avalon component. Do you need to put
in "services.AvalonComponentService.earlyInit = true" to get it to
start, otherwise it attempts lazy loading for most services.

What code did you use to retrieve your component reference from Avalon?

Rgds.

David

> -----Original Message-----
> From: J�rgen Hoffmann [mailto:[EMAIL PROTECTED]
> Sent: 28 August 2003 09:16
> To: 'Turbine Users List'
> Subject: AW: Torque 3.1 and Turbine 2.3
>
>
> Hi all,
>
> This is a repost.
> Can anyone shed some light onto my problem?
>
>
> Hi Martin,
>
> yes, I am using the SharedPool.
>
> Which changes do I need?
>
> kind regards
>
> Juergen Hoffmann
>
> Am Dienstag, 26. August 2003 21:43 schrieb Martin Poeschl:
> > are you using the commons-dbcp pool??
> > in this case you have to do some changes in your properties file
> >
> > martin
> >
> > J�rgen Hoffmann wrote:
> > >Hi all,
> > >
> > >Since I moved from Torque-3.1-alpha2 to Torque-3.1-beta1 my Turbine

> > >App does not start up =(
> > >
> > >All I see is:
> > >Starting service Tomcat-Standalone
> > >Apache Tomcat/4.1.27-LE-jdk14
> > >WebappClassLoader:
> > >validateJarFile(M:\borc\src\webapp\WEB-INF\lib\servlet-2.3.jar) - 
> > >jar
>
> > >not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
> > >javax/servlet/Servlet.class
> > >WebappClassLoader:
> > >validateJarFile(M:\borc\src\webapp\WEB-INF\lib\servlet.jar) - jar 
> > >not
>
> > >loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
> > >javax/servlet/Servlet.class
> > >WebappClassLoader:
> > >validateJarFile(M:\borc\src\webapp\WEB-INF\lib\servletapi-2.3.jar) 
> > >- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending 
> > >class:
>
> > >javax/servlet/Servlet.class log4j:ERROR Could not find value for 
> > >key log4j.appender.org.apache.torque.engine
> > >
> > >log4j:ERROR Could not instantiate appender named 
> > >"org.apache.torque.engine". 2003-08-26 11:06:49,904 [main] INFO 
> > >org.apache.turbine.Turbine - Configured log4j from 
> > >M:\borc\src\webapp\WEB-INF\conf\Log4j.properties
> > >2003-08-26 11:06:49,904 [main] INFO  org.apache.turbine.Turbine - 
> > >Loaded configuration  (Properties) from 
> > >/WEB-INF/conf/TurbineResources.properties
> > >(M:\borc\src\webapp\WEB-INF\conf\TurbineResources.properties)
> > >2003-08-26 11:06:49,934 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: ComponentService
> > >2003-08-26 11:06:49,934 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: AvalonComponentService
> > >2003-08-26 11:06:49,934 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: FactoryService
> > >2003-08-26 11:06:49,934 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: PoolService
> > >2003-08-26 11:06:49,934 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: RunDataService
> > >2003-08-26 11:06:49,934 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: ServletService
> > >2003-08-26 11:06:49,934 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: AssemblerBrokerService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: LocalizationService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: MimeTypeService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: GlobalCacheService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: UniqueIdService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: UploadService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: SecurityService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: PullService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: IntakeService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: CryptoService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: TemplateService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: XSLTService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: SecurityContextService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: VelocityService
> > >2003-08-26 11:06:49,944 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Added Mapping for
> > >Service: LuceneService
> > >2003-08-26 11:06:49,954 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Start Initializing 
> > >service (early): ComponentService 2003-08-26 11:06:49,964 [main] 
> > >WARN org.apache.turbine.services.component.TurbineComponentService 
> > >- The ComponentService is deprecated! 2003-08-26 11:06:49,964 
> > >[main] DEBUG 
> > >org.apache.turbine.services.component.TurbineComponentService -
> Fixing
> > >up /WEB-INF/conf/Fulcrum.properties
> > >2003-08-26 11:06:49,964 [main] DEBUG 
> > >org.apache.turbine.services.component.TurbineComponentService - 
> > >Now: M:\borc\src\webapp\WEB-INF\conf\Fulcrum.properties
> > >2003-08-26 11:06:49,964 [main] INFO 
> > >org.apache.turbine.services.component.TurbineComponentService - 
> > >Added fulcrum as a component 2003-08-26 11:06:49,964 [main] DEBUG
> > >org.apache.turbine.services.component.TurbineComponentService -
> Fixing
> > >up /WEB-INF/conf/menu.properties
> > >2003-08-26 11:06:49,964 [main] DEBUG 
> > >org.apache.turbine.services.component.TurbineComponentService - 
> > >Now: M:\borc\src\webapp\WEB-INF\conf\menu.properties
> > >2003-08-26 11:06:49,964 [main] INFO 
> > >org.apache.turbine.services.component.TurbineComponentService - 
> > >Added menu as a component 2003-08-26 11:06:49,974 [main] INFO
> > >org.apache.stratum.component.ComponentLoader - loading component:
> > >name=fulcrum class=org.apache.fulcrum.Fulcrum
> > >config=M:\borc\src\webapp\WEB-INF\conf\Fulcrum.properties
> > >2003-08-26 11:06:49,974 [main] DEBUG
> > >org.apache.stratum.component.ComponentLoader - attempting to load
> > >'org.apache.fulcrum.Fulcrum' with the config file
> > >'M:\borc\src\webapp\WEB-INF\conf\Fulcrum.properties'.
> > >2003-08-26 11:06:50,014 [main] INFO
> org.apache.fulcrum.TurbineServices
> > >- Finished initializing all services!
> > >2003-08-26 11:06:50,014 [main] DEBUG 
> > >org.apache.stratum.component.ComponentLoader - good news! 
> > >org.apache.fulcrum.Fulcrum successfully configured and initialized 
> > >2003-08-26 11:06:50,014 [main] INFO 
> > >org.apache.stratum.component.ComponentLoader - loading component: 
> > >name=menu
> class=de.byteaction.commons.turbine.components.menu.MenuLoader
> > >config=M:\borc\src\webapp\WEB-INF\conf\menu.properties
> > >2003-08-26 11:06:50,014 [main] DEBUG 
> > >org.apache.stratum.component.ComponentLoader - attempting to load 
> > >'de.byteaction.commons.turbine.components.menu.MenuLoader' with the

> > >config file 'M:\borc\src\webapp\WEB-INF\conf\menu.properties'.
> > >2003-08-26 11:06:50,034 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Start Initializing 
> > >service (late): ServletService 2003-08-26 11:06:50,044 [main] DEBUG
> > >org.apache.turbine.services.servlet.TurbineServletService -
> Initializing
> > >with ServletConfig
> > >2003-08-26 11:06:50,044 [main] INFO 
> > >org.apache.turbine.services.BaseServiceBroker - Finish Initializing

> > >service (late): ServletService serialized exists
> > >2003-08-26 11:06:50,074 [main] DEBUG
> > >org.apache.stratum.component.ComponentLoader - good news!
> > >de.byteaction.commons.turbine.components.menu.MenuLoader
successfully
> > >configured and initialized
> > >2003-08-26 11:06:50,074 [main] INFO
> > >org.apache.turbine.services.BaseServiceBroker - Finish Initializing
> > >service (early): ComponentService
> > >2003-08-26 11:06:50,074 [main] INFO
> > >org.apache.turbine.services.BaseServiceBroker - Start Initializing
> > >service (early): AvalonComponentService
> > >2003-08-26 11:06:50,114 [main] DEBUG
> >
> >org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentSer
> >vi
> c
> > >e - Config File: 
> > >M:\borc\src\webapp\WEB-INF\conf\componentConfiguration.xml
> > >2003-08-26 11:06:50,114 [main] DEBUG
> >
> >org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentSer
> >vi
> c
> > >e - Role File:
> M:\borc\src\webapp\WEB-INF\conf\roleConfiguration.xml
> > >2003-08-26 11:06:50,184 [main] DEBUG
> >
> >org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentSer
> >vi
> c
> > >e - Application Root is M:\borc\src\webapp
> > >Starting service Tomcat-Apache
> > >Apache Tomcat/4.1.27-LE-jdk14
> > >
> > >I am trying to use Torque as an Avalon Component. I have this set 
> > >inside my TR.props
> > >
> > >services.AvalonComponentService.classname=org.apache.turbine.servic
> > >es
> > >.av
> > >aloncomponent.TurbineAvalonComponentService
> > >
> > >services.AvalonComponentService.componentConfiguration = 
> > >/WEB-INF/conf/componentConfiguration.xml
> > >services.AvalonComponentService.componentRoles = 
> > >/WEB-INF/conf/roleConfiguration.xml
> > >services.AvalonComponentService.lookup = 
> > >org.apache.torque.avalon.Torque
> > >
> > >When I point my Browser to the Turbine Application I am getting:
> > >
> > >2003-08-26 11:10:56,996 [HttpProcessor[8080][4]] INFO 
> > >org.apache.turbine.Turbine - Double initialization of Turbine was 
> > >attempted! 2003-08-26 11:10:57,006 [HttpProcessor[8080][4]] ERROR 
> > >org.apache.turbine.Turbine - Turbine.handleException: 
> > >java.lang.NullPointerException
> > >        at org.apache.turbine.Turbine.doGet(Turbine.java:692)
> > >        at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
> > >        at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > >        at
> >
> >org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServl
> >et
> .
> > >java:466)
> > >        at
> >
> >org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java
> >:1
> 8
> > >0)
> > >
> > >I have the following additional jars on in my WEB-INF/lib Directory
> > >
> > >excalibur-component
> > >excalibur-instrument
> > >excalibur-logger
> > >excalibur-pool
> > >avalon-framework
> > >logkit
> > >
> > >ANY HELP to point me into the right direction is HIGHLY appreciated
> > >
> > >Kind regards
> > >
> > >J�rgen Hoffmann
> > >
> > >
> > >
> > >-------------------------------------------------------------------
> > >--
> > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > >For additional commands, e-mail:
[EMAIL PROTECTED]
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail:
[EMAIL PROTECTED]
>
> --
> Mit freundlichen Gr��en
>
> J�rgen Hoffmann
> Leiter der Softwareentwicklung
>
> ByteAction GmbH
> Auf der Beune 83-85
> 64839 M�nster
> HRB33271
>
> mobil:       +49 (0) 163 29 83 002
> phone:       +49 (0)6071 9216-0 (9:00-18:00)
>              0700 byteaction / 0700 29832284 (24x7)
> fax:         +49 (0)6071 9216-20
>              0700 29832284
> Email:       [EMAIL PROTECTED]
> Internet:    www.byteaction.de
> ----------------------------------------------------------------------
> --
> --
> This communication is intended only for the party to whom
> it is addressed, and may contain information which is privileged or
> confidential. Any other delivery, distribution, copying or disclosure
is
> strictly prohibited and is not a waiver of privilege or
confidentiality.
> If you have received this telecommunication in error, please notify
the
> sender immediately by return electronic mail and destroy the message.
>
------------------------------------------------------------------------
> --
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to