Groovy Error: Unable to resolve class internal.GlobalVariable

Wade Tsai said:

5.8.3 is out, has this bug fixed?

Not yet. This issue is quite hard to be reproduced from our side even basing on some of latest provided information here, but we are trying hard to fix it in our next major release.

Thanks for your understanding.

Vinh Nguyen

In my case, the problem was generated when I created a custom keyword.

For some reason, the template used when creating a new class will add the

import internal.GlobalVariable

since i donā€™t use this into the given keyword class, I just remove it and problem solve.

So, the questions:

- is this class scoped to the custom keyword? since these are created as a new package i think the issue comes from the clas visibility.

Possible solutions:

- update the template for a new keyword, not to add it automatically - that will be fine for me since I see no reason to use globals into such class, i can pass the needed values from the testcase scope via variables delcared

- change the class visibility

I havenā€™t checked this behavior yet in 5.8.3, in 5.8.0 it is still present

hope it helped!

@Vinh Nguyen

For me, this issue was solved in 5.8.0. Or, at least the ā€œunable to resolveā€ error wouldnā€™t stop the command line execution of tests, so I didnā€™t mind.

But after updating to 5.8.4 this is happening again. I occasionaly get the error and the cmd just hangs and nothing happens.

Attached is the log.

katalon 5.8.4 log.txt

1 Like

Since using 5.8.0, I no longer have this issue. Recently updated to 5.8.6 and still no problems. Thanks!

Same issue in 5.8.6

Ilkka Kovalainen said:

Same issue in 5.8.6

Hi Ikka,
Could you please share us some related information about your machine: OS, Katalon version, run on IDE or Console mode, Katalon log files, CI services: Jenkins, Travis or Bamboo CI.
In case you were running on console mode, please take a screenshot of the running log.

Mate Mrse said:

@Vinh Nguyen

For me, this issue was solved in 5.8.0. Or, at least the ā€œunable to resolveā€ error wouldnā€™t stop the command line execution of tests, so I didnā€™t mind.

But after updating to 5.8.4 this is happening again. I occasionaly get the error and the cmd just hangs and nothing happens.

Attached is the log.

Dear Mate,

Did you have a chance to update Katalon Studio to 5.8.6? If yes, is the problem still there with 5.8.6 version?

Thanks and Best regards,

duyluong said:

Ilkka Kovalainen said:

Same issue in 5.8.6

Hi Ikka,
Could you please share us some related information about your machine: OS, Katalon version, run on IDE or Console mode, Katalon log files, CI services: Jenkins, Travis or Bamboo CI.
In case you were running on console mode, please take a screenshot of the running log.

Windows 10 64bit

Katalon Studio 5.8.6

Run on Jenkins 2.138.2

java.runtime.version 1.8.0_66-b18

After update Katalon test run ok but after that it crash all time.

Opening project file: C:\git\Katalon\Katalon.prjStarting Groovy-Eclipse compiler resolver.  Specified compiler level: unspecified161 2.4.7.xx-201611170128-e46 = ACTIVERequest sent successfully.Parsing custom keywords...Generating global variables...Project 'Katalon' opened--------------------------------------------------------------------------------Test Suites/Servers/App/Archive - Firefox - 20181108_080124..............0/3(0%)--------------------------------------------------------------------------------Request sent successfully.org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:C:\git\Katalon\Libs\TempTestSuite1541656884051.groovy: 14: unable to resolve class internal.GlobalVariable @ line 14, column 1.   import internal.GlobalVariable as GlobalVariable   ^1 error--------------------------------------------------------------------------------Test Suites/Servers/App/Archive - Firefox - 20181108_080124..............0/3(0%)--------------------------------------------------------------------------------

Dung Ngo said:

Mate Mrse said:

@Vinh Nguyen

For me, this issue was solved in 5.8.0. Or, at least the ā€œunable to resolveā€ error wouldnā€™t stop the command line execution of tests, so I didnā€™t mind.

But after updating to 5.8.4 this is happening again. I occasionaly get the error and the cmd just hangs and nothing happens.

Attached is the log.

Dear Mate,

Did you have a chance to update Katalon Studio to 5.8.6? If yes, is the problem still there with 5.8.6 version?

Thanks and Best regards,

No, I reverted back to 5.8.0. for now. When I get to it Iā€™ll repost here.

1 Like

@Dung Ngo

Running tests after updating to 5.8.6. seems to have fixed the issue! Great job!

@Dung Ngo

