Skip to main content

"NoClassDefFoundError" error with Cucumber in Katalon Test Execution - Local

When running Cucumber tests in Katalon Test Execution - Local, you may encounter:

java.lang.NoClassDefFoundError: com/nimbusds/oauth2/sdk/ParseException

Cause

This error occurs when using CucumberGlueGenerator.addDefaultPackages() in Test Listeners, which causes class loading conflicts in Katalon Test Engine - Local .

Remedy

Remove CucumberGlueGenerator.addDefaultPackages() from Test Listeners. Step definition packages must now be explicitly specified in @CucumberOptions.:

@CucumberOptions(
features = "Include/features",
glue = "your.stepdefinitions.package"
)

When running tests in **Katalon Test Engine - Local **, class isolation requires explicit package specifications. Automatic package discovery can lead to NoClassDefFoundError exceptions.

Was this page helpful?

Table of Contents