Skip to content

NoClassDefFoundError after bumping to selenium-java 4.0.0 in Mac OS #9784

@bonigarcia

Description

@bonigarcia

🐛 Bug Report

I have a couple of repositories using Selenium 4:

I use GitHub Actions to run the tests in these repositories, using three different virtual environments:

  • ubuntu-latest (Ubuntu 20.04).
  • windows-latest (Windows Server 2019).
  • macos-latest (macOS 10.15).

After bumping to selenium-java 4.0.0-rc-1, several tests of the Mac OS workflow are failing due to NoClassDefFoundError, such as:

java.lang.NoClassDefFoundError: Could not initialize class org.openqa.selenium.WebDriverException
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:571)

... or:

java.lang.NoClassDefFoundError: Could not initialize class org.openqa.selenium.net.HostIdentifier
	at io.github.bonigarcia.wdm.test.create.ChromeRemoteTest.setupClass(ChromeRemoteTest.java:41)

To Reproduce/Test script

I don't have a Mac OS machine to test it, but the error seems consistent in Mac OS (at least on GitHub Actions).

The test that fails are the following:

Environment

OS: macOS 10.15 (on GitHub Actions)
Browser: Chrome
Browser version: 93
Browser Driver version: chromedriver 93.0.4577.15
Language Bindings version: selenium-java 4.0.0-rc-1
Selenium Grid version (if applicable): 4.0.0-rc-1 (the dependency org.seleniumhq.selenium:selenium-grid is also used in WebDriverManager, but not in selenium-webdriver-java)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-javaJava Bindings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions