4 Replies Latest reply on Apr 11, 2002 10:46 AM by Leonard Crowe

    Using log4j and SMTPAppender

    Sandro Ruch Newbie

      hi all,
      has anybody configured an SMTPAppender successfully?
      i always get an "java.lang.NoClassDefFoundError"-error when i try to start jboss...

      TIA
      sandro

        • 1. Re: Using log4j and SMTPAppender
          Ralph Lynn Newbie

          Did you ever get this working? I get the same error.

          Ralph

          • 2. Re: Using log4j and SMTPAppender
            Sandro Ruch Newbie

            hi ralph
            didn't try it again... but perhaps with the newest version of jboss the error disappear... :-)

            sandro

            • 3. Re: Using log4j and SMTPAppender
              Leonard Crowe Newbie

              I just started using the SMTPAppender under JBoss 2.4.4 and have noticed that if I deploy my application using the SMTPAppender after JBoss has started everything works fine, but if I try to start the server with the app already deployed it fails. In looking at the log I see that Log4JService is the first service started and must be occuring before the mail.jar is loaded. I'm left to wonder if this is just a configuration issue, but I have no idea what to change. I'll play with things a little and see if I can figure something out.

              • 4. Re: Using log4j and SMTPAppender
                Leonard Crowe Newbie

                I looked at the configuration and found that if I change the line in jboss.conf that starts the Log4JService from:

                <!-- The log4j based logging service based on the conf log4j.properties file -->



                to

                <!-- The log4j based logging service based on the conf log4j.properties file -->
                <MLET CODE = "org.jboss.logging.Log4jService" ARCHIVE="jboss.jar,mail.jar,activation.jar,log4j.jar" CODEBASE="../../lib/ext/">


                changes in bold type

                My application deploys fine and appears to work as expected. Hopefully I have not broken anything further down the line with this change.

                I hope this helps...

                Leonard