title: Log4j has stopped working after switch the server(Grals 2.5.1 project)
body: <p><code>Log4j</code> has stopped sending mail and printing info log while deploying the war in new servers. It was working fine before while deploying the war in old severs. I have attached the log4j configuration here with. Please suggest the possible solutions. Also I have seen some <code>javax</code> class not found error while deploying the war. Note: it is working when we run the project by grails run-app command. And also it start working in war if we remove the mail send part from configuration.</p>
  
  <p>I am using <strong>tomcat server</strong>.</p>
  
  <pre><code>log4j = {
  
      appenders {
          if (grails.util.Environment.current.equals(grails.util.Environment.DEVELOPMENT)){
  
              System.setProperty 'mail.debug', 'false'
              System.setProperty 'mail.smtp.protocol', 'smtp'
              System.setProperty 'mail.smtp.auth', 'true'
              System.setProperty 'mail.smtp.starttls.enable', 'true'
              System.setProperty 'mail.smtp.starttls.required', 'true'
              def patternLayout = new org.apache.log4j.PatternLayout()
              def mailAppender  = new org.apache.log4j.net.SMTPAppender()
  
              patternLayout.setConversionPattern("%d{HH:mm:ss} %C %m%n")
              mailAppender.setSMTPPort(587)
              mailAppender.setFrom("")
              mailAppender.setTo("")
              mailAppender.setSubject("Log4j error generated for Care Manager LOCAL")
              mailAppender.setSMTPHost("email-smtp.us-east-1.amazonaws.com")
              mailAppender.setLayout(patternLayout)
              mailAppender.setSMTPDebug(false)
              mailAppender.setSMTPUsername("")
              mailAppender.setSMTPPassword("")
              mailAppender.setThreshold(org.apache.log4j.Level.ERROR)
              appender name:'mail', mailAppender
          }
      }
  
      root {
          error 'mail','stdout'
          error 'stdout'
          debug 'stdout'
  
      }
  
      //  for spring security
      //debug   'grails.plugins.springsecurity'
      //debug   'org.codehaus.groovy.grails.plugins.springsecurity'
      //debug   'org.springframework.security'
      // debug   'org.jasig.cas.client'
  
      error  'org.codehaus.groovy.grails.web.servlet',  //  controllers
              'org.codehaus.groovy.grails.web.pages', //  GSP
              'org.codehaus.groovy.grails.web.sitemesh', //  layouts
              'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping
              'org.codehaus.groovy.grails.web.mapping', // URL mapping
              'org.codehaus.groovy.grails.commons', // core / classloading
              'org.codehaus.groovy.grails.plugins', // plugins
              'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration
              'org.springframework',
              'org.hibernate',
              'net.sf.ehcache.hibernate',
              'org.apache'
      debug 'org.jasig.cas.client.proxy',
            'org.jasig.cas.client.proxy.Cas20ProxyRetriever'            
  
  
      info  additivity: false,
              stdout:[ 'grails.app.controllers']
      debug  additivity: false,
              stdout:[ 'grails.app.controllers']
  } 
  </code></pre>