However, when running test suite from command line in 5.8.0., I noticed something new.

Previously, I would get the ā€œunable to resolve class internal.GlobalVariableā€ message at the start of the test suite, but the test suite would _usually _continue with execution. Sometimes (somewhere around 1 in 10) the cmd window would just hang and I would need to resend the command to the cmd.

But yesterday the error somehow managed to ā€œreachā€ the test cases, too. Meaning, I would get the message at the begining of both test suite and test case. And the test case would fail.

Without further intervention, tests would repeat (retryFailed=ā€œtrueā€) and would pass just fine the second time.

Hi all,

Below links included a fixed version to handle this specific issue:
ttps://download.katalon.com/5.8.7/Katalon_Studio_Windows_32.zip
https://download.katalon.com/5.8.7/Katalon_Studio_Windows_64.zip
https://download.katalon.com/5.8.7/Katalon_Studio.dmg
https://download.katalon.com/5.8.7/Katalon_Studio_Linux.tar.gz

Can you help to try it again from your side and see if the issue still occurs? Thanks for your help.

Regards

Vinh Nguyen said:

Hi all,

Below links included a fixed version to handle this specific issue:
ttps://download.katalon.com/5.8.7/Katalon_Studio_Windows_32.zip
https://download.katalon.com/5.8.7/Katalon_Studio_Windows_64.zip
https://download.katalon.com/5.8.7/Katalon_Studio.dmg
https://download.katalon.com/5.8.7/Katalon_Studio_Linux.tar.gz

Can you help to try it again from your side and see if the issue still occurs? Thanks for your help.

Regards

Wow, it seems to work! Thanks for everybody for fixing this situation!

1 Like

Vinh Nguyen said:

Hi all,

Below links included a fixed version to handle this specific issue:
ttps://download.katalon.com/5.8.7/Katalon_Studio_Windows_32.zip
https://download.katalon.com/5.8.7/Katalon_Studio_Windows_64.zip
https://download.katalon.com/5.8.7/Katalon_Studio.dmg
https://download.katalon.com/5.8.7/Katalon_Studio_Linux.tar.gz

Can you help to try it again from your side and see if the issue still occurs? Thanks for your help.

Regards

hi,

the link for linux is broken

Dino said:

Vinh Nguyen said:

Hi all,

Below links included a fixed version to handle this specific issue:
ttps://download.katalon.com/5.8.7/Katalon_Studio_Windows_32.zip
https://download.katalon.com/5.8.7/Katalon_Studio_Windows_64.zip
https://download.katalon.com/5.8.7/Katalon_Studio.dmg
https://download.katalon.com/5.8.7/Katalon_Studio_Linux.tar.gz

Can you help to try it again from your side and see if the issue still occurs? Thanks for your help.

Regards

hi,

the link for linux is broken

Ah sorry my bad, the correct link is:
[https://download.katalon.com/5.8.7/Katalon_Studio_Linux_64.tar.gz](https://download.katalon.com/5.8.7/Katalon_Studio_Linux_64.tar.gz)

Thanks for your reporting

hi @Vinh Nguyen

hi, itā€™s even worse for me ā€¦ :s

Capture dā€™eĢcran 2018-11-13 aĢ€ 11.44.43.png

Dino

Looks like the errors you get are generated from some custom keywords.

Do you really use the GlobalVariable class into those?

(hint: hitting Ctrl-Shift-O into a given script/class may do some amazing cleanup in unused imports ā€¦)

@Dino,

They are just warnings. Did the execution complete successfully?

Dino said:

hi @Vinh Nguyen

hi, itā€™s even worse for me ā€¦ :s

1 Like

Alex said:

They are just warnings. Did the execution complete successfully?

Dino said:

hi

hi, itā€™s even worse for me ā€¦ :s

hi

Ibus said:

Dino

Looks like the errors you get are generated from some custom keywords.

Do you really use the GlobalVariable class into those?

(hint: hitting Ctrl-Shift-O into a given script/class may do some amazing cleanup in unused imports ā€¦)

hi all,

the code is clean. I still have the message

Yes the tests pass. These are just warnings

hi @Ibus ,

thanks for your response.

New users can not answer the same topic more than 3 times.

So I have to change my answer ā€¦

I still get warnings despite removing the bin folder.

This does not block the execution of my test but i have the message ā€œUnable to resolveā€¦ā€.

Then I have new warnings:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Thank you for your help !

Dino

delete the bin folder inside the project too, there are pre-compiled classes, and try another clean run