db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alvin Antony" <Alvin.Ant...@internet.lmu.de>
Subject Antw: Error in Logging under JRun
Date Tue, 06 May 2003 08:41:12 GMT
I had similar problems,   when I use Torque with struts and log4j under
Jrun, 
I managed to made it work by putting the jar for logging plus log4j( if
you are using), under the default server lib for jrun,
"-JRUN-HOME-/servers/default/lib" 

This is not a nice solution but it works for me. and it is a bug in
Jrun on setting CLASS-PATH for application

HTH,
Alvin 

Alvin K. Antony
Ludwig-Maximilians-Universität München
Internet und Virtuelle Hochschule
Softwareentwicklung
Oettingenstraße 67
80538 München
Germany
-------------------------------------------
Phone: +49 (0)89 2102-5979
Fax: +49 (0)89 2102-5980
Mobile: +49 (0)175 9401175
E-Mail: aantony@lmu.de

Web: http://www.lmu.de/internet/


>>> johnd@purplebear.com 05/06 9:56  >>>
I've been able to successfully get Torque running with standalone Java 

applications, but I am know trying to use it under JRun (J2EE Server  
from Macromedia).  Whenever I try to initialize Torque, I get this  
exception:

[1]org.apache.commons.logging.LogConfigurationException:  
java.lang.ClassCastException
	at  
org.apache.commons.logging.LogFactory.newFactory(LogFactory.java:558)
	at  
org.apache.commons.logging.LogFactory.getFactory(LogFactory.java:279)
	at
org.apache.commons.logging.LogFactory.getLog(LogFactory.java:390)
	at  
org.apache.commons.beanutils.ConvertUtils.<clinit>(ConvertUtils.java:318

)
	at  
org.apache.torque.dsfactory.AbstractDataSourceFactory.setProperty(Abstra

ctDataSourceFactory.java:119)
	at  
org.apache.torque.dsfactory.TorqueDataSourceFactory.initCPDS(TorqueDataS

ourceFactory.java:134)
	at  
org.apache.torque.dsfactory.TorqueDataSourceFactory.initialize(TorqueDat

aSourceFactory.java:108)
	at
org.apache.torque.Torque.initDataSourceFactories(Torque.java:323)
	at org.apache.torque.Torque.initialize(Torque.java:237)
	at org.apache.torque.Torque.init(Torque.java:406)
	at org.apache.torque.Torque.init(Torque.java:386)
	...

I'm running under JDK 1.4.1 (though I also tried 1.3.1 to see if it  
made a difference).
My Torque.properties looks like this:
------------------------------------
torque.applicationRoot = .

log4j.category.org.apache.torque = ALL, org.apache.torque
log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
log4j.appender.org.apache.torque.file = /tmp/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

torque.applicationRoot = .
torque.database.default=granite
torque.database.granite.driver=org.gjt.mm.mysql.Driver
torque.database.granite.username=admin
torque.database.granite.password=admin

torque.database.default.adapter=mysql
torque.database.granite.adapter=mysql

torque.dsfactory.granite.factory=org.apache.torque.dsfactory.TorqueDataS

ourceFactory
torque.dsfactory.granite.pool.defaultMaxConnections=10
torque.dsfactory.granite.pool.maxExpiryTime=3600
torque.dsfactory.granite.pool.connectionWaitTimeout=10
torque.dsfactory.granite.connection.driver = org.gjt.mm.mysql.Driver
torque.dsfactory.granite.connection.url =
jdbc:mysql://localhost/granite
torque.dsfactory.granite.connection.user = admin
torque.dsfactory.granite.connection.password = admin

torque.idbroker.cleverquantity=true
torque.manager.useCache = true
---------------------------------------------------------

Any ideas about why JRun would have a problem with logging?  I wouldn't
 
want to do this long term, but can I bypass logging in Torque?

Thanks for any help.

John Dietz


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