1

So while creating a new selenium java project and using the latest selenium version (3.141.59) form the website, i encountered the following exception:

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 org.openqa.selenium.chrome.ChromeDriverService$Builder.<init>(ChromeDriverService.java:101)
at org.openqa.selenium.chrome.ChromeDriverService.createDefaultService(ChromeDriverService.java:94)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:123)
at test.src.main(src.java:11)

Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableMap
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 5 more
aaf1097
  • 51
  • 1
  • 8

1 Answers1

3

It turn out that in the latest selenium (3.141.59) download available form the selenium website I couldn't find a standalone anymore. Instead my problem was resolved by manually adding the client-combined-3.141.59.jar and all the jar files present in the lib folder to the Build Path of the project.

aaf1097
  • 51
  • 1
  • 8