Weird error when trying to run tests.

1 view
Skip to first unread message

Brandon Sara

unread,
Feb 20, 2007, 7:43:51 PM2/20/07
to selenium-users...@googlegroups.com
Hi all,

I've been looking through the threads and cannot find anything that even remotely helps me.

Whenever I run a JUnit test that extends SeleneseTestCase I get this error:

java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:425)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:445)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)


I'm using jdk 1.5.09 and have tried cleaning my project numerous times but this seems to make no difference at all.

I'm also trying to run the tests through ANT...although I get the same error even if I run it as a single test through Eclipse.

Patrick Lightbody

unread,
Feb 21, 2007, 1:11:16 AM2/21/07
to selenium-users...@googlegroups.com
I'd triple check you have the right JDK. That error certainly means you're using the wrong JRE.

Brandon Sara

unread,
Feb 21, 2007, 10:48:13 AM2/21/07
to selenium-users...@googlegroups.com
I fixed the problem...my project wanted to be using jdk 6.0...I switched it and it worked.

Thanks for the help.

Brandon Sara

unread,
Feb 21, 2007, 2:12:51 PM2/21/07
to selenium-users...@googlegroups.com
solved the problem myself

Reply all
Reply to author
Forward
0 new messages