Groovy Error: Unable to resolve class internal.GlobalVariable


#121

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.


#122

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!


#123

@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


#124

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


#125

Same issue in 5.8.6


#126

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.


#127

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,


#128

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%)--------------------------------------------------------------------------------

#129

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.


#130

@Dung Ngo

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


#131

@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.


#132

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


#133

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!


#134

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


#135

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


#136

hi @Vinh Nguyen

hi, it’s even worse for me … :s

Capture d’écran 2018-11-13 à 11.44.43.png


#137

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 …)


#138

@Dino,

They are just warnings. Did the execution complete successfully?

Dino said:

hi @Vinh Nguyen

hi, it’s even worse for me … :s


#139

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 !


#140

Dino

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