SeleniumHQ / selenium-google-code-issue-archive

Archive, please see main selenium repo
https://github.com/seleniumhq/selenium
345 stars 195 forks source link

Opera is not registered as driver at selenium nodes due NoClassDefFoundError #6094

Closed lukeis closed 8 years ago

lukeis commented 8 years ago

Originally reported on Google Code with ID 6094

Opera is not registered as driver at selenium nodes due NoClassDefFoundError

Here is log:
------------------------------------------------------------------------
18:12:57.608 INFO [1] org.openqa.selenium.remote.server.DefaultDriverSessions - Unable
to register driver org.openqa.selenium.iphone.IPhoneDriver with Capabilities [{platform=MAC,
browserName=iPad, version=}] at current platform VISTA
18:12:57.627 WARN [1] org.openqa.selenium.remote.server.DefaultDriverSessions - Unable
to register driver due dependency missing with className com.opera.core.systems.OperaDriver
due org/openqa/selenium/Keyboard
java.lang.NoClassDefFoundError: org/openqa/selenium/Keyboard
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:190)
    at org.openqa.selenium.remote.server.DefaultDriverSessions.registerDriver(DefaultDriverSessions.java:86)
    at org.openqa.selenium.remote.server.DefaultDriverSessions.registerDefaults(DefaultDriverSessions.java:74)
    at org.openqa.selenium.remote.server.DefaultDriverSessions.<init>(DefaultDriverSessions.java:61)
    at org.openqa.selenium.remote.server.DefaultDriverSessions.<init>(DefaultDriverSessions.java:56)
    at org.openqa.selenium.server.SeleniumServer.assembleHandlers(SeleniumServer.java:362)
    at org.openqa.selenium.server.SeleniumServer.createJettyServer(SeleniumServer.java:322)
    at org.openqa.selenium.server.SeleniumServer.<init>(SeleniumServer.java:277)
    at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:244)
    at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:93)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.Keyboard
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 11 more
18:12:57.628 INFO [1] org.openqa.selenium.remote.server.DefaultDriverSessions - Unable
to register driver org.openqa.selenium.iphone.IPhoneDriver with Capabilities [{platform=MAC,
browserName=iPhone, version=}] at current platform VISTA
------------------------------------------------------------------------

Reported by a.u.savchuk on 2013-08-13 14:16:56

lukeis commented 8 years ago

Reported by a.u.savchuk on 2013-08-13 14:18:05

lukeis commented 8 years ago

Reported by andreastt@opera.com on 2013-08-13 14:22:08

lukeis commented 8 years ago
Fixed by https://code.google.com/p/selenium/source/detail?r=85152130998a7956a3bc1e0117d20b9c603067d2

Reported by andreastt@opera.com on 2013-08-13 15:19:57

lukeis commented 8 years ago
Any idea, when this fix will be available in the official selenium jars?

Reported by JCrown.new2sky on 2013-08-17 10:42:43

lukeis commented 8 years ago
It will be available in 2.35.0.

Reported by andreas.tolf.tolfsen on 2013-08-19 06:48:26

lukeis commented 8 years ago
I upgraded to Selenium version to 2.35.0, and I am getting this exception :

Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/Keyboard
    at www.learn.selenium.opera.main(opera.java:20)
Caused by: java.lang.ClassNotFoundException: org.openqa.selenium.Keyboard
    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)
    ... 1 more

When i downgraded to 2.33.0, it worked fine.

Reported by JCrown.new2sky on 2013-08-19 17:20:53

lukeis commented 8 years ago
@JCrown.new2sky: how do you use Selenium? if you use it via maven please update operadriver
version too.

Reported by barancev on 2013-08-19 19:20:09

lukeis commented 8 years ago
We still need to push a new operadriver version against 2.35.0 for the driver dependency
to work as expected.  In the meantime you can build operadriver from HEAD to get it
working against 2.35.0.

Reported by andreastt@opera.com on 2013-08-20 09:39:56

lukeis commented 8 years ago
Ah, I did not catch operadriver is not in the maven central yet, sorry.

Reported by barancev on 2013-08-20 09:59:42

lukeis commented 8 years ago
I am not using maven. may be I should wait for the next release.

Reported by JCrown.new2sky on 2013-08-20 17:36:10

lukeis commented 8 years ago
So you can download an updated operadriver from [1]

[1] https://selenium.googlecode.com/git/third_party/java/opera-driver/operadriver-1.4-5-g0310e9d.jar

Reported by barancev on 2013-08-20 20:32:12

lukeis commented 8 years ago
Hi,

I have the same problem, also with the driver pointed out in the comment form barancev
from Aug 20th

Reported by dermicha.MDS on 2013-08-23 09:18:29

lukeis commented 8 years ago
https://selenium.googlecode.com/git/third_party/java/opera-driver/operadriver-1.5.jar

I added the above jar and it worked fine with Selenium server standalone 2.35. Thanks.

Reported by JCrown.new2sky on 2013-08-31 14:22:21

lukeis commented 8 years ago
I believe you introduced a bug when committing code.  See issue opened today:

https://code.google.com/p/selenium/issues/detail?id=7632&thanks=7632&ts=1406035456

Basically the problem still exists.  Started in 2.36 - 2.41

Reported by majones713 on 2014-07-22 13:27:27

lukeis commented 8 years ago

Reported by luke.semerau on 2015-09-17 18:17:46