Unable to configure system property -Dwebdriver.chrome.driver (using version 2.20)

3,689 views
Skip to first unread message

poddarsumit

unread,
Mar 14, 2012, 11:02:53 PM3/14/12
to webd...@googlegroups.com
Command run:
PS C:\Selenium2> java -Dwebdriver.chrome.driver="C:\Selenium2\chromedriver.exe" -jar .\selenium-server-standalone-2.20.0.jar -role hub

Exception in thread "main" java.lang.NoClassDefFoundError: /chrome/driver=C:\Selenium2\chromedriver/exe
Caused by: java.lang.ClassNotFoundException: .chrome.driver=C:\Selenium2\chromedriver.exe
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: .chrome.driver=C:\Selenium2\chromedriver.exe.  Program will exit.

Have JAVA runtime java version "1.6.0_26" installed.

Can you let me know what I am doing wrong. 

I have downloaded the chrome driver from the selenium website but not able to install the system property

Krishnan Mahadevan

unread,
Mar 15, 2012, 7:05:03 AM3/15/12
to webd...@googlegroups.com

and see if the batch file that I talk about there helps you get past this problem.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"




--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To view this discussion on the web visit https://groups.google.com/d/msg/webdriver/-/JRXoGB0FuaAJ.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.

Mike Riley

unread,
Mar 15, 2012, 12:26:45 PM3/15/12
to webdriver
All you need is to have your PATH environment variable set to point to
the directory where chromedriver.exe lives. I don't use a -D option
to set any property and the fact that it seems to screw up the name
when it reports the error suggests that it doesn't work right the way
you are doing it, either.

Notice it says: C:\Selenium2\chromedriver/exe

Why it changes the .exe into /exe is beyond me.

Mike

Otto M On

unread,
May 9, 2012, 2:50:34 PM5/9/12
to webdriver
Chromedriver installation documentation blows.

On Mac or any other OS

/end transmission

Simon Stewart

unread,
May 10, 2012, 8:13:21 AM5/10/12
to webd...@googlegroups.com
If you feel like that, we'd really appreciate some improved docs. Is
there any information you need in order to submit these?

Simon
> --
> You received this message because you are subscribed to the Google Groups "webdriver" group.

Krishnan Mahadevan

unread,
May 10, 2012, 8:30:48 AM5/10/12
to webd...@googlegroups.com
Otto,
Before we all nod our heads to that "transmission" do you mind sharing with us, as to what didnt make sense to you with respect to the documentation for ChromeDriver ?

How about you helping us understand what all have you done so far, before you gave up on it ?

As Simon said, if you feel the documentation is not good enough or you can always contribute to enhancing and making it better, since Selenium is an open source project and the core selenium development team would be very happy to receive patches.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"


Anthony Green

unread,
Sep 23, 2015, 11:30:58 AM9/23/15
to webdriver
Was there ever a resolution to this issue?
I'm in the process of provisioning an Windows Selenium node with ansible and have now run into this problem.

Krishnan Mahadevan

unread,
Sep 23, 2015, 11:18:38 PM9/23/15
to webdriver
Anthony,

To begin with this never was a problem. It perhaps is being caused because of the improper way of passing in the JVM arguments. Can you please call out your exact problem ? If you have the chromedriver binary available in the PATH variable, that itself should suffice and you don't need to pass in its location via the JVM argument.





Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

--
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.

Anthony Green

unread,
Sep 24, 2015, 4:02:29 AM9/24/15
to webdriver


On Thursday, 24 September 2015 04:18:38 UTC+1, Krishnan wrote:
Anthony,

To begin with this never was a problem.

I disagree. It's a violation of Postal's Law and creates an affordance mismatch
 
It perhaps is being caused because of the improper way of passing in the JVM arguments. Can you please call out your exact problem ?

When  I run this command in Powershell

java -Xmx200m -Dwebdriver.chrome.driver="C:\selenium\chromedriver.exe" -Dwebdriver.ie.driver="C:\selenium\IEDriverServer.exe" -jar C:\selenium\selenium-server-standalone.jar -role node -nodeConfig C:\selenium\nodeconfig.json

I get the error

The command is what Googling tells me is A way for specifying the location of the driver binary.

Krishnan Mahadevan

unread,
Sep 24, 2015, 10:23:29 AM9/24/15
to webdriver
Anthony

Until now I had no idea as to what was a Postel's law :) So thanks for introducing me to it...

Coming back to your problem, like I said before, its not Seleniuim that is at fault here :)

Its powershell that's wrecking havoc here.


The fix is basically to wrap up your JVM arguments which specify the location of chromedriver and IEDriverServer within single quotes and that should do it.



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/

darrell

unread,
Sep 24, 2015, 10:28:07 AM9/24/15
to webdriver
Hi Anthony,

I don't have a Windows computer handy at the moment. So I cannot test this but did you try escaping the \ character?

If it is something being used on the command line by MS-DOS Prompt, e,g, C:\selenium\selenium-server-standalone.jar, then Windows is okay with the use of backslash. However, if it is being passed to the JVM the use of backslash needs to be escaped, e.g. "C:\\selenium\\chromedriver.exe" or you can use the file separator normally recognized by the JVM, e.g. "C:/selenium/chromedriver.exe"

Darrell 
Reply all
Reply to author
Forward
0 new messages