jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wang, Kevin" <KW...@TMRS.org>
Subject RE: Log4j Error with Jrun4/JBuilder
Date Thu, 15 Aug 2002 19:34:43 GMT

I got the same warning from Websphere Studio Application Developer. A closer
look at the message reveals that it is related to httpclient.jar, which sits
on my classpath but not used by any of my code, yet. 

httpclient seems to have a different way of configuring log4j. This
description, from httpclint JavaDOc, might help....

Package org.apache.commons.httpclient.log Description 

A simple logging abstraction wrapping log4j and other logging frameworks.
The org.apache.commons.httpclient.log package provides a simple abstraction
of log4j and similiar logging frameworks. 

Using this abstraction allows HTTP Client to seamlessly support log4j and
other frameworks without introducing a run-time dependency on them. 

Note: This package is likely to be revised or replaced in the near future in
order to use the similiar abstraction being considered within Log4J itself. 

Absent any specific configuration settings, this logging abstraction will
provide the following behaviour: 

If Log4J is in your classpath (specifically, if the
org.apache.log4j.Category class is in your classpath), then the
Log4JCategoryLog Log implementation will be used for logging. In this case
you may use and configure the HTTP Client logging in precisely the same way
as any other Log4J client. The log4j.properties.sample file in the
distribution provides an example of one such configuration. 
Otherwise, the NoOpLog Log implementation will be used for logging. In this
case, no log output will be generated by HTTP Client. 
One may (but need not) provide a Java system property named httpclient.log
that contains the full-specified name of a class implementing Log in order
to use an alternative logging framework. SimpleLog is one such example,
providing a subset of Log4J-like functionality, but only to the standard
output stream. See the simplelog.properties.sample file in the distribution
for details on configuring the SimpleLog. 

-----Original Message-----
From: Peng, Haitao [mailto:Haitao.Peng@commerceone.com]
Sent: Thursday, August 15, 2002 12:02 PM
To: 'Cactus Users List'
Subject: Log4j Error with Jrun4/JBuilder

Hi, All:

I get this error from Log4j.  I saw similar posting before. I read all the
archived emails and did not find an answer.

Here is my log4j.properties:

  	# Properties for configuring Log4j
	# This is the configuring for logging on the JUnit side (i.e. the
client side)

	log4j.appender.cactus = org.apache.log4j.FileAppender
	log4j.appender.cactus.File = cactus_client.log
	log4j.appender.cactus.Append = false
	log4j.appender.cactus.layout = org.apache.log4j.PatternLayout
	log4j.appender.cactus.layout.ConversionPattern = %d{ABSOLUTE} [%t]
%-5p %-30.30c{2} %x - %m %n

	# Any application log which uses Log4J will be logged to the Cactus
log file
	log4j.rootCategory=DEBUG, cactus

	# By default we don't log at the DEBUG level for Cactus log, in
order not to generate too
	# many logs. However, should a problem arise and logs need to be
sent to the Cactus dev team,
	# then we will ask you to change this to DEBUG.
	#log4j.category.org.apache.cactus = WARN, cactus

I have same log4j.properties in my server classpath except one line:
      log4j.appender.cactus.File = cactus_server.log

I added both class paths to Jbuilder.  But when I run my test cases, the
server-side logging works and client-side logging does.  The following
errors occur:
  log4j:ERROR A "org.apache.log4j.FileAppender" object is not assignable to
a "org.apache.log4j.Appender" variable. log4j:
  ERROR Could not instantiate appender named "cactus". 
  log4j:WARN No appenders could be found for logger
  log4j:WARN Please initialize the log4j system properly.

It makes no difference if I un-comment this line in log4j.properties:
  #log4j.category.org.apache.cactus = WARN, cactus


Haitao Peng
Commerce One at Austin
(512) 597-6230 (o)

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>

View raw message