axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krishnan Kannan <kan...@kannan.us>
Subject Re: Log4j (and other) errors.
Date Tue, 19 Jul 2005 20:24:16 GMT
Hello Dave,

To resolve the log4j initialization error you have to specify a 
configuration file for log4j. You can do that by passing in a Java 
property on the java command line as :

java -Dlog4j.configuration=myconfig.xml  my.package.name.myclass

The myconfig.xml is configuration file with your log4j settings. You can start with this example
below and 
then modify it based on your needs. For more info about log4j and config file check http://logging.apache.org/log4j/docs/manual.html.

---------------begin myconfig.xml-----------------------------------------

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

  <appender name="appender" class="org.apache.log4j.FileAppender">
    <param name="File" value="myapp_log4j.log"/>
    <param name="Append" value="false"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d [%t] %p - %m%n"/>
    </layout>
  </appender>

  <root>
    <priority value ="debug"/>
    <appender-ref ref="appender"/>
  </root>

</log4j:configuration>

-------------------------end-----------------------------------


Thompson, Dave M. (IPG IT CP Arch) wrote:

>Hi,
>
>Just installed axis and all sw needed to make it 'happy'.  In working
>through the User Guide, cannot get any of the userguide samples to work.
>Always get 'WARN Please initialize the log4j system properly' and then
>some other error.  Don't have a clue as to what is required; assumed
>that following the installation instructions would initialize everything
>correctly.
>
>Example 1: when trying to run sample/userguide/example1, I enter 'java
>samples.userguide.example1.TestClient' as instructed.  The response is
>the log4j warning noted above and an AxisFault with a 404 return code.
>Not sure if the warning and the 404 are related.
>
>Example 2: 'java samples.userguide.example2.CalcClient -p8080 add 2 5
>Got result : 7' results in the log4j warning and an AxisFault: no
>compiler found in your classpath! May need to add 'tools.jar'.  Checked
>classpath and tools.jar is there.
>
>Can anyone help?
>
>Dave
>
>  
>

Mime
View raw message