5 Replies Latest reply on Mar 5, 2003 5:09 AM by wonderboy

    Log4j Initialization

    jryburn

      I'm getting log4j errors with very simple applications...

      log4j:WARN No appenders could be found for logger (org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory).
      log4j:WARN Please initialize the log4j system properly.

      I have to imagine it's a configuration option or setup issue, but I'd appreciate any insight.

      Joe

        • 1. Re: Log4j Initialization
          hchirino

          what version of jboss are you running?

          • 2. Re: Log4j Initialization
            slyne

            I get the same message, calling a queue on Jboss 3.0 from a simple test class that gets the connection factory, through JNDI, in its main method

            • 3. Re: Log4j Initialization

              I guess you must make shure that ypu client also have a log4j configuration file in its classpath. This should be there if you really have the client/jbossmq-client.jar in your classpath.

              [pra@pra jboss-3.0.1RC1]$ unzip -l client/jbossmq-client.jar | grep prop
              219 08-02-02 11:29 log4j.properties

              //Peter

              • 4. Re: Log4j Initialization
                jryburn

                Thanks. That file is missing from the client library for the 3.0.0 release.

                Joe

                • 5. Re: Log4j Initialization
                  wonderboy

                  I think u need to configure log4j

                  e.g.:


                  package test;

                  import org.apache.log4j.Logger;
                  import org.apache.log4j.BasicConfigurator;

                  public class LoggingConsole {
                  static final Logger logger = Logger.getLogger(LoggingConsole.class);

                  static public void main(String[] args) {
                  BasicConfigurator.configure();
                  logger.debug("Hello world.");

                  // log away
                  }
                  }