# Groovy Error: Unable to resolve class internal.GlobalVariable

**URL:** <https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557>\
**Category:** Bug Report\
**Tags:** compiler, katalon-studio, bugs-report\
**Created:** [February 28, 2018, 1:42pm UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557 "2018-02-28T13:42:04Z")\
**Posts on this page:** 11\
**Page:** 11

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [February 25, 2019, 9:48pm UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/205 "2019-02-25T21:48:09Z")

</div>

> [@kazurayam](#):
>
> The root cause of our problem ( `'$WE_ACTIVE'` or `"$WE_ACTIVE"` ) resides in this code generation processing, I believe.

Yes. And hopefully @YoungNgo has already addressed this in the main branch (hopefully destined for master and therefore 5.11+)

---

<div class="post-metadata">

**Author:** ![nanthini222](https://avatars.discourse-cdn.com/v4/letter/n/e56c9b/32.png) [@nanthini222](https://forum.katalon.com/u/nanthini222)\
**Post date:** [February 26, 2019, 6:18am UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/206 "2019-02-26T06:18:38Z")

</div>

I got this error as i edited the file default.glbl directly in file system. Then i noticed its not listing the variable on typying GlobalVariable. under script.

I opened the same file in Katalon, and removed the variables and added again. It started working.

---

<div class="post-metadata">

**Author:** ![Kelly\_Ferrone1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kelly_ferrone1/32/2248_2.png) [@Kelly\_Ferrone1](https://forum.katalon.com/u/Kelly_Ferrone1)\
**Post date:** [February 26, 2019, 3:32pm UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/207 "2019-02-26T15:32:45Z")

</div>

So I don’t think the `Unable to resolve class internal.GlobalVariable` error is anything more than a non fatal warning if you see the error right before the lines below in the console output like so:

```auto
katalon | /%tmp%katalon_execute%project%your-katalon-project.prj/Include/scripts/groovy/Steps.groovy: 21 Groovy:unable to resolve class internal.GlobalVariable
katalon | Generating global variables...
katalon | Project 'your-katalon-project' opened

```

However if you get an error complaining about resolving global variables during a test case, then your project has been corrupted somehow and the global variables are not compiling correctly. Dunno what your issue is. I have had this happen and the error prints out like a normal Java stack trace during the execution of a test case.

For many people, including me, the error is probably something else and it seems like the warning about `Unable to resolve class internal.GlobalVariable` is an actual error causing us pain, probably not.

Reading through this thread you will realize a whole lot of people having issues with specifically running tests through the console and especially Docker. This thread, in my eyes, has become the default thread for, "I don’t know what happened but I saw `Unable to resolve class internal.GlobalVariable` in the terminal output.

If by chance you are git-ignoring your `Profiles/` dir and/or editing your `*.glbl` files outside of katalon, I’m pretty sure this is your actual issue. If so, [here is another topic I created to discuss profiles and console mode issues](http://forum.katalon.com/t/profiles-and-console-mode-bug/20087?u=kelly_ferrone1).

Good luck!

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [March 1, 2019, 1:18pm UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/208 "2019-03-01T13:18:48Z")

</div>

![image](https://europe1.discourse-cdn.com/katalon/original/2X/f/f503e0efbeb31a6652f737f3db78c840becd7c61.png)

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [March 2, 2019, 3:16am UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/209 "2019-03-02T03:16:48Z")

</div>

Everyone, please let us know if this issue has been fixed.

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [March 3, 2019, 4:10pm UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/210 "2019-03-03T16:10:52Z")

</div>

@devalex88 @YoungNgo

Works!

👏 🤩 🤓 🎇 🕺 👯 ♥♥♥

---

<div class="post-metadata">

**Author:** ![Russ\_Thomas](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/russ_thomas/32/11884_2.png) [@Russ\_Thomas](https://forum.katalon.com/u/Russ_Thomas)\
**Post date:** [March 4, 2019, 3:47am UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/211 "2019-03-04T03:47:41Z")

</div>

I sincerely hope we can close this dreadful thread…

---

<div class="post-metadata">

**Author:** ![Mariusz](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/mariusz/32/386_2.png) [@Mariusz](https://forum.katalon.com/u/Mariusz)\
**Post date:** [March 4, 2019, 1:44pm UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/212 "2019-03-04T13:44:48Z")

</div>

Hmm… still doesn’t work…

> P.prj/Keywords/api/Auth.groovy: 8 Groovy:unable to resolve class internal.GlobalVariable  
> P.prj/Keywords/api/Parser.groovy: 12 Groovy:unable to resolve class groovy.json.JsonSlurper  
> P.prj/Keywords/api/Project.groovy: 3 Groovy:unable to resolve class internal.GlobalVariable  
> P.prj/Keywords/api/RestMethods.groovy: 11 Groovy:unable to resolve class internal.GlobalVariable  
> P.prj/Test Listeners/DefaultTS.groovy: 6 Groovy:unable to resolve class internal.GlobalVariable  
> Parsing custom keywords…  
> P.prj/Keywords/api/Auth.groovy: 8 Groovy:unable to resolve class internal.GlobalVariable  
> P.prj/Keywords/api/Auth.groovy: 8 Groovy:unable to resolve class internal.GlobalVariable  
> P.prj/Keywords/api/Project.groovy: 3 Groovy:unable to resolve class internal.GlobalVariable  
> P.prj/Keywords/api/RestMethods.groovy: 11 Groovy:unable to resolve class internal.GlobalVariable  
> P.prj/Test Listeners/DefaultTS.groovy: 6 Groovy:unable to resolve class internal.GlobalVariable  
> P.prj/Keywords/api/Project.groovy: 3 Groovy:unable to resolve class internal.GlobalVariable  
> P.prj/Keywords/api/RestMethods.groovy: 11 Groovy:unable to resolve class internal.GlobalVariable

---

<div class="post-metadata">

**Author:** ![Kelly\_Ferrone1](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/kelly_ferrone1/32/2248_2.png) [@Kelly\_Ferrone1](https://forum.katalon.com/u/Kelly_Ferrone1)\
**Post date:** [March 4, 2019, 2:48pm UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/213 "2019-03-04T14:48:13Z")

</div>

[See my post here](http://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/207?u=kelly_ferrone1). That is not an error, it is a warning. You get that because in your keywords there are imports for the GlobalVariables class which is not parsed till after the keywords. I get the same and everything works fine, it’s just annoying to see in the console. Could be “fixed” by simply removing those imports and not using GlobalVariables in your keywords or listeners.

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [March 4, 2019, 3:01pm UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/214 "2019-03-04T15:01:47Z")

</div>

> [@Kelly\_Ferrone1](#):
>
> [See my post here](http://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/207). That is not an error, it is a warning. You get that because in your keywords there are imports for the GlobalVariables class which is not parsed till after the keywords. I get the same and everything works fine, it’s just annoying to see in the console. Could be “fixed” by simply removing those imports and not using GlobalVariables in your keywords or listeners.

Thank you. We will look for a way to eliminate these warnings.

---

<div class="post-metadata">

**Author:** ![devalex88](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/devalex88/32/336_2.png) [@devalex88](https://forum.katalon.com/u/devalex88)\
**Post date:** [April 17, 2019, 9:11am UTC](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557/215 "2019-04-17T09:11:56Z")

</div>

Closed on April 17, 2019, 9:11am UTC



[Previous page](https://forum.katalon.com/t/groovy-error-unable-to-resolve-class-internal-globalvariable/9557.md?page=10)
