Katalon v10.x.x setup for BDD implementation Getting UnsupportedClassVersionError when Katalon loads Jackson-core (class file version 65.0) on Java 17

Hi community,

I’m currently experiencing an issue when running test suites in Katalon Studio related to Jackson-core. Here are the details:

Caused by: java.lang.UnsupportedClassVersionError: 
META-INF/versions/21/com/fasterxml/jackson/core/io/doubleparser/FastDoubleSwar 
has been compiled by a more recent version of the Java Runtime (class file version 65.0), 
this version of the Java Runtime only recognizes class file versions up to 61.0

Environment:

  • Katalon Studio version: 10.x.x (latest stable release)
  • macOS: macOS 14.x (running on MacBook Pro M1)
  • Java: OpenJDK 17 (Temurin 17.0.15)
  • Node / npm: Installed properly for Appium setup
  • Appium version: 2.18.0

What I’ve Tried So Far:

  • Verified that java -version returns OpenJDK 17.
  • Confirmed that System.getProperty("java.version") within the test shows 17.0.14.
  • Ensured that Jackson dependencies are not explicitly overridden in my project.
  • Tried to downgrade Jackson to 2.14.x using a Test Listener, but this caused Katalon to fail to launch due to dependency conflicts.
  • Even when overriding Jackson manually, byte-buddy conflicts (such as IncompatibleClassChangeError) occur during runtime.
  • Tried renaming byte-buddy-1.14.3.jar to prevent it from being loaded, but Katalon still references it.

Question:

  • Is Jackson-core 2.17.x bundled by default with the latest Katalon Studio?
  • If yes, why is it being compiled with Java 21 (class file version 65) while Katalon only supports up to Java 17 (class version 61)?
  • Is there a recommended way to override or isolate Jackson-related dependencies without breaking other parts of Katalon?
  • Or, is there an official Katalon build that supports Java 21 natively and fully?

I would greatly appreciate any advice or recommended configuration that can help resolve this issue. Thanks in advance!

1 Like
Caused by: java.lang.UnsupportedClassVersionError: 
META-INF/versions/21/com/fasterxml/jackson/core/io/doubleparser/FastDoubleSwar 
has been compiled by a more recent version of the Java Runtime (class file version 65.0), 
this version of the Java Runtime only recognizes class file versions up to 61.0

Could you disclose your code (a Test Case?) which emitted this message? so that we can reproduce this message on our own machine.


By the way, I have ever wrote a lot of code that uses jackson-databind in a Katalon project, and it ran fine. I found no problem. Therefore I guess @mapudemm has something special in his case or environment that causes his problem.

Yes.

In your katalon project, you will find a file named .classpath. In this file at around line#91 you will find the following lines:

...
	<classpathentry kind="lib" path="/Applications/Katalon Studio.app/Contents/Eclipse/plugins/com.fasterxml.jackson.core.jackson-databind_2.17.2.jar"/>
	<classpathentry kind="lib" path="/Applications/Katalon Studio.app/Contents/Eclipse/plugins/com.fasterxml.jackson.core.jackson-core_2.17.2.jar"/>
	<classpathentry kind="lib" path="/Applications/Katalon Studio.app/Contents/Eclipse/plugins/com.fasterxml.jackson.core.jackson-annotations_2.17.2.jar"/>
...

This proves that Katalon Studio bundles v2.17.2 of jackson.core

No. You are guessing wrong.

The jar of the jackson.core is a Multi-release jar which support multiple major versions of Java platform releases: JDK11, 17, 21.

See jackson-core/pom.xml at 2.17 · FasterXML/jackson-core · GitHub , Line#198-209

                <relocation>
                  <pattern>META-INF/versions/11/ch/randelshofer/fastdoubleparser</pattern>
                  <shadedPattern>META-INF/versions/11/com/fasterxml/jackson/core/io/doubleparser</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>META-INF/versions/17/ch/randelshofer/fastdoubleparser</pattern>
                  <shadedPattern>META-INF/versions/17/com/fasterxml/jackson/core/io/doubleparser</shadedPattern>
                </relocation>
                <relocation>
                  <pattern>META-INF/versions/21/ch/randelshofer/fastdoubleparser</pattern>
                  <shadedPattern>META-INF/versions/21/com/fasterxml/jackson/core/io/doubleparser</shadedPattern>
                </relocation>

Th pom.xml clearly declares it wants to generate a Multi-version jar.

This message:

