ClassNotFoundException: org.apache.commons.exec.DaemonExecutor

3,808 views
Skip to first unread message

Robert

unread,
Nov 15, 2015, 11:45:16 AM11/15/15
to webdriver
I'm receiving the following exception after attempting to upgrade from Selenium 2.44.0 to 2.48.2

Preparing to download artifact org.yaml#snakeyaml;1.8!snakeyaml.jar
Caught: java.lang.NoClassDefFoundError: org/apache/commons/exec/DaemonExecutor
java.lang.NoClassDefFoundError: org/apache/commons/exec/DaemonExecutor
at org.openqa.selenium.os.UnixProcess.<init>(UnixProcess.java:52)
at org.openqa.selenium.os.CommandLine.<init>(CommandLine.java:47)
at org.openqa.selenium.firefox.FirefoxBinary.startProfile(FirefoxBinary.java:97)
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:110)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:117)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at AngularWebDriverExample.run(AngularWebDriverExample.groovy:11)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.exec.DaemonExecutor


Any ideas as to why this dependency has become an issue within the scope of a Selenium upgrade?

Krishnan Mahadevan

unread,
Nov 17, 2015, 10:42:02 PM11/17/15
to webdriver
Robert,

I cant simulate the problem. I tried a sample project by depending on 
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.48.2</version>
</dependency>
and I can get Firefox to spawn successfully without any issues. I am guessing that there's something in your dependencies which is causing this problem. Have you tried creating a sample maven project which depends on just selenium and see if that works fine ? That will re-iterate that perhaps the problem lies in your dependencies.








Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at http://groups.google.com/group/webdriver.
For more options, visit https://groups.google.com/d/optout.

darrell

unread,
Nov 18, 2015, 11:56:01 AM11/18/15
to webdriver
This typically happens when you have merged two projects into one or taken one project and added other things (e.g. selenium project with RESTful testing project). If one project requires an older/newer version of a dependency then other projects fail to work. Bottom line, you have something in your POM file which is conflicting with the dependencies of the Selenium tools.

karun...@palmtreeinfotech.com

unread,
Jul 14, 2016, 8:13:28 AM7/14/16
to webdriver

I also faced the same error when upgraded selenium-java from 2.48 to 2.52.

The problem was solved by adding the following dependency to the pom.xml

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-exec</artifactId>
            <version>1.3</version>
        </dependency>
Reply all
Reply to author
Forward
0 new messages