# Intermittent java error when running Circle CI with nightwatch/selenium/saucelabs

**URL:** <https://discuss.circleci.com/t/intermittent-java-error-when-running-circle-ci-with-nightwatch-selenium-saucelabs/12677>\
**Category:** Build Environment\
**Tags:** java, nodejs, selenium\
**Created:** [May 18, 2017, 8:08am UTC](https://discuss.circleci.com/t/intermittent-java-error-when-running-circle-ci-with-nightwatch-selenium-saucelabs/12677 "2017-05-18T08:08:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![naazy](https://avatars.discourse-cdn.com/v4/letter/n/779978/32.png) [@naazy](https://discuss.circleci.com/u/naazy)\
**Post date:** [May 18, 2017, 8:08am UTC](https://discuss.circleci.com/t/intermittent-java-error-when-running-circle-ci-with-nightwatch-selenium-saucelabs/12677/1 "2017-05-18T08:08:10Z")

</div>

We are intermittently getting this bug when running Circle Ci with nightwatch/selenium/saucelabs

> Exception in thread “main” java.lang.UnsupportedClassVersionError: org/openqa/grid/selenium/GridLauncherV3 : Unsupported major.minor version 52.0  
> at java.lang.ClassLoader.defineClass1(Native Method)  
> at java.lang.ClassLoader.defineClass(ClassLoader.java:803)  
> at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)  
> at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)  
> at java.net.URLClassLoader.access$100(URLClassLoader.java:71)  
> at java.net.URLClassLoader$1.run(URLClassLoader.java:361)  
> 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:425)  
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)  
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)  
> at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

[https://circleci.com/gh/OxfordAbstracts/application/6722](https://circleci.com/gh/OxfordAbstracts/application/6722)

Often the only thing that fixes it is renaming the branch and rebuilding. Any help with resolving this would be greatly appreciated. Thanks

---

<div class="post-metadata">

**Author:** ![levlaz](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/levlaz/32/36978_2.png) [@levlaz](https://discuss.circleci.com/u/levlaz)\
**Post date:** [May 22, 2017, 5:24pm UTC](https://discuss.circleci.com/t/intermittent-java-error-when-running-circle-ci-with-nightwatch-selenium-saucelabs/12677/2 "2017-05-22T17:24:14Z")

</div>

The error is

> Exception in thread “main” java.lang.UnsupportedClassVersionError: org/openqa/grid/selenium/GridLauncherV3 : Unsupported major.minor version 52.0

This is the same issue as described [here](https://discuss.circleci.com/t/has-chromedriver-been-updated-on-the-ubuntu-14-04-trusty-image/10941) and occurs pretty much every time a new version of webdriver, selenium, or a browser comes out.

You should either manually upgrade the version of these tools so that they match, or pin them so that they are not updated from underneath you.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:39am UTC](https://discuss.circleci.com/t/intermittent-java-error-when-running-circle-ci-with-nightwatch-selenium-saucelabs/12677/3 "2018-06-18T11:39:28Z")

</div>

Closed on June 18, 2018, 11:39am UTC


