Intermittent NoClassDefFoundError error running Selenium JUnit tests
Posted
by
Matt Sheppard
on Stack Overflow
See other posts from Stack Overflow
or by Matt Sheppard
Published on 2011-01-17T00:49:18Z
Indexed on
2011/01/17
0:53 UTC
Read the original article
Hit count: 278
For some time, I've been running a substantial set of JUnit / Selenium tests against a number of platforms on a nightly basis. Intermittently (about once in every 40 runs), all the tests for a given platform fail with a NoClassDefFoundError on the common superclass of all my tests as follows.
java.lang.NoClassDefFoundError: [common super class of all my selenium tests]
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructors(Class.java:1459)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Re-invoking the tests will generally get the tests running normally, so it's clearly something dependent on some condition I am not considering.
What might be causing this error to occur seemingly randomly?
© Stack Overflow or respective owner