Groovy Error: Unable to resolve class internal.GlobalVariable


#61

I am also on Katalon 5.6 and seeing the error a lot. Running test suites in console mode is very important. Please give top priority.


#62

Changed the topic’s name. We will keep monitoring this issue. Well looks like this issue happens on TestSuite.groovy file,

/home/adam/Desktop/project/Libs/TempTestSuite1533842502651.groovy: 14: unable to resolve class internal.GlobalVariable

not at TestCase.groovy file from the beginning, so we will keep fixing this issue from the other place
Please inform as many details as possible where you observe this issue.


#63

I looked into the TempTestSuitexxxxxxxxxxxxxx.groovy file. It seemed to me that the line 14, which imported the internal.GlobalVariable was unnecessary. Would the development team fix it by simply omitting this import in the generated groovy?


#64

We’re on 5.6.0 AND still getting this issue.
When will this be fixed? This is causing a lot of issues w/our CI integration.

TempTestSuite1534951193133.groovy: 14: unable to resolve class internal.GlobalVariable @ line 14, column 1.   import internal.GlobalVariable as GlobalVariable   ^

#65

Hi all,

This issue has been addressed again. It will be delivered in the next release 5.7 :smiley:

Regards


#66

Hi all,

Upon investigations and also hints/logs from you guys, we can somehow predict the root cause of this issue is this file in the project folder:
\bin\lib\internal\GlobalVariable.class

It should not be deleted or added as ignored file in any cases , so please check again your CI settings or your repository settings to add exclusion rule to this file as a current workaround solution.

Make sure this file exists after you’ve pull source code from your repository to ensure console mode execution is processed successfully.

Regards


#67

Katalon Team, please treat this with highest priority, because that slow downs work with my project. I have the same issue as below:

TempTestSuite1534951193133.groovy: 14: unable to resolve class internal.GlobalVariable @ line 14, column 1.   import internal.GlobalVariable as GlobalVariable   ^

#68

Yes it will be fixed in the next release 5.7. In the meanwhile please follow my workaround solution as proposed previously.


#69

For me the error still occurs when creating a build on Jenkins, even when the GlobalVariable.class file is a part of the pushed project.

------------------------------------------------------------------------------
Test Suites/XYTestSuite - Chrome - 20180827_083519...............0/2(0%)
--------------------------------------------------------------------------------

Request sent successfully.org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
C:\J\workspace\XXX-OYWXA4WVLWRXPKLCOOWXUSOAKX533FOR73WZYZWVNZNBHCVDOR7Q\XYTestProject\Libs\TempTestSuite1535351719726.groovy: 14: unable to resolve class internal.GlobalVariable
 @ line 14, column 1.
import internal.GlobalVariable as GlobalVariable
   ^

1 error

Sending report to email: [paul.schmidt@xy.de]...
System is unable to email report. Reason: java.lang.NullPointerException
    at com.kms.katalon.execution.util.MailUtil.attach(MailUtil.java:150)
    at com.kms.katalon.execution.util.MailUtil.sendSummaryMail(MailUtil.java:122)
    at com.kms.katalon.execution.launcher.ReportableLauncher.sendReportEmail(ReportableLauncher.java:158)
    at com.kms.katalon.execution.launcher.ReportableLauncher.sendReport(ReportableLauncher.java:128)
    at com.kms.katalon.execution.launcher.ReportableLauncher.preExecutionComplete(ReportableLauncher.java:81)
    at com.kms.katalon.execution.launcher.ProcessLauncher.onWatchdogComplete(ProcessLauncher.java:171)
    at com.kms.katalon.execution.launcher.LaunchWatchdog.notifyProcessTerminated(LaunchWatchdog.java:135)
    at com.kms.katalon.execution.launcher.LaunchWatchdog.run(LaunchWatchdog.java:65)
    at java.lang.Thread.run(Thread.java:745)

My .gitignore contains the following files

XYTestProject/Reports/
XYTestProject/.classpath
XYTestProject/.project
XYTestProject/Libs/Temp*.groovy
XYTestProject/bin/lib/Temp*.class
XYTestProject/libs/Temp*.groovy

Katalon version: 5.6.0

Unbenannt.png


#70

Is there any kind of clean/clear configurations on Jenkins which delete the whole project before it’s actually build?


#71

Vinh Nguyen said:

Is there any kind of clean/clear configurations on Jenkins which delete the whole project before it’s actually build?

Not as far as I can see. It is defined by a Jenkinsfile.

I’m not sure if it is associated to that but when I pull the project and import it to Katalon, Sourcetree tells me there are updates at CustomKeywords.groovy and GloabalVariable.groovy When i stage them, no change is made (so I cannot commit sth new)


#72

Vinh Nguyen said:

Yes it will be fixed in the next release 5.7. In the meanwhile please follow my workaround solution as proposed previously.

This solution?

Vinh Nguyen said:

Hi all,

Upon investigations and also hints/logs from you guys, we
can somehow predict the root cause of this issue is this file in the
project folder:
\bin\lib\internal\GlobalVariable.class

It should not be deleted or added as ignored file in any
cases , so please check again your CI settings or your repository
settings to add exclusion rule to this file as a current workaround
solution.

Make sure this file exists after you’ve pull source code from your repository to ensure console mode execution is processed successfully.

I have checked everything as you mentioned and that did not help.


#73

I have taken internal folder(and class globalVariable inside it) form my project\bin\lib folder, and copied it into katalonFolder\jre\lib. I have also done the same thing to every place where there are any libs. I have also copied globalVariables directly to katalonFolder\jre\lib in hope that it will be found. And it did. This fixed my problem TWICE now. I had this problem on one server and solved it, and after migration to another server done it again and it fixed the problem again. The only place that it is still not found is custom keywords. As a workaround I just stopped using custom keywords for now until it is fixed in 5.7

Best regards
Ismar


#74

Ismar said:

I have taken internal folder(and class globalVariable inside it) form my project\bin\lib folder, and copied it into katalonFolder\jre\lib. I have also done the same thing to every place where there are any libs. I have also copied globalVariables directly to katalonFolder\jre\lib in hope that it will be found. And it did. This fixed my problem TWICE now. I had this problem on one server and solved it, and after migration to another server done it again and it fixed the problem again. The only place that it is still not found is custom keywords. As a workaround I just stopped using custom keywords for now until it is fixed in 5.7

Best regards
Ismar

That fix works for me, thank you very much Ismar!


#75

Vinh Nguyen said:

Yes it will be fixed in the next release 5.7. In the meanwhile please follow my workaround solution as proposed previously.

What is exact workaround, please?


#76

@6952-Ismar: Cannot find the jre/lib in Katalon linux version. Would you please give me a help?
Thank you in advance?


#77

As I see it is fixed in the newest version.


#78

@5658-ken Hello ken,
I haven’t worked with linux version in a while now. But I think that I remember that linux version doesn’t come with separate jre. It is using whatever java you have installed on linux. So maybe you could search where your java is installed and search for lib folder there.

Best regards
Ismar


#79

@5658-ken I just saw that 5.7 version is out as @3222-plaidshirtakos pointed out. Please, before you try any other solution, try to update your Katalon Studio to see if that fixes the problem, since Katalon team says they fixed it in this version


#80

This issue has been fixed on Katalon Studio 5.7, please help to use Katalon Studio 5.7 and try again.

Regards