title: How to filter a specific exception from Log4j?
body: <p>I'm implementing some new features of Java 8 on my desktop app and Hibernate 3.6 seems to doesn't like it.</p>
  
  <p>I added to an Interface a "default method", since then Hibernate it throwing:</p>
  
  <pre><code>2014-10-02 14:01:25,538 WARN entity.PojoEntityTuplizer  - could not create proxy factory for:modelo.ChequeTercero
  org.hibernate.HibernateException: Javassist Enhancement failed: modelo.ChequeTercero
  at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:169)
  at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:65)
  Caused by: java.lang.VerifyError: (class: modelo/ChequeTercero_$$_javassist_45, method: _d21getNumeroValor signature: ()Ljava/lang/String;) Illegal use of nonvirtual function call
  </code></pre>
  
  <p>for EACH class that implement the interface multiplied for EACH default method in the interface.</p>
  
  <p>As this log is a <code>Level.WARN</code>, it is generating biiiiiiiiiig log file on the users every time they open the application.</p>
  
  <p>I tried to make some logger filters but is not working:</p>
  
  <pre><code>&lt;filter class="org.hibernate.proxy.pojo.BasicLazyInitializer"&gt;
  &lt;param name="LevelMin" value="FATAL" /&gt;
  &lt;param name="LevelMax" value="FATAL" /&gt;
      &lt;/filter&gt;
  &lt;filter class="org.apache.log4j.filter.ExpressionFilter"&gt;
          &lt;param name="expression" value="EXCEPTION ~= org.hibernate.proxy.pojo.BasicLazyInitializer"/&gt;
          &lt;param name="acceptOnMatch" value="false"/&gt;
      &lt;/filter&gt;
      &lt;filter class="org.apache.log4j.varia.StringMatchFilter"&gt;
          &lt;param name="StringToMatch" value="org.hibernate.HibernateException: Javassist Enhancement failed"/&gt;
          &lt;param name="AcceptOnMatch" value="false" /&gt;
      &lt;/filter&gt;
      &lt;!--&lt;filter class="org.apache.log4j.varia.DenyAllFilter"/&gt; --&gt;
  </code></pre>
  
  <p>What am I doing wrong? Also if I uncomment <code>DenyAllFilter</code> no log appears anymore.</p>