Stuck in this issue please help me out

0 votes
Got following error when try to execute first script to open web url with help of gecko driver -

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap

at org.openqa.selenium.firefox.FirefoxDriver.<clinit>(

at nw.test.main(

Caused by: java.lang.ClassNotFoundException:

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(

at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(

at java.base/java.lang.ClassLoader.loadClass(

... 2 more
Sep 2, 2019 in Selenium by paul
Use below dependency Guava

<!-- -->

2 answers to this question.

0 votes
Hey @Paul, can you please share your code snippet where you are getting the error. You might be using some wrong command or methods in your code. Please share your code.
answered Sep 3, 2019 by Abha
• 27,910 points
0 votes
NoClassDefFoundError exception : Mismatch of classpath in runtime.
answered Sep 6, 2019 by varun
• 140 points

@Varun, have you added all the necessary jar files for Selenium Webdriver? This error usually occurs when you forget to add selenium-server-standalone-version.jar 

Please check all the Selenium Webdriver and Selenium-java version jar files are added properly.

Related Questions In Selenium

0 votes
1 answer

Getting error NoClassDeffound error while exceuting selenium script(created with maven) , please help me to resolve this

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap at org.openqa.selenium.remote.service.DriverService$Builder.<init>( at ...READ MORE

answered Apr 20 in Selenium by celine
0 votes
0 answers

Could you please help me with some selenium projects along with source code?

I am learning selenium and  I have ...READ MORE

Mar 10, 2019 in Selenium by Mark
0 votes
1 answer

How do we use Gecko driver.exe with Selenium?

Recently Selenium launched v3 and if you ...READ MORE

answered Apr 7, 2018 in Selenium by nsv999
• 5,510 points
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,510 points
0 votes
2 answers

Can anyone help me that how to run Selenium WebDriver test cases in Chrome?

You first need to download chrome driver ...READ MORE

answered Aug 26, 2019 in Selenium by Abha
• 27,910 points