title: ESAPI - Getting ClassNotFoundException with ESAPI 2.2.3.1
body: <p>My Code was working with org.owasp.esapi 2.2.0.0 but after upgrading to 2.2.3.1 I am getting ClassNotFoundException.</p>
  <p>My Code is something like:</p>
  <pre><code>  Properties esapiProps = new Properties();
    try {
       esapiProps.load( SecurityUtil.class.getResourceAsStream(&quot;/ESAPI.properties&quot;) );
       
    } catch (IOException | NullPointerException e) {
       logger.log(Level.SEVERE, &quot;esapi Exception: &quot;, e);
    }
    ESAPI.override( new DefaultSecurityConfiguration(esapiProps));
    // ----- Then canonicalize an input -----
    ESAPI.encoder().canonicalize(input);
  </code></pre>
  <p>I read the <a href="https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/esapi4java-core-2.2.1.0-release-notes.txt" rel="nofollow noreferrer">release notes</a> and added some properties and esapi-java-logging</p>
  <p>my ESAPI.properties (in class path)</p>
  <pre><code>ESAPI.printProperties=true
  LogLevel=INFO
  ESAPI.Encoder=org.owasp.esapi.reference.DefaultEncoder
  Encoder.AllowMultipleEncoding=false
  Encoder.AllowMixedEncoding=false
  Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec
  
  ESAPI.Logger=org.owasp.esapi.reference.JavaLogFactory
  Logger.ApplicationName=My Test Application
  Logger.LogEncodingRequired=false
  Logger.LogApplicationName=true
  Logger.LogServerIP=true
  Logger.LogFileName=ESAPI_logging_file
  Logger.MaxLogFileSize=10000000
  Logger.UserInfo=true
  Logger.ClientInfo=true
  </code></pre>
  <p>my esapi-java-logging.properties (in class path)</p>
  <pre><code>handlers= java.util.logging.ConsoleHandler
  .level= INFO
  java.util.logging.ConsoleHandler.level = INFO
  java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
  java.util.logging.SimpleFormatter.format=[%1$tF %1$tT] [%3$-7s] %5$s %n
  </code></pre>
  <p>but I get this exception:</p>
  <pre><code>[ERROR   ] SRVE0315E: An exception occurred: java.lang.Throwable: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:5095)
      at [internal classes]
  Caused by: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
      at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:129)
      at org.owasp.esapi.ESAPI.encoder(ESAPI.java:101)
      .
      .
      .
      at sun.reflect.GeneratedMethodAccessor521.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
      ... 1 more
  Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.GeneratedMethodAccessor522.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:86)
      ... 8 more
  Caused by: org.owasp.esapi.errors.ConfigurationException: java.lang.ClassNotFoundException: org.owasp.esapi.reference.JavaLogFactory LogFactory class (org.owasp.esapi.reference.JavaLogFactory) must be in class path.
      ... 17 more
  Caused by: java.lang.ClassNotFoundException: org.owasp.esapi.reference.JavaLogFactory
      at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:569)
      at [internal classes]
      at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:264)
      at org.owasp.esapi.util.ObjFactory.loadClassByStringName(ObjFactory.java:158)
      at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:81)
      ... 15 more
  </code></pre>
  <p>If I change my ESAPI.properties and copy what is in <a href="https://raw.githubusercontent.com/ESAPI/esapi-java-legacy/develop/configuration/esapi/ESAPI.properties" rel="nofollow noreferrer">https://raw.githubusercontent.com/ESAPI/esapi-java-legacy/develop/configuration/esapi/ESAPI.properties</a>, ClassNotFoundException goes away and I get NullPointerException exception:</p>
  <pre><code>[ERROR   ] SRVE0315E: An exception occurred: java.lang.Throwable: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
      at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:5095)
      at [internal classes]
  Caused by: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
      at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:129)
      at org.owasp.esapi.ESAPI.encoder(ESAPI.java:101)
      .
      .
      .
      at sun.reflect.GeneratedMethodAccessor522.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
      ... 1 more
  Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.GeneratedMethodAccessor523.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:86)
      ... 8 more
  Caused by: java.lang.ExceptionInInitializerError
      ... 20 more
  Caused by: java.lang.NullPointerException
      ... 22 more
  </code></pre>