Uploaded image for project: 'Commons Pool'
  1. Commons Pool
  2. POOL-359

NullPointerException closing multiple GenericObjectPools

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6.0
    • Fix Version/s: 2.6.1
    • Labels:
      None

      Description

      java.lang.NullPointerException
      at org.apache.commons.pool2.impl.EvictionTimer.cancel(EvictionTimer.java:97)
      at org.apache.commons.pool2.impl.BaseGenericObjectPool.startEvictor(BaseGenericObjectPool.java:753)
      at org.apache.commons.pool2.impl.GenericObjectPool.close(GenericObjectPool.java:694)
      

      Possible when multiple pools in the same process each call #close. GenericObjectPool#close checks #isClosed before proceeding, but that call checks a non-static instance variable. It calls into EvictionTimer#cancel which sets the static variable EvictionCache.executor to null.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                mswintermeyer Michael Wintermeyer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: