4 Replies Latest reply on Dec 8, 2011 4:22 AM by oliverroell

    JBoss AS 6.1 and log4j

    oliverroell

      Hi,

       

      I have switched from JBoss AS 5.1 to JBoss AS 6.1.

       

      When I start in Eclipse a Java-client which invokes a JBoss-session-bean, I always get a log4j warning in the Eclipse-console:

       

      log4j:WARN No appenders could be found for logger (org.jnp.interfaces.TimedSocketFactory).

      log4j:WARN Please initialize the log4j system properly.

       

      This warning occurs only with JBoss 6.1 and not with 5.1.

       

      In JBoss 5.1 there was a jboss-log4j.xml in the directory

      jboss-5.1.0.GA\server\default\conf, but in JBoss 6.1 there is no log4j-config-file.

       

      Can I copy the jboss-log4j.xml from JBoss 5.1 into 6.1, or is there another possibility to avoid the warnings?

       

      Kind regards

      Oliver

        • 1. Re: JBoss AS 6.1 and log4j
          wdfink

          AS 6.1 logging configuration will be located in deploy/jboss-logging.xml.

          If you see logfiles in the servers log directory it works.

           

          If you have an issue that the Eclipse console shows that warning it it because of you havn't configured log4j on the client side.

          • 2. Re: JBoss AS 6.1 and log4j
            oliverroell

            There are logfiles in the server log directory.

            The server side logging configuration should be OK.

             

            But I don't understand why I need a client side log4j configuration with JBoss 6.1.

            I do not use log4j in my clients.

             

            Is the client side log4j configuration a new requirement when using JBoss 6.1 ?

            • 3. Re: JBoss AS 6.1 and log4j
              wdfink

              The client classes of JBoss might use log4j and if a log statement for a level, that is the default level in log4j classes, is active such message is displayed.

              You can ignore it, or provide a log4j configuration in your classpath to supress messages or print to console if you have problems.

              • 4. Re: JBoss AS 6.1 and log4j
                oliverroell

                I have created a log4j.properties in my client, and now it works.

                 

                Thank you very much.