title: log4j not working with Jetty after adding SSL configuration
body: <p>I'm trying to run a Jetty (v9) server using SSL (so that access is through HTTPS only). Everything ran fine using plain HTTP. Then I changed my launcher class so it looks like this:</p>
  
  <pre><code>PropertyConfigurator.configure("war/WEB-INF/log4j.properties");
  Server server = new Server();
  
  WebAppContext webapp = new WebAppContext();
  webapp.setContextPath("/");
  webapp.setWar("war");
  server.setHandler(webapp);
  
  HttpConfiguration https = new HttpConfiguration();
  https.addCustomizer(new SecureRequestCustomizer());
  
  SslContextFactory sslContextFactory = new SslContextFactory();
  sslContextFactory.setKeyStorePath("keystore.jks");
  sslContextFactory.setKeyStorePassword("&lt;password&gt;");
  sslContextFactory.setKeyManagerPassword("&lt;password&gt;");
  
  ServerConnector sslConnector = new ServerConnector(server,
          new SslConnectionFactory(sslContextFactory, "http/1.1"),
          new HttpConnectionFactory(https));
  sslConnector.setPort(443);
  server.setConnectors(new Connector[] { sslConnector });
  
  LOG.info("Starting server on port 443");
  server.start();
  server.join();
  </code></pre>
  
  <p>I also ran this to generate a keystore file:</p>
  
  <pre><code>keytool -genkey -alias sitename -keyalg RSA -keystore keystore.jks -keysize 2048
  </code></pre>
  
  <p>When I launch the server now, everything kicks off fine. My logging using log4j (v1.2.17 - and slf4j) outputs to the intended file (as instructed in my log4j.properties) with the above log message. But when I hit the web server in a browser, logging stops working with the following error output to the console:</p>
  
  <pre><code>log4j:ERROR A "org.apache.log4j.RollingFileAppender" object is not assignable to a "org.apache.log4j.Appender" variable.
  log4j:ERROR The class "org.apache.log4j.Appender" was loaded by 
  log4j:ERROR [sun.misc.Launcher$AppClassLoader@178b0f9] whereas object of type 
  log4j:ERROR "org.apache.log4j.RollingFileAppender" was loaded by [WebAppClassLoader=8317419@7ee9eb].
  log4j:ERROR Could not instantiate appender named "filer".
  log4j:WARN No appenders could be found for logger (ie.search4less.quickbooks.servlet.AppServlet).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  </code></pre>
  
  <p>...and this is repeated to the console everytime a servlet handles a new request. Each one of my servlets is initializing log4j using a static block like:</p>
  
  <pre><code>static {
      PropertyConfigurator.configure("war/WEB-INF/log4j.properties");
  }
  </code></pre>
  
  <p>My log4j.properties looks like this:</p>
  
  <pre><code>log4j.rootLogger=INFO, filer
  
  log4j.appender.filer=org.apache.log4j.RollingFileAppender
  log4j.appender.filer.layout=org.apache.log4j.PatternLayout
  log4j.appender.filer.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-4r [%t] %-5p %c %x - %m%n
  log4j.appender.filer.File=./logs/quickbooks.log
  log4j.appender.filer.MaxFileSize=1MB
  log4j.appender.filer.MaxBackupIndex=9
  log4j.appender.filer.append=true
  </code></pre>
  
  <p>As I said, everything worked fine until I added the new SSL configuration code to the server launcher class, but I don't understand what's going wrong.</p>