title: Unable to create EvictionPolicy instance of type org.apache.commons.pool2.impl.DefaultEvictionPolicy
body: <p>I'm getting below error in one part of my application where it tries to save/create/update data in the database. The application works fine for some time lets say close to 1-2 hours after deployment but starts giving this error on update calls after some time. I'm using JPA EclipseLink implementation. </p>
  
  <p>Note: The update call is being done asynchronously using completable future. The call looks something like this :</p>
  
  <pre><code>CompletableFuture.supplyAsync(() -&gt; {
              if (someBean != null) {
                  try {
                      someReturnVal = methodCall();
                  } catch (Exception e) {
                      log.info("Log with reason: "
                              + e.getMessage());
                  }
  
              }
              return someReturnVal;
          }).thenAccept(someReturnVal -&gt; {
              try {
                  SomeBean.saveToDB(someReturnVal);
              } catch (AccessException e) {
                  log.info("log with reason: " + e.getMessage());
              }
          });
  </code></pre>
  
  <p>SaveToDB looks like:</p>
  
  <pre><code>@Transactional
      public void SaveToDB(SomeBean arg1) {
  
          try {
              em.persist(arg1);
              em.flush();
          }Catch{
  ....
  } 
  </code></pre>
  
  <p><strong>Error message in stack trace</strong>: </p>
  
  <pre><code>     java.lang.IllegalArgumentException: Unable to create EvictionPolicy instance of type org.apache.commons.pool2.impl.DefaultEvictionPolicy
          at org.apache.commons.pool2.impl.BaseGenericObjectPool.setEvictionPolicyClassName(BaseGenericObjectPool.java:607)
          at org.apache.commons.pool2.impl.GenericKeyedObjectPool.setConfig(GenericKeyedObjectPool.java:257)
          at org.apache.commons.pool2.impl.GenericKeyedObjectPool.&lt;init&gt;(GenericKeyedObjectPool.java:111)
          at com.**.cloud.runtime.kotyo.persistence.client.pool.GenericKeyedObjectPoolAdapter.&lt;init&gt;(GenericKeyedObjectPoolAdapter.java:25)
          at com.**.cloud.runtime.kotyo.persistence.client.pool.managed.PoolableManagedConnectionFactoryAdapter.makeObject(PoolableManagedConnectionFactoryAdapter.java:86)
          at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:861)
          at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:435)
          at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:363)...
  ...
  Caused by: java.lang.ClassNotFoundException: org/apache/commons/pool2/impl/DefaultEvictionPolicy
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forNameFW(Class.java:362)
      at java.lang.Class.forName(Class.java:355)
      at org.apache.commons.pool2.impl.BaseGenericObjectPool.setEvictionPolicyClassName(BaseGenericObjectPool.java:598)
      ... 77 common frames omitted
  </code></pre>
  
  <p>I'm clueless what is happening wrong here. Can someone please help me here.</p>