Error : A JNI Error has occurred in Eclipse | Selenium Forum
M
Posted on 17/03/2016
Hi
When i am trying to run my program its shows a error and not allowd to run a porogram.
Exception in thread "main" java.lang.NoClassDefFoundError: InterruptedException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: InterruptedException
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more

Please help me and how to solve this error


Thanks in advance

M
Replied on 17/03/2016

reinstall jdk


M
Replied on 17/03/2016

Hi
Thanks..Now Reinstall JDK error will not came.But now New Error will come

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
String cannot be resolved to a type
The method get(String) from the type WebDriver refers to the missing type String
The method xpath(String) from the type By refers to the missing type String
The constructor xls_reader(String) refers to the missing type String
String cannot be resolved to a type
The method getCellData(String, String, int) from the type xls_reader refers to the missing type String
String cannot be resolved to a type
String cannot be resolved to a type
String cannot be resolved to a type

at Test.ExcelTest.main(ExcelTest.java:9)

Still Error are not allowed to run.Please help me . How to solve this error and what kind of error this is...


M
Replied on 17/03/2016

you have to add selenium jars into your project.