Resolving Java class inheritance error in Katalon version 10.0.0.223

hi guyss, i have another issue, anyone can help ?
im using katalon version : 10.0.0.223
jre : 21
i have add this in build.gradle also

dependencies {
 implementation 'net.bytebuddy:byte-buddy:1.12.8' // or the compatible version with Katalon
}

configurations.all {
    resolutionStrategy {
        force 'net.bytebuddy:byte-buddy:1.12.8'
    }
}

but got this errror

Caused by: java.lang.IncompatibleClassChangeError: class net.bytebuddy.implementation.FieldAccessor$FieldNameExtractor$ForBeanProperty$1 cannot inherit from final class net.bytebuddy.implementation.FieldAccessor$FieldNameExtractor$ForBeanProperty

1 Like

Possibly the same as the following issue:

i did follow the solution, but still got the same issuee @kazurayam


but to be honest im quite confused about the package name. where i should change the package name ?

and for the listerner, i have added new listener file.

did i make a mistake ?

@Elly_Tran

Could you point @rosdiana.sitinjak to an appropriate instruction by Katalon?

thanks @kazurayam

hi @Elly_Tran could u pls help me ?
im stuck with this nettbuddy issue :frowning:

you have to add this import line @rosdiana.sitinjak

import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW

and for the package name, you should see on the Include/ folder

on my case, the package name is common
so your CucumberKW.GLUE = ['YourPackageName'] should be

CucumberKW.GLUE = ['common']
4 Likes

import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW
i have import this in my test casee…

and the package name on my Include/ folder also common.
so where i should put this CucumberKW.GLUE = [‘common’] @depapp ?
in Include/` folder - common package ya ?

@rosdiana.sitinjak you should import this on the Test Listener file

import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW

you should see the CucumberKW.GLUE line looks like this if it’s imported correctly

if I see your attached image, it’s seems your import it’s not correct:

========================================================================

for your next question, this line

CucumberKW.GLUE = ['common']

should be on the Test Listener file. as you can see on the first attached image

5 Likes

okay, i have follow those step…
and the nettbuddy issue already gone. thanks @depapp @kazurayam for your help.
but currently im facing new issue :frowning:
1 Scenarios (e[33m1 undefinede[0m)
3 Steps (e[33m3 undefinede[0m)

so the gherkin step in cucumber is not recognized. when am googling about this the solution is make sure cucumber plugin is installed in katalon store, but when i go to my katalon store and search cucumber plugin, its not found…
where i can install the cucumber plugin ?

Your text in the above post looks strange. It’s diffcult to read

Please clean it.

seems like you @rosdiana.sitinjak use

   Scenario: 

==============================================

try this instead:

   Scenario Outline:

and also you should add the data tables examples

   Examples:
   | username  | password |
   | johndoe   | example  |
4 Likes

it works now by following step that you shared @depapp
thank you so much guys for your help @depapp @kazurayam

1 Like

anytime.
to make it easier for others to find the solution, I think it would be great if you @rosdiana.sitinjak could mark my answer as the solution. thanks

1 Like

sure…
my issue solved by following this step:

  1. you need to use Java/JDK/JRE 21. you can change the configuration under Settings --> Java --> Installed JRE
  2. you should add the Test Listener on the project, here’s the example:
// README: the Test Listener filename should be `Listener`
// README: you should change the `YourPackageName` to your own package name

import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW

class Listener {
	/**
	 * Executes before every test case starts.
	 * @param testCaseContext related information of the executed test case.
	 */
	@BeforeTestCase
	def sampleBeforeTestCase(TestCaseContext testCaseContext) {
		CucumberKW.GLUE = ['YourPackageName']
	}
}

notes :
YourPackageName is taken from you should see on the Include/ folder

  1. should import this on the Test Listener file
    import com.kms.katalon.core.cucumber.keyword.CucumberBuiltinKeywords as CucumberKW

  2. use Scenario Outline: instead Scenario in your feature file
    thankss @depapp @kazurayam for your help :pray:

anyway, you @rosdiana.sitinjak don’t need to re-explain the solution.
what I mean is just click this button on the reply
image

so the marked reply should be marked as the solution of your issue

1 Like