cancel
Showing results for 
Search instead for 
Did you mean: 

getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

SOLVED
Highlighted
Contributor

getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

Hi All. I'm working on the script library in readyAPI 2.8.0

I have a readyAPI project saved in C/soapui and I've created a folder called GroovyLibrary inside the project folder (C/soapui/GroovyLibrary). I place my below script inside the groovyLibrary folder.

package soapui .GroovyLibrary

class Callee
{
String hello()
{
return "Hello world!"
}
def static salute( who, log ) { log.info "Hello again $who!" }}

 

I followed the exact the way it mentioned in the below documentation

https://support.smartbear.com/readyapi/docs/testing/scripts/library.html#_ga=2.210636115.718279044.1...

but while executing the groovy from readyAPI; I'm getting below execption 

BUG! exception in phase 'semantic analysis' in source unit 'Script2.groovy' The lookup for Callee caused a failed compilaton. There should not have been any compilation from this call.

How can I rectify this? anyhelp would be appreciated.

 

Thanks.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Manager

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

Thanks everyone for trying to help!  

 

Hi @arunbharath , it’s also worth updating ReadyAPI to 3.0.0 and checking if the issue still persists.

If it does, I would suggest contacting the Support Team since this might require deeper investigation. Thank you.  


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

9 REPLIES 9
Highlighted
Community Manager

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

HI @arunbharath,

 

Could you please make sure that you have a closed bracket { at the end of the Callee.groovy file? I don't see it at the moment.

Community, @jsheph01,@JoostDG@AlexKaras, what can be the cause of this error from your point of view?

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Contributor

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

@TanyaGorbunova  That was a copy - paste issue while phrasing the question. But In my script, I've closed all the brackets.

Highlighted
Community Hero

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

Is it possible to show the screen shot of the script along with the stactrace of the error/exception that you get?


Regards,
Rao.
Highlighted
Contributor

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

groovyCalle.JPG

Highlighted
Community Hero

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

Thank you for that.
Stacktrace?

What is the OS, its version?
What is ReadyAPI version?
Is it possible to show system properties. In the tool, use Menu -> Help -> system properties


Regards,
Rao.
Highlighted
Contributor

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

Thanks for your reply. please find the info.

OS: Windows 10

ReadyAPI version : 2.8.0

 

PFA of System properties

Highlighted
Community Hero

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

Thanks for the details.

Looks like you are hitting some know bug (not directly realated to ReadyAPI, but coming from under line libraries, IMO)

https://www.google.com/search?client=ubuntu&channel=fs&q=BUG%21+exception+in+phase+%27semantic+analy...


Regards,
Rao.
Highlighted
Contributor

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

Is there any alternate approach? I want to automate UI using selenium for that I need some common class in a script. so I can re-use the script by calling its method with paramaters.

 

In Other words, 

    1) I need a class in groovy with couple of methods like login(string ,string), logout()

    2) In readyAPI , I have to call above login(string ,string) in anotherscript with paramaters. How can I achieve this? I'm stuked. any help is appreciated.

Highlighted
Community Manager

Re: getting BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy'

Thanks everyone for trying to help!  

 

Hi @arunbharath , it’s also worth updating ReadyAPI to 3.0.0 and checking if the issue still persists.

If it does, I would suggest contacting the Support Team since this might require deeper investigation. Thank you.  


Sonya Mihaljova
Community and Education Specialist
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Script Wanted
Let's start July with new challenges!

Create a script to change request body before sending it to the server for the TechCorner tag!


Scripts created in June:
- A script to generate a request body based on data from Datasource
- A script to go through all response nodes and check the value of the required field
- A Dispatching script to get responses based on the values in Request Body
- A script to add a new tag and assign it to all TestCases in a TestSuite
Top Kudoed Authors