{"action":"closed","issue":{"url":"https://api.github.com/repos/xetorthio/jedis/issues/1503","repository_url":"https://api.github.com/repos/xetorthio/jedis","labels_url":"https://api.github.com/repos/xetorthio/jedis/issues/1503/labels{/name}","comments_url":"https://api.github.com/repos/xetorthio/jedis/issues/1503/comments","events_url":"https://api.github.com/repos/xetorthio/jedis/issues/1503/events","html_url":"https://github.com/xetorthio/jedis/issues/1503","id":222289375,"number":1503,"title":"Failed resolution of: Ljava/lang/management/ManagementFactory;","user":{"login":"huayicheng2015","id":11366196,"avatar_url":"https://avatars2.githubusercontent.com/u/11366196?v=3","gravatar_id":"","url":"https://api.github.com/users/huayicheng2015","html_url":"https://github.com/huayicheng2015","followers_url":"https://api.github.com/users/huayicheng2015/followers","following_url":"https://api.github.com/users/huayicheng2015/following{/other_user}","gists_url":"https://api.github.com/users/huayicheng2015/gists{/gist_id}","starred_url":"https://api.github.com/users/huayicheng2015/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/huayicheng2015/subscriptions","organizations_url":"https://api.github.com/users/huayicheng2015/orgs","repos_url":"https://api.github.com/users/huayicheng2015/repos","events_url":"https://api.github.com/users/huayicheng2015/events{/privacy}","received_events_url":"https://api.github.com/users/huayicheng2015/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-04-18T03:13:12Z","updated_at":"2017-04-19T20:36:36Z","closed_at":"2017-04-19T20:36:35Z","body":"Note: I can not visit the Google Groups\r\n### Expected behavior\r\n\r\nNo Exception raised.\r\n\r\n### Actual behavior\r\n\r\n```\r\n04-18 10:06:32.811 3668-3668/com.medzone.redisson E/AndroidRuntime: FATAL EXCEPTION: main\r\n                                                                    Process: com.medzone.redisson, PID: 3668\r\n                                                                    java.lang.NoClassDefFoundError: Failed resolution of: Ljava/lang/management/ManagementFactory;\r\n                                                                        at org.apache.commons.pool2.impl.BaseGenericObjectPool.jmxRegister(BaseGenericObjectPool.java:876)\r\n                                                                        at org.apache.commons.pool2.impl.BaseGenericObjectPool.<init>(BaseGenericObjectPool.java:130)\r\n                                                                        at org.apache.commons.pool2.impl.GenericObjectPool.<init>(GenericObjectPool.java:107)\r\n                                                                        at redis.clients.util.Pool.initPool(Pool.java:44)\r\n                                                                        at redis.clients.util.Pool.<init>(Pool.java:23)\r\n                                                                        at redis.clients.jedis.JedisPool.<init>(JedisPool.java:185)\r\n                                                                        at redis.clients.jedis.JedisPool.<init>(JedisPool.java:162)\r\n                                                                        at redis.clients.jedis.JedisPool.<init>(JedisPool.java:92)\r\n                                                                        at com.medzone.redisson.redis.RedisActivity$2.call(RedisActivity.java:61)\r\n                                                                        at com.medzone.redisson.redis.RedisActivity$2.call(RedisActivity.java:56)\r\n                                                                        at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39)\r\n                                                                        at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134)\r\n                                                                        at com.jakewharton.rxbinding.view.ViewClickOnSubscribe$1.onClick(ViewClickOnSubscribe.java:23)\r\n                                                                        at android.view.View.performClick(View.java:5697)\r\n                                                                        at android.widget.TextView.performClick(TextView.java:10815)\r\n                                                                        at android.view.View$PerformClick.run(View.java:22526)\r\n                                                                        at android.os.Handler.handleCallback(Handler.java:739)\r\n                                                                        at android.os.Handler.dispatchMessage(Handler.java:95)\r\n                                                                        at android.os.Looper.loop(Looper.java:158)\r\n                                                                        at android.app.ActivityThread.main(ActivityThread.java:7237)\r\n                                                                        at java.lang.reflect.Method.invoke(Native Method)\r\n                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)\r\n                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)\r\n                                                                     Caused by: java.lang.ClassNotFoundException: Didn't find class \"java.lang.management.ManagementFactory\" on path: DexPathList[[zip file \"/data/app/com.medzone.redisson-1/base.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_dependencies_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_0_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_1_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_2_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_3_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_4_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_5_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_6_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_7_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_8_apk.apk\", zip file \"/data/app/com.medzone.redisson-1/split_lib_slice_9_apk.apk\"],nativeLibraryDirectories=[/data/app/com.medzone.redisson-1/lib/arm64, /vendor/lib64, /system/lib64]]\r\n                                                                        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)\r\n                                                                        at java.lang.ClassLoader.loadClass(ClassLoader.java:511)\r\n                                                                        at java.lang.ClassLoader.loadClass(ClassLoader.java:469)\r\n                                                                        at org.apache.commons.pool2.impl.BaseGenericObjectPool.jmxRegister(BaseGenericObjectPool.java:876) \r\n                                                                        at org.apache.commons.pool2.impl.BaseGenericObjectPool.<init>(BaseGenericObjectPool.java:130) \r\n                                                                        at org.apache.commons.pool2.impl.GenericObjectPool.<init>(GenericObjectPool.java:107) \r\n                                                                        at redis.clients.util.Pool.initPool(Pool.java:44) \r\n                                                                        at redis.clients.util.Pool.<init>(Pool.java:23) \r\n                                                                        at redis.clients.jedis.JedisPool.<init>(JedisPool.java:185) \r\n                                                                        at redis.clients.jedis.JedisPool.<init>(JedisPool.java:162) \r\n                                                                        at redis.clients.jedis.JedisPool.<init>(JedisPool.java:92) \r\n                                                                        at com.medzone.redisson.redis.RedisActivity$2.call(RedisActivity.java:61) \r\n                                                                        at com.medzone.redisson.redis.RedisActivity$2.call(RedisActivity.java:56) \r\n                                                                        at rx.internal.util.ActionSubscriber.onNext(ActionSubscriber.java:39) \r\n                                                                        at rx.observers.SafeSubscriber.onNext(SafeSubscriber.java:134) \r\n                                                                        at com.jakewharton.rxbinding.view.ViewClickOnSubscribe$1.onClick(ViewClickOnSubscribe.java:23) \r\n                                                                        at android.view.View.performClick(View.java:5697) \r\n                                                                        at android.widget.TextView.performClick(TextView.java:10815) \r\n                                                                        at android.view.View$PerformClick.run(View.java:22526) \r\n                                                                        at android.os.Handler.handleCallback(Handler.java:739) \r\n                                                                        at android.os.Handler.dispatchMessage(Handler.java:95) \r\n                                                                        at android.os.Looper.loop(Looper.java:158) \r\n                                                                        at android.app.ActivityThread.main(ActivityThread.java:7237) \r\n                                                                        at java.lang.reflect.Method.invoke(Native Method) \r\n                                                                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) \r\n                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) \r\n                                                                    \tSuppressed: java.lang.ClassNotFoundException: java.lang.management.ManagementFactory\r\n                                                                        at java.lang.Class.classForName(Native Method)\r\n                                                                        at java.lang.BootClassLoader.findClass(ClassLoader.java:781)\r\n                                                                        at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)\r\n                                                                        at java.lang.ClassLoader.loadClass(ClassLoader.java:504)\r\n                                                                        \t\t... 24 more\r\n                                                                     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available\r\n```\r\n\r\n### Steps to reproduce:\r\n\r\nPlease create a reproducible case of your problem. Make sure\r\nthat case repeats consistently and it's not random\r\n1. Add jedis-2.9.0.jar into Android project app/libs directory in Android Studio, and add ```compile 'org.apache.commons:commons-pool2:2.0'``` into app/build.gradle;\r\n2. \r\n\r\n``` Java\r\nprivate JedisPool jedisPool;\r\nprivate Jedis jedis;\r\nRxView.clicks(binding.btnRedisConfigure).subscribe(new Action1<Void>() {\r\n            @Override\r\n            public void call(Void aVoid) {\r\n                jedisPool = new JedisPool(new JedisPoolConfig(),\r\n                        redisResult.getHost(), Integer.parseInt(redisResult.getPort()),\r\n                        JedisConstant.TIME_OUT, redisResult.getPassword());\r\n                jedis = jedisPool.getResource();\r\n            }\r\n        }, new Action1<Throwable>() {\r\n            @Override\r\n            public void call(Throwable throwable) {\r\n                Toast.makeText(RedisActivity.this, throwable.getMessage(), Toast.LENGTH_LONG).show();\r\n                finish();\r\n            }\r\n        });\r\n```\r\n\r\n### Redis / Jedis Configuration\r\n\r\nThe configuration like ```redisResult.getHost()```, ```redisResult.getPort()```, ```redisResult.getPassword()``` is to connect to the remote host for executing jedis/redis commands.\r\n\r\n#### Jedis version:\r\n\r\n2.9.0\r\n\r\n#### Redis version:\r\n\r\nI don't know since it is a remote linux host like \"123.2.2.3:1234\" with a connection password.\r\n\r\n#### Java version:\r\n\r\n1.7\r\n\r\n#### VM\r\n\r\nAndroid\r\n\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"marcosnils"}}