commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jungtaek Lim (JIRA)" <j...@apache.org>
Subject [jira] [Created] (POOL-251) wish to Commons Pool 2 works with Android environment
Date Wed, 19 Feb 2014 01:51:27 GMT
Jungtaek Lim created POOL-251:
---------------------------------

             Summary: wish to Commons Pool 2 works with Android environment
                 Key: POOL-251
                 URL: https://issues.apache.org/jira/browse/POOL-251
             Project: Commons Pool
          Issue Type: Wish
    Affects Versions: 2.1
         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)

Mime
View raw message