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>(FirefoxDriver.java:108)

at nw.test.main(test.java:14)

Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableMap

at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)

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

at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

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


<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
<dependency>
    <groupId>com.google.guava</groupId>
    <artifactId>guava</artifactId>
    <version>27.1-jre</version>
</dependency>

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
• 28,140 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

I am not able to generate extent report with screenshot in selenium cucumber java .. Please help me out

Hello @kanikahans, You need to define Extent Report ...READ MORE

answered Aug 24, 2020 in Selenium by Niroj
• 82,840 points
8,478 views
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>(DriverService.java:259) at ...READ MORE

answered Apr 20, 2020 in Selenium by celine
6,254 views
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,500 points
799 views
0 votes
2 answers

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,500 points
13,687 views
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
• 28,140 points
1,976 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP