I have written a code to launch my app and click on the element, the app is launching but after launching when it is trying to click, I am getting an error which I am not able to understand why.


Feb 19, 2019 2:54:42 PM io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0 INFO: Detected dialect: W3C Exception in thread "main" java.lang.NoClassDefFoundError: net/sf/cglib/proxy/MethodInterceptor at pageobjects.HomePage.(HomePage.java:12) at pages.SignUp.main(SignUp.java:22) Caused by: java.lang.ClassNotFoundException: net.sf.cglib.proxy.MethodInterceptor at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 2 more

This is the class code

package pages;

import java.net.MalformedURLException;
import java.util.concurrent.TimeUnit;

import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import page_objects.Home_page;

public class SignUp extends MobileCap 

public static void main(String[] args) throws MalformedURLException 
    // TODO Auto-generated method stub

    AndroidDriver<AndroidElement> driver = Capabilities();
    driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

    Home_page h = new Home_page(driver);

  • can you add code showing the class where you are getting this error? Feb 22, 2019 at 6:41
  • @JitendraJogeshwar i have updated the class code
    – manoj
    Feb 25, 2019 at 5:32
  • @manoj: Can you check if you have all dependent jars extracted and put in the right dependency management system. To me, looks like something is missing from the stacktrace. Feb 25, 2019 at 9:03
  • @manoj Its seems that code and stack trace is different. Can you add code for HomePage class which is shown int the stack trance? Feb 28, 2019 at 11:20

1 Answer 1


Take a look your dev environment. I suffered same issue when the maven project setting include testng library only test scope

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.