Test Cases/TestLogin FAILED because (of) java.lang.ClassFormatError: Illegal method name

I am currently using Katalon Studio version 5.3.0 Build 1. while using Katalon Studio, I have observed that, whenever I am adding new custom keyword and also provide @Keyword annotation, When I run the test case for first time, below Error is coming:

**Test Cases/TestLogin FAILED because (of) java.lang.ClassFormatError: Illegal method name “test_keywords.click_headers_by_name.clickAllHeaders” in class CustomKeywords
**
As a workaround, I am deleting CustomKeywords.groovy inside C:\Users\xyz\Katalon Studio\SampleDynamicProject\Libs. This is working fine after this as Katalon creates this class at run time and added Custom Keyword is added to this class at run time.Please look into this.

4 Likes

Do you have enable external lib in your Katalon project?

I am also facing this issue when I am trying to use and External Library (Java). The workaround suggested by @Ashish Garg worked for me too.

Please look into this issue.

We’re also facing this issue. Please could you suggest a solution here.

I am also getting the same error "Illegal method name in class CustomKeywords " when trying to use custom Keyword in Katalon version 5.8.3 . Please could you post a solution for this. Thank you

I am getting the same error when trying to use custom keyword in katalon version 5.8.3 ! had to delete CustomKeywords.groovy from project lib folder for it to work. Thank you @Ashish for posting the workaround . hope this bug will be fixed soon .