{"action":"created","issue":{"url":"https://api.github.com/repos/xetorthio/jedis/issues/1208","repository_url":"https://api.github.com/repos/xetorthio/jedis","labels_url":"https://api.github.com/repos/xetorthio/jedis/issues/1208/labels{/name}","comments_url":"https://api.github.com/repos/xetorthio/jedis/issues/1208/comments","events_url":"https://api.github.com/repos/xetorthio/jedis/issues/1208/events","html_url":"https://github.com/xetorthio/jedis/issues/1208","id":131913504,"number":1208,"title":"New version of apache commons pool cause problems with class loader.","user":{"login":"GotoFinal","id":6942692,"avatar_url":"https://avatars.githubusercontent.com/u/6942692?v=3","gravatar_id":"","url":"https://api.github.com/users/GotoFinal","html_url":"https://github.com/GotoFinal","followers_url":"https://api.github.com/users/GotoFinal/followers","following_url":"https://api.github.com/users/GotoFinal/following{/other_user}","gists_url":"https://api.github.com/users/GotoFinal/gists{/gist_id}","starred_url":"https://api.github.com/users/GotoFinal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GotoFinal/subscriptions","organizations_url":"https://api.github.com/users/GotoFinal/orgs","repos_url":"https://api.github.com/users/GotoFinal/repos","events_url":"https://api.github.com/users/GotoFinal/events{/privacy}","received_events_url":"https://api.github.com/users/GotoFinal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-07T00:07:26Z","updated_at":"2016-02-07T01:58:01Z","closed_at":null,"body":"Due to this lines of code:\r\nhttps://github.com/apache/commons-pool/blob/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java#L605-L606\r\n\r\nJedis may throw \r\n`java.lang.ClassNotFoundException: org.apache.commons.pool2.impl.DefaultEvictionPolicy`\r\nerror when creating JedisPool in class with other class loader than thread, like when we have master app and addons for it (and this apache library is shaded into addon), simple work around is just override context class loader:\r\n`Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());`\r\nbut this may cause other problems depending on used software. (Other apps can change this loader etc)\r\n\r\nAny possible fixes?"},"comment":{"url":"https://api.github.com/repos/xetorthio/jedis/issues/comments/180912721","html_url":"https://github.com/xetorthio/jedis/issues/1208#issuecomment-180912721","issue_url":"https://api.github.com/repos/xetorthio/jedis/issues/1208","id":180912721,"user":{"login":"GotoFinal","id":6942692,"avatar_url":"https://avatars.githubusercontent.com/u/6942692?v=3","gravatar_id":"","url":"https://api.github.com/users/GotoFinal","html_url":"https://github.com/GotoFinal","followers_url":"https://api.github.com/users/GotoFinal/followers","following_url":"https://api.github.com/users/GotoFinal/following{/other_user}","gists_url":"https://api.github.com/users/GotoFinal/gists{/gist_id}","starred_url":"https://api.github.com/users/GotoFinal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GotoFinal/subscriptions","organizations_url":"https://api.github.com/users/GotoFinal/orgs","repos_url":"https://api.github.com/users/GotoFinal/repos","events_url":"https://api.github.com/users/GotoFinal/events{/privacy}","received_events_url":"https://api.github.com/users/GotoFinal/received_events","type":"User","site_admin":false},"created_at":"2016-02-07T01:58:01Z","updated_at":"2016-02-07T01:58:01Z","body":"@marcosnils\r\nCommit with that change: https://github.com/apache/commons-pool/commit/3a3e763c90aa6bc04a0537b4480f9e005a45ba22\r\nhttps://fisheye6.atlassian.com/changelog/commons?cs=1627022\r\n\r\nBut seems that they fixed it later again:\r\nhttps://issues.apache.org/jira/browse/POOL-292\r\nit is even visible here: (I don't know why I didn't saw this)\r\nhttps://github.com/apache/commons-pool/blob/trunk/src/main/java/org/apache/commons/pool2/impl/BaseGenericObjectPool.java#L608\r\n\r\nSo the only issue is outdated version of library."}}