You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by John Langan <la...@pythia.co.uk> on 2004/04/11 23:34:34 UTC

log4j problem

Hi,
I am using Axis 1.2beta and the examples in the Installation
Instructions and the User Guide work OK but I get these warnings every
time. 
log4j:WARN No appenders could be found for logger
(org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.

I didn't get them using Axis 1_1 so I looked in the bug and mailing
lists but can't see anything about it. Any help on how to fix this would
be appreciated.
John Langan. 




Re: log4j problem

Posted by John Langan <la...@pythia.co.uk>.
Thanks to Nelson and Jake for their help. At the moment I am ignoring
the messages. Removing log4j.jar from the path stopped the warning, as
expected. When I have log4j.jar and log4j.properties in the path I still
get the warning message. I expect I'll sort it out when I get more
proficient in using log4j.
Thanks again for your advice.
John Langan
 
On Mon, 2004-04-12 at 02:55, Nelson Minar wrote:
> >log4j:WARN Please initialize the log4j system properly.
> 
> You have many options:
>   Ignore the warning
>   Put the log4j.properties that comes with Axis in your CLASSPATH
>   Write your own log4j.properties
>   Tell Axis to use something other than log4j and configure that.
> 
> I do the last one with the following overly verbose command line arguments:
>   -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
>   -Djava.util.logging.config.file=/home/nelson/logging.properties
> 
> This is pretty well documented here:
>   http://ws.apache.org/axis/java/integration-guide.html



Re: log4j problem

Posted by Nelson Minar <ne...@monkey.org>.
>log4j:WARN Please initialize the log4j system properly.

One minor change in Axis 1.2beta is it no longer includes a
log4j.properties in the jar file. This is a good thing - it means that
you have an easier time configuring log4j yourself. But it also means
you have to configure it!

You have many options:
  Ignore the warning
  Put the log4j.properties that comes with Axis in your CLASSPATH
  Write your own log4j.properties
  Tell Axis to use something other than log4j and configure that.

I do the last one with the following overly verbose command line arguments:
  -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
  -Djava.util.logging.config.file=/home/nelson/logging.properties

This is pretty well documented here:
  http://ws.apache.org/axis/java/integration-guide.html

Re: log4j problem

Posted by Jacob Kjome <ho...@visi.com>.
I'd be very surprised if Axis was using Log4j directly.  It is probably 
using commons-logging.  The issue is probably not matter of Axis versions, 
but a matter of having Log4j.jar somewhere in the classpath for 
commons-logging to find.  If commons-logging finds Log4j, it will use it to 
the exclusion of JDk1.4 logging and other logging facilities.  Of course, 
if you then don't provide a log4j configuration file (properties or xml) in 
the classpath (or configure it manually), then Log4j will report that it 
has no appenders configured.  So, either remove Log4j from the classpath or 
add a Log4j configuration file to the classpath to satisfy Log4j's 
configuration requirements.

Jake


At 10:34 PM 4/11/2004 +0100, you wrote:
>Hi,
>I am using Axis 1.2beta and the examples in the Installation
>Instructions and the User Guide work OK but I get these warnings every
>time.
>log4j:WARN No appenders could be found for logger
>(org.apache.axis.i18n.ProjectResourceBundle).
>log4j:WARN Please initialize the log4j system properly.
>
>I didn't get them using Axis 1_1 so I looked in the bug and mailing
>lists but can't see anything about it. Any help on how to fix this would
>be appreciated.
>John Langan.