5 Replies Latest reply on Jul 5, 2005 2:13 PM by julesverne

    Error Message From Log4j

    engelme

      I created a Stateless DAO to access my ejb persistence class. Everything works fine except on the client side. When I run the client everything seems to work except I get the following message in between my println statements.

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

      Am I missing a .jar on my classpath for my client? Or am I just missing something? Any help would be appreciated.

      Mike

        • 1. Re: Error Message From Log4j
          elkner

          cd /opt/jboss4
          ln -sf ../../lib/log4j.jar server/all/deploy/ejb3.deployer/log4j.jar
          ln -sf ../../lib/log4j.jar server/default/deploy/ejb3.deployer/log4j.jar

          ?

          • 2. Re: Error Message From Log4j
            engelme

            Thank you for the information, but it did not help. I believe that the problem is on the client side. Maybe to do with the jboss-remoting package.

            Mike

            • 3. Re: Error Message From Log4j
              elkner

              Yes - it was a little bit late and I didn't read carefully ... :(

              Your problem is, that you probably need to configure log4j. E.g. create a file like /tmp/log4j.properties with the following content:

              log4j.rootCategory=INFO, stdout
              log4j.appender.stdout=org.apache.log4j.ConsoleAppender
              log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
              log4j.appender.stdout.layout.ConversionPattern=%r %p [ %t ] %c - %m%n


              And start your application with the option -Dlog4j.configuration=file:///tmp/log4j.properties .
              Optionally you may include the file into your jar at the top level - than log4j will find and use it automatically ... For more info, read the log4j short manual...

              Have fun,
              jel.

              • 4. Re: Error Message From Log4j
                bill.burke

                yes, you need to have a log4j.xml in your classpath. Download EJB3 Beta1 and you'll see that each tutorial example comes with a log4j.xml file.

                • 5. Re: Error Message From Log4j
                  julesverne

                  try adding jboss-common.jar