Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0A22A1078F for ; Wed, 19 Feb 2014 02:19:36 +0000 (UTC) Received: (qmail 82168 invoked by uid 500); 19 Feb 2014 02:19:20 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 82080 invoked by uid 500); 19 Feb 2014 02:19:19 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 82069 invoked by uid 99); 19 Feb 2014 02:19:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Feb 2014 02:19:19 +0000 Date: Wed, 19 Feb 2014 02:19:19 +0000 (UTC) From: "Jungtaek Lim (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (POOL-255) Wish to Commons Pool 2 works with Android environment MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Jungtaek Lim created POOL-255: --------------------------------- Summary: Wish to Commons Pool 2 works with Android environment Key: POOL-255 URL: https://issues.apache.org/jira/browse/POOL-255 Project: Commons Pool Issue Type: Wish Affects Versions: 2.0 Environment: Android Reporter: Jungtaek Lim This issue starts at https://github.com/xetorthio/jedis/issues/538. Jedis - Java Redis Client - seems to stop working with Android at that time Jedis changes Common Pool version from 1.6 to 2.0. I found Commons Pool 2 uses jmx, which Android cannot support. I believe it makes error with class loading, so disabling jmx cannot resolve this issue. {code} public BaseGenericObjectPool(BaseObjectPoolConfig config, String jmxNameBase, String jmxNamePrefix) { if (config.getJmxEnabled()) { this.oname = jmxRegister(jmxNameBase, jmxNamePrefix); } else { this.oname = null; } ... {code} {code} private ObjectName jmxRegister(String jmxNameBase, String jmxNamePrefix) { ObjectName objectName = null; MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); int i = 1; ... {code} Please double check Commons Pool 2 is not working with Android. And if it's not working, I wish you to make Commons Pool 2 jmx usage selectable. ps. error message follows {code} W VFY: unable to find class referenced in signature (Ljavax/management/ObjectName;) I Could not find method java.lang.management.ManagementFactory.getPlatformMBeanServer, referenced from method org.apache.commons.pool2.impl.BaseGenericObjectPool.jmxRegister W VFY: unable to resolve static method 22260: Ljava/lang/management/ManagementFactory;.getPlatformMBeanServer ()Ljavax/management/MBeanServer; D VFY: replacing opcode 0x71 at 0x0001 W VFY: unable to find class referenced in signature (Ljavax/management/ObjectName;) I Could not find method java.lang.management.ManagementFactory.getPlatformMBeanServer, referenced from method org.apache.commons.pool2.impl.BaseGenericObjectPool.jmxUnregister W VFY: unable to resolve static method 22260: Ljava/lang/management/ManagementFactory;.getPlatformMBeanServer ()Ljavax/management/MBeanServer; D VFY: replacing opcode 0x71 at 0x0004 D GC_FOR_ALLOC freed 396K, 5% free 9382K/9808K, paused 29ms, total 29ms W VFY: unable to resolve exception class 3559 (Ljavax/management/MBeanRegistrationException;) W VFY: unable to find exception handler at addr 0xe W VFY: rejected Lorg/apache/commons/pool2/impl/BaseGenericObjectPool;.jmxUnregister ()V W VFY: rejecting opcode 0x0d at 0x000e W VFY: rejected Lorg/apache/commons/pool2/impl/BaseGenericObjectPool;.jmxUnregister ()V W Verifier rejected class Lorg/apache/commons/pool2/impl/BaseGenericObjectPool; D JDWP invocation returning with exceptObj=0x41f58880 (Ljava/lang/ClassNotFoundException;) {code} -- This message was sent by Atlassian JIRA (v6.1.5#6160)