• Register
0 votes
802 views

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

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.

OR

A standalone package can be downloaded from the below link:

http://code.google.com/p/selenium/downloads/detail?name=selenium-server-standalone-2.20.0.jar

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 429 views
429 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 jwilliam 3.9k points
0 votes
1 answer 123 views
123 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 LizzyM 6.1k points
0 votes
1 answer 19 views
1 vote
1 answer 38 views
38 views
Problem: I am a begginer in java programming language and I have been coding for just some days. To practice my programming I wrote this code in java: public class Main { public static void main(String[] argv){ int 2count, h-l, a/b, } } But It shows me the error message ... , . expected Syntax error on token ",", ;expected at Main.main(Main.java:3) Whats is wrong in my code can anyone help me out?
asked Apr 6 LizzyM 6.1k points
1 vote
1 answer 16 views
16 views
Problem : I have very recently started to learn programming in Java. I am trying to execute my java code but I am facing the below error. &ldquo;Exception in thread "main" java.lang.arrayindexoutofboundsexception:&rdquo; I am unable to understand above error. Please find below my code: ... according to my debugger*/ myodd[j] = input[i]; j++; } return myodd; } Please help me in fixing above error.
asked Mar 30 morrisBson 3.2k points