Caused by: java.lang.UnsupportedClassVersionError: 
META-INF/versions/21/com/fasterxml/jackson/core/io/doubleparser/FastDoubleSwar 
has been compiled by a more recent version of the Java Runtime (class file version 65.0), 
this version of the Java Runtime only recognizes class file versions up to 61.0

implies that your code caused some confusion where Katalon Studio (with jdk17) tried mistakenly to load the META-INF/versions/21/com/fasterxml/jackson/core/io/doubleparser/FastDoubleSwar which is compiled for jdk21.

Clearly something went wrong.

But I don’t know why this happened.

I guess there must be a root cause that @mapudemm has not payed enough attention to.

More information need to be disclosed.

How your test script is written?

Any more errors in the whole execution log?

You wrote you made sure that you have OpenJDK 17 (Temurin 17.0.17) installed on your machine.

But Katalon Studio will never use that JDK, your locally-installed OpenJDK, at all.

Are you aware of it?

Don’t you know that Katalon Studio (for Windows and Mac) bundles a Java-Runtime-Environment of v17 in it?

(Katalon Studio for Linux does not bundle JRE due to licensing restriction)

I’ve only just installed Katalon Studio version 10, and I simply created a test file using the default template provided by Katalon, along with the auto-generated step definitions.

Featurefile
@tag
Feature: Title of your feature
I want to use this template for my feature file

@tag1
Scenario Outline: Title of your scenario outline
Given I want to write a step with
When I check for the in step
Then I verify the in step

Examples: 
  | name  | value | status  |
  | name1 |     5 | success |
  | name2 |     7 | Fail    |

stepDefinition
package katalonTestStep

import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint

import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase

import static com.kms.katalon.core.testdata.TestDataFactory.findTestData

import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject

import com.kms.katalon.core.annotation.Keyword

import com.kms.katalon.core.checkpoint.Checkpoint

import com.kms.katalon.core.checkpoint.CheckpointFactory

import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile

import com.kms.katalon.core.model.FailureHandling

import com.kms.katalon.core.testcase.TestCase

import com.kms.katalon.core.testcase.TestCaseFactory

import com.kms.katalon.core.testdata.TestData

import com.kms.katalon.core.testdata.TestDataFactory

import com.kms.katalon.core.testobject.ObjectRepository

import com.kms.katalon.core.testobject.TestObject

import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

import internal.GlobalVariable

import org.openqa.selenium.WebElement

import org.openqa.selenium.WebDriver

import org.openqa.selenium.By

import com.kms.katalon.core.mobile.keyword.internal.MobileDriverFactory

import com.kms.katalon.core.webui.driver.DriverFactory

import com.kms.katalon.core.testobject.RequestObject

import com.kms.katalon.core.testobject.ResponseObject

import com.kms.katalon.core.testobject.ConditionType

import com.kms.katalon.core.testobject.TestObjectProperty

import com.kms.katalon.core.mobile.helper.MobileElementCommonHelper

import com.kms.katalon.core.util.KeywordUtil

import com.kms.katalon.core.webui.exception.WebElementNotFoundException

import cucumber.api.java.en.And

import cucumber.api.java.en.Given

import cucumber.api.java.en.Then

import cucumber.api.java.en.When

class stepDef {

/**

  • The step definitions below match with Katalon sample Gherkin steps

*/

@Given(“I want to write a step with (.*)”)

def I_want_to_write_a_step_with_name(String name) {

println name

}

@When(“I check for the {int} in step”)

def I_check_for_the_value_in_step(int value) {

println value

}

@Then(“I verify the (.*) in step”)

def I_verify_the_status_in_step(String status) {

println status

}

}

Which one? Any URL of documentation?

I don’t know much about what samples Katalon provides.

@mapudemm

You are working on BDD Cucumber in Katalon Studio Enterprise (possibly in a 1 month free trial).

I am not familiar with it in Katalon Studio. I tried to create a BDD sample project in Katalon Studio Free version v10.2.0. I was rejected. the BDD feature seems to be an Enterprise feature now (once it was available in the Free vesion, though).

I don’t have an Enterprise version. I only have a Katlaon Studio Free. So I can not look into the issues about BDD. I would quit this topic, sorry.

I searched this forum and found there are several previous posts (see this) that said

BDD Cucumber + Katalon v10.x => problems

I haven’t studied these issues.

But I suppose that @mapudemm accidentally has got involved in a new bug in Katalon Studio.

@Elly_Tran