Error Occurred when start remoteWebDriver: ClassNotFound Exception: io. opentelemetry. sdk. autoconfigure. AutoConfiguredOpenTelemetrySdk

Hi all,

I met this issue when I trying to use remote driver to run the cases in remote, I have tried to add all opentelemetry, not working; also tried to enable the otel sdk, not working as well.

Does anyone hit the same issue?

1 Like

Problem Analysis

You’re encountering a NoClassDefFoundError: AutoConfiguredOpenTelemetrySdk when using Selenium’s RemoteWebDriver in Katalon Studio. This occurs because:

  1. Selenium 4.x includes OpenTelemetry tracing by default for remote drivers
  2. OpenTelemetry SDK classes are missing from your classpath, even though you’ve tried to disable it
  3. Setting otel.sdk.disabled=true alone isn’t sufficient because the remote driver still attempts to initialize OpenTelemetry during instantiation

Solution

Option 1: Add OpenTelemetry Dependencies (Recommended)

Add the required OpenTelemetry libraries to your project:

// Add to build.gradle or equivalent
dependencies {
    // OpenTelemetry SDK
    implementation 'io.opentelemetry:opentelemetry-sdk:1.32.0'
    implementation 'io.opentelemetry:opentelemetry-sdk-trace:1.32.0'
    implementation 'io.opentelemetry:opentelemetry-exporter-logging:1.32.0'
    implementation 'io.opentelemetry:opentelemetry-api:1.32.0'
}

Option 2: Disable OpenTelemetry at JVM Startup (More Reliable)

Instead of setting the property in code, disable it before Selenium initializes:

// Set BEFORE creating RemoteWebDriver
System.setProperty("otel.sdk.disabled", "true");
System.setProperty("otel.traces.exporter", "none");

// Now create your remote driver
RemoteWebDriver remote = new RemoteWebDriver(new java.net.URL(gridUrl), options);

Option 3: Exclude OpenTelemetry from Selenium (If Using Maven)

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>selenium-remote-driver</artifactId>
    <version>4.x.x</version>
    <exclusions>
        <exclusion>
            <groupId>io.opentelemetry</groupId>
            <artifactId>*</artifactId>
        </exclusion>
    </exclusions>
</dependency>

Key Considerations

  • Timing matters: System properties must be set before the RemoteWebDriver class is loaded
  • Dependency conflicts: If you have multiple versions of OpenTelemetry in your classpath, this can cause issues
  • Katalon Runtime Engine: If using KRE, ensure all dependencies are properly included in the runtime environment

Verification

After applying the fix, verify by checking:

  1. No NoClassDefFoundError appears in logs
  2. Remote driver connects successfully to your grid
  3. Tests execute without OpenTelemetry initialization errors

hi @lorie.g.gao

this usually happens because Selenium is trying to load OpenTelemetry but the otel classes aren’t on the classpath (or the versions don’t match)

if you’re not using tracing, try disabling it before creating the RemoteWebDriver:

System.setProperty("otel.sdk.disabled", "true");

also make sure you’re not adding your own Selenium jars
mixing Selenium versions with Katalon often causes this error
updating Katalon Studio & WebDriver to the newest version can help too

1 Like

Hi @Monty_Bagati , Have tried the first 2 options, not working, the third option I don’t think we can remove OpenTelemetry jars that Selenium brings inside Katalon Studio

Can you try this to see how it works?

import org.openqa.selenium.remote.HttpCommandExecutor

import org.openqa.selenium.remote.RemoteWebDriver

import org.openqa.selenium.chrome.ChromeOptions

ChromeOptions options = new ChromeOptions()

options.addArguments("--disable-gpu")

options.addArguments("--window-size=1920,1080")

URL gridUrl = new URL("http://localhost:4444/wd/hub")

// Use the HttpCommandExecutor explicitly

HttpCommandExecutor executor = new HttpCommandExecutor(gridUrl)

RemoteWebDriver driver = new RemoteWebDriver(executor, options)

DriverFactory.changeWebDriver(driver)

WebUI.navigateToUrl('https://www.google.com/')
1 Like

Hi @depapp , tried this before, not working. Same error exists

Recommended Solutions

Option 4: Check Your Katalon Studio Version & Update

This issue may be fixed in newer versions of Katalon Studio. Try:

  1. Update Katalon Studio to the latest version (if you’re not already on it)
  2. Check the Katalon Studio Release Notes for any OpenTelemetry-related fixes

Option 5: Use Desired Capabilities Instead of Direct RemoteWebDriver

Instead of instantiating RemoteWebDriver directly in code, use Katalon’s built-in remote execution:

// Instead of creating RemoteWebDriver directly, use Katalon's remote execution
// Configure in Project > Settings > Desired Capabilities > Remote
// Then run with: Run > Remote

This approach bypasses the direct OpenTelemetry initialization issue because Katalon handles the driver creation internally.

Option 6: Modify JVM Arguments at Katalon Startup

Add these JVM arguments when launching Katalon Studio (not in code):

# For Windows
katalon.exe -vmargs -Dotel.sdk.disabled=true -Dotel.traces.exporter=none -Dotel.metrics.exporter=none

# For Mac/Linux
./katalon -vmargs -Dotel.sdk.disabled=true -Dotel.traces.exporter=none -Dotel.metrics.exporter=none

Or edit katalon.ini (in your Katalon installation folder):

-Dotel.sdk.disabled=true
-Dotel.traces.exporter=none
-Dotel.metrics.exporter=none

Option 7: Check for Known Issues

This could be a reported bug. I recommend:

  1. Checking the Katalon Forum for similar issues
  2. Checking if there’s a GitHub issue in the Katalon Studio repository
  3. Creating a support ticket if this is blocking your work

Next Steps

Since you’ve already tried the standard solutions, I’d recommend:

  1. Try Option 5 (use Katalon’s built-in remote execution via Desired Capabilities)
  2. Try Option 6 (JVM arguments at startup)
  3. Update Katalon Studio if you’re not on the latest version

hi @lorie.g.gao

you can try this suggestion Error Occurred when start remoteWebDriver: ClassNotFound Exception: io. opentelemetry. sdk. autoconfigure. AutoConfiguredOpenTelemetrySdk - #5 by vi.kim

1 Like

It works!! Thanks so much

3 Likes