I got error when try to make custom keyword groovy

Hello,
I encounter this error when I try to implement my first custom keyword into my testcase.
I just followed the tutorial and I didn’t change any config for the studio.

Here is the complete error hints :

|The project was not built since its build path is incomplete. Cannot find the class file for com.google.protobuf.GeneratedMessageV3$Builder. Fix the build path then try building this project|C%%Users%AQI%Katalon Studio%TestApplication%TestApplication.prj||Unknown|Java Problem|

|The type com.google.protobuf.GeneratedMessageV3$Builder cannot be resolved. It is indirectly referenced from required .class files|zillahelp.groovy|/C%%Users%AQI%Katalon Studio%TestApplication%TestApplication.prj/Keywords/com/helper/login|line 1|Java Problem|

The image of error is attached.
Can anybody help me please?

@agvendo At the VERY TOP of your page, above the import statements, do you have the phrase: package packageName ? (make up your own “packageName”)

Sample:
package jabs

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

Actually the problem is not about the package name, because the package name is correct.
This issue is resolved now.

It is because I accidentally import com.mysql.cj.x.protobuf.MysqlxDatatypes.Scalar.String.
I import it when I tried to declare a parameter for input at function, but instead of just typing String then type the parameter name, I press ctrl+space and choose a String from the suggestion list which cause the accident import.

I realized that it was my own fault.

Thanks for the help anyway.

1 Like