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?
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?
You’re encountering a NoClassDefFoundError: AutoConfiguredOpenTelemetrySdk when using Selenium’s RemoteWebDriver in Katalon Studio. This occurs because:
otel.sdk.disabled=true alone isn’t sufficient because the remote driver still attempts to initialize OpenTelemetry during instantiationAdd 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'
}
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);
<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>
After applying the fix, verify by checking:
NoClassDefFoundError appears in logshi @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
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/')
Hi @depapp , tried this before, not working. Same error exists
This issue may be fixed in newer versions of Katalon Studio. Try:
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.
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
This could be a reported bug. I recommend:
Since you’ve already tried the standard solutions, I’d recommend:
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
It works!! Thanks so much