{"action":"created","issue":{"url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1541","repository_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client","labels_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1541/labels{/name}","comments_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1541/comments","events_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1541/events","html_url":"https://github.com/AsyncHttpClient/async-http-client/issues/1541","id":318720434,"number":1541,"title":"Can't run tests with Java 9 and above","user":{"login":"doom369","id":1536494,"avatar_url":"https://avatars2.githubusercontent.com/u/1536494?v=4","gravatar_id":"","url":"https://api.github.com/users/doom369","html_url":"https://github.com/doom369","followers_url":"https://api.github.com/users/doom369/followers","following_url":"https://api.github.com/users/doom369/following{/other_user}","gists_url":"https://api.github.com/users/doom369/gists{/gist_id}","starred_url":"https://api.github.com/users/doom369/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doom369/subscriptions","organizations_url":"https://api.github.com/users/doom369/orgs","repos_url":"https://api.github.com/users/doom369/repos","events_url":"https://api.github.com/users/doom369/events{/privacy}","received_events_url":"https://api.github.com/users/doom369/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-29T14:13:25Z","updated_at":"2018-04-29T17:15:05Z","closed_at":"2018-04-29T16:58:19Z","author_association":"CONTRIBUTOR","body":"Spotted issues so far:\r\n\r\n```\r\norg.testng.TestNGException: \r\nAn error occurred while instantiating class org.asynchttpclient.request.body.multipart.MultipartBodyTest: javax/activation/MimetypesFileTypeMap\r\n\tat org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:435)\r\n\tat org.testng.internal.ClassHelper.createInstance(ClassHelper.java:336)\r\n\tat org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:125)\r\n\tat org.testng.internal.ClassImpl.getInstances(ClassImpl.java:190)\r\n\tat org.testng.TestClass.getInstances(TestClass.java:95)\r\n\tat org.testng.TestClass.initTestClassesAndInstances(TestClass.java:81)\r\n\tat org.testng.TestClass.init(TestClass.java:73)\r\n\tat org.testng.TestClass.<init>(TestClass.java:38)\r\n\tat org.testng.TestRunner.initMethods(TestRunner.java:389)\r\n\tat org.testng.TestRunner.init(TestRunner.java:271)\r\n\tat org.testng.TestRunner.init(TestRunner.java:241)\r\n\tat org.testng.TestRunner.<init>(TestRunner.java:167)\r\n\tat org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:663)\r\n\tat org.testng.SuiteRunner.init(SuiteRunner.java:260)\r\n\tat org.testng.SuiteRunner.<init>(SuiteRunner.java:198)\r\n\tat org.testng.TestNG.createSuiteRunner(TestNG.java:1271)\r\n\tat org.testng.TestNG.createSuiteRunners(TestNG.java:1249)\r\n\tat org.testng.TestNG.runSuitesLocally(TestNG.java:1107)\r\n\tat org.testng.TestNG.runSuites(TestNG.java:1028)\r\n\tat org.testng.TestNG.run(TestNG.java:996)\r\n\tat org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)\r\n\tat org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)\r\nCaused by: java.lang.NoClassDefFoundError: javax/activation/MimetypesFileTypeMap\r\n\tat org.asynchttpclient.request.body.multipart.FileLikePart.<clinit>(FileLikePart.java:31)\r\n\tat org.asynchttpclient.request.body.multipart.MultipartBodyTest.<clinit>(MultipartBodyTest.java:43)\r\n\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n\tat java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)\r\n\tat org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:24)\r\n\tat org.powermock.modules.testng.PowerMockObjectFactory.newInstance(PowerMockObjectFactory.java:46)\r\n\tat org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:423)\r\n\t... 21 more\r\nCaused by: java.lang.ClassNotFoundException: javax.activation.MimetypesFileTypeMap\r\n\tat java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)\r\n\tat java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)\r\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)\r\n\t... 30 more\r\n```\r\n\r\nIn order to fix that you need to add:\r\n\r\n```\r\n      <dependency>\r\n        <groupId>com.sun.activation</groupId>\r\n        <artifactId>javax.activation</artifactId>\r\n        <version>1.2.0</version>\r\n        <scope>test</scope>\r\n      </dependency>\r\n```\r\n\r\n\r\n```\r\norg.testng.TestNGException: \r\nAn error occurred while instantiating class org.asynchttpclient.handler.resumable.ResumableAsyncHandlerTest: Cannot create a new instance of test class class org.asynchttpclient.handler.resumable.ResumableAsyncHandlerTest\r\n\tat org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:435)\r\n\tat org.testng.internal.ClassHelper.createInstance(ClassHelper.java:336)\r\n\tat org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:125)\r\n\tat org.testng.internal.ClassImpl.getInstances(ClassImpl.java:190)\r\n\tat org.testng.TestClass.getInstances(TestClass.java:95)\r\n\tat org.testng.TestClass.initTestClassesAndInstances(TestClass.java:81)\r\n\tat org.testng.TestClass.init(TestClass.java:73)\r\n\tat org.testng.TestClass.<init>(TestClass.java:38)\r\n\tat org.testng.TestRunner.initMethods(TestRunner.java:389)\r\n\tat org.testng.TestRunner.init(TestRunner.java:271)\r\n\tat org.testng.TestRunner.init(TestRunner.java:241)\r\n\tat org.testng.TestRunner.<init>(TestRunner.java:167)\r\n\tat org.testng.SuiteRunner$DefaultTestRunnerFactory.newTestRunner(SuiteRunner.java:663)\r\n\tat org.testng.SuiteRunner.init(SuiteRunner.java:260)\r\n\tat org.testng.SuiteRunner.<init>(SuiteRunner.java:198)\r\n\tat org.testng.TestNG.createSuiteRunner(TestNG.java:1271)\r\n\tat org.testng.TestNG.createSuiteRunners(TestNG.java:1249)\r\n\tat org.testng.TestNG.runSuitesLocally(TestNG.java:1107)\r\n\tat org.testng.TestNG.runSuites(TestNG.java:1028)\r\n\tat org.testng.TestNG.run(TestNG.java:996)\r\n\tat org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)\r\n\tat org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:123)\r\nCaused by: java.lang.RuntimeException: Cannot create a new instance of test class class org.asynchttpclient.handler.resumable.ResumableAsyncHandlerTest\r\n\tat org.powermock.modules.testng.internal.TestClassInstanceFactory.create(TestClassInstanceFactory.java:59)\r\n\tat org.powermock.modules.testng.internal.PowerMockClassloaderObjectFactory.newInstance(PowerMockClassloaderObjectFactory.java:46)\r\n\tat org.powermock.modules.testng.PowerMockObjectFactory.newInstance(PowerMockObjectFactory.java:43)\r\n\tat org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:423)\r\n\t... 21 more\r\nCaused by: java.lang.reflect.InvocationTargetException\r\n\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\r\n\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\r\n\tat java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\r\n\tat java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)\r\n\tat org.powermock.modules.testng.internal.TestClassInstanceFactory.create(TestClassInstanceFactory.java:51)\r\n\t... 24 more\r\nCaused by: org.objenesis.ObjenesisException: java.lang.reflect.InvocationTargetException\r\n\tat org.objenesis.instantiator.sun.SunReflectionFactoryHelper.newConstructorForSerialization(SunReflectionFactoryHelper.java:55)\r\n\tat org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.<init>(SunReflectionFactoryInstantiator.java:38)\r\n\tat org.objenesis.strategy.StdInstantiatorStrategy.newInstantiatorOf(StdInstantiatorStrategy.java:58)\r\n\tat org.objenesis.ObjenesisBase.getInstantiatorOf(ObjenesisBase.java:91)\r\n\tat org.powermock.reflect.internal.WhiteboxImpl.newInstance(WhiteboxImpl.java:250)\r\n\tat org.powermock.reflect.Whitebox.newInstance(Whitebox.java:139)\r\n\tat org.powermock.modules.testng.PowerMockTestCase.<init>(PowerMockTestCase.java:51)\r\n\tat org.asynchttpclient.handler.resumable.ResumableAsyncHandlerTest.<init>(ResumableAsyncHandlerTest.java:43)\r\n\t... 29 more\r\nCaused by: java.lang.reflect.InvocationTargetException\r\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\r\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\r\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:564)\r\n\tat org.objenesis.instantiator.sun.SunReflectionFactoryHelper.newConstructorForSerialization(SunReflectionFactoryHelper.java:45)\r\n\t... 36 more\r\nCaused by: java.lang.IllegalAccessError: class jdk.internal.reflect.ConstructorAccessorImpl loaded by org/powermock/core/classloader/MockClassLoader cannot access jdk/internal/reflect superclass jdk.internal.reflect.MagicAccessorImpl\r\n\tat java.base/java.lang.ClassLoader.defineClass1(Native Method)\r\n\tat java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)\r\n\tat org.powermock.core.classloader.MockClassLoader.loadUnmockedClass(MockClassLoader.java:250)\r\n\tat org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:194)\r\n\tat org.powermock.core.classloader.DeferSupportingClassLoader.loadClass1(DeferSupportingClassLoader.java:77)\r\n\tat org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:67)\r\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)\r\n\tat java.base/java.lang.ClassLoader.defineClass1(Native Method)\r\n\tat java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1009)\r\n\tat org.powermock.core.classloader.MockClassLoader.loadUnmockedClass(MockClassLoader.java:250)\r\n\tat org.powermock.core.classloader.MockClassLoader.loadModifiedClass(MockClassLoader.java:194)\r\n\tat org.powermock.core.classloader.DeferSupportingClassLoader.loadClass1(DeferSupportingClassLoader.java:77)\r\n\tat org.powermock.core.classloader.DeferSupportingClassLoader.loadClass(DeferSupportingClassLoader.java:67)\r\n\tat java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)\r\n\tat java.base/jdk.internal.misc.Unsafe.defineClass0(Native Method)\r\n\tat java.base/jdk.internal.misc.Unsafe.defineClass(Unsafe.java:1192)\r\n\tat java.base/jdk.internal.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)\r\n\tat java.base/jdk.internal.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:400)\r\n\tat java.base/jdk.internal.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:394)\r\n\tat java.base/java.security.AccessController.doPrivileged(Native Method)\r\n\tat java.base/jdk.internal.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:393)\r\n\tat java.base/jdk.internal.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:112)\r\n\tat java.base/jdk.internal.reflect.ReflectionFactory.generateConstructor(ReflectionFactory.java:434)\r\n\tat java.base/jdk.internal.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:404)\r\n\tat jdk.unsupported/sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:103)\r\n\t... 41 more\r\n```\r\n\r\nFix requires either update powermock dependency to the latest version (2.0.0.beta5) or test should be changed a bit in order to remove it and use only latest mockito."},"comment":{"url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/comments/385266345","html_url":"https://github.com/AsyncHttpClient/async-http-client/issues/1541#issuecomment-385266345","issue_url":"https://api.github.com/repos/AsyncHttpClient/async-http-client/issues/1541","id":385266345,"user":{"login":"doom369","id":1536494,"avatar_url":"https://avatars2.githubusercontent.com/u/1536494?v=4","gravatar_id":"","url":"https://api.github.com/users/doom369","html_url":"https://github.com/doom369","followers_url":"https://api.github.com/users/doom369/followers","following_url":"https://api.github.com/users/doom369/following{/other_user}","gists_url":"https://api.github.com/users/doom369/gists{/gist_id}","starred_url":"https://api.github.com/users/doom369/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doom369/subscriptions","organizations_url":"https://api.github.com/users/doom369/orgs","repos_url":"https://api.github.com/users/doom369/repos","events_url":"https://api.github.com/users/doom369/events{/privacy}","received_events_url":"https://api.github.com/users/doom369/received_events","type":"User","site_admin":false},"created_at":"2018-04-29T17:15:05Z","updated_at":"2018-04-29T17:15:05Z","author_association":"CONTRIBUTOR","body":"Agree. There are still a lot of people who use 1.5 :). So understandable."}}
{"actor":{"display_login":"doom369"}}