• Register
0 votes

Problem  :

I have come across a below run-time error from the JPA 2.0 program I think it is related to the Firefox Profile for some reason:

Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/Maps
    at org.openqa.selenium.firefox.FirefoxProfile.(FirefoxProfile.java:56)
    at org.openqa.selenium.firefox.FirefoxProfile.(FirefoxProfile.java:79)
    at model.DownloadCarDetail.getMercedezDetail(model.DownloadCarDetail:72)
    at model.DownloadCarDetail.getMercedezDetail.main    (model.DownloadCarDetail.getMercedezDetail.java:47)
    Caused by: java.lang.ClassNotFoundException: com.google.common.collect.Maps

I have kept my Firefox to the version 15 so that it is supported by my Selenium Webdriver but I suspect that above issue is to do with not able to read the profile directory.

7 5 2
3,870 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

A problem that you are seeing has nothing to do with the Firefox profile.

Actually, it is related to the JVM class loader that complains that it can't you’re your  com.google.common.collect.Maps class.

This actually means that you don't have a Guava (which is the dependency for Selenium) on the class path. So you need to clean and rebuild your project and check the classpath also check your various versions of all the libraries that might be there. If you are trying to use some kind of a dependency management system like (Maven, Ivy etc.) then you need to check if it is configured correctly.


A standalone package can be downloaded from the below link:


If you are not using it currently, the easiest solution is to switch to a standalone version.

9 7 4
38,600 points

Related questions

0 votes
1 answer 827 views
Problem : I am trying to invoke the testng programmatically. And not the eclipse plug-in. I have associated the "testng-6.8.21.jar" and I am running it through eclipse and I tried to run below code: import org.testng.TestNG; public ... .ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 1 more
asked Jan 31, 2020 jwilliam 3.9k points
0 votes
2 answers 2 views
Problem: exception in thread "main" java.lang.noclassdeffounderror: com/google/common/base/function
asked 6 days ago Muneeb Saadii 2.4k points
0 votes
1 answer 12 views
Your assistance would be very much appreciated. Many thanks.
asked Feb 13 TeamScript 13.5k points
0 votes
1 answer 9 views
Problem: I am getting the error as mentioned below, while running the feed utility. I am trying to load an image "logo.png". The slf4j jar file is also available in the runtime classpath. But still I am getting this error.
asked Feb 21 Ali 5.1k points
0 votes
1 answer 25 views
Problem: The following program is throwing error: public class HelloWorld { public static void main(String args[]) { System.out.println("Hello World!"); } } CLASSPATH C:\Program Files\Java\jdk1.6.0_18\bin\ Path C:\Program Files\Java\jdk1.6.0_18\bin\ JAVAHOME C:\Program Files\Java\jdk1.6.0_18\bin Can you please tell me the root cause?
asked Feb 19 Ali 5.1k points
0 votes
1 answer 11 views
0 votes
1 answer 28 views
0 votes
1 answer 28 views
Can you please tell me the root cause?
asked Dec 26, 2020 TeamScript 13.5k points
0 votes
1 answer 203 views
I wrote a java code that gives some error: Caused by: java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException at org.hibernate.boot.spi.XmlMappingBinderAccess.<init>(XmlMappingBinderAccess.java:43) at org.hibernate.boot.MetadataSources.< ... .initializeBean(AbstractAutowireCapableBeanFactory.java:1700) ... 25 common frames omitted Can anyone help me out with this?
asked Mar 12, 2020 LizzyM 6.1k points
0 votes
1 answer 12 views
Could someone help me to find the solution or reason for this?
asked Feb 11 TeamScript 13.5k points