java-client: java.lang.AbstractMethodError: Receiver class io.appium.java_client.service.local.AppiumServiceBuilder does not define or inherit an implementation of the resolved method 'abstract void loadSystemProperties()' of abstract class org.openqa.selenium.remote.service.DriverService$Builder.

Description

Getting Receiver class io.appium.java_client.service.local.AppiumServiceBuilder error while initiating AppiumDriverLocalService.

Environment

  • Java client build version - v8.4.0
  • Appium server version - v2.0.0-beta.66
  • Desktop OS/version used to run Appium if necessary: Apple M1 Pro 13.3.1 (a)
  • Node.js version : Node.js v20.1.0
  • Mobile platform/version under test: Android
  • Real device or emulator/simulator: Real device

Details

Please provide more details, if necessary.

Code To Reproduce Issue [ Good To Have ]

public void startAppiumServer(int portNumber){ AppiumDriverLocalService localService; AppiumServiceBuilder builder = new AppiumServiceBuilder().usingPort(portNumber) .withArgument(GeneralServerFlag.BASEPATH, "/wd/hub/") .withArgument(GeneralServerFlag.RELAXED_SECURITY) .withArgument(GeneralServerFlag.USE_DRIVERS, "uiautomator2") .withLogFile(new File("./appium.log")); localService = AppiumDriverLocalService.buildService(builder); localService.start(); url= localService.getUrl(); localService.getUrl().toString().replace("/wd/hub/", ""); System.out.println("Appium server has been started successfully with port number "+ portNumber);

Exception Stacktraces

`java.lang.AbstractMethodError: Receiver class io.appium.java_client.service.local.AppiumServiceBuilder does not define or inherit an implementation of the resolved method ‘abstract void loadSystemProperties()’ of abstract class org.openqa.selenium.remote.service.DriverService$Builder.

at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:496)
at io.appium.java_client.service.local.AppiumDriverLocalService.buildService(AppiumDriverLocalService.java:90)
at org.phonepe.driver.AppsCapabilities.startAppiumServer(AppsCapabilities.java:67)
at org.phonepe.driver.AppsCapabilities.capabilities(AppsCapabilities.java:31)
at org.phonepe.test.PhonePeTest.setConfig(PhonePeTest.java:41)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:361)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:296)
at org.testng.TestRunner.invokeTestConfigurations(TestRunner.java:644)
at org.testng.TestRunner.beforeRun(TestRunner.java:633)
at org.testng.TestRunner.run(TestRunner.java:595)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:437)
at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:475)
at org.testng.internal.thread.ThreadUtil.lambda$execute$0(ThreadUtil.java:58)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)`

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (2 by maintainers)

Most upvoted comments

The fix “https://github.com/appium/java-client/pull/1911” is working.

Upgraded the Appium Java client to 8.5.0 Selenium Java client to 4.9.1

It is working now. Thanks @valfirst @saikrishna321

Please use the latest version 8.5.0

Jitpack builds are broken, the fix is created: #1911

issue fixed now, Thanks @valfirst @saikrishna321