Forum Discussion

kart100's avatar
11 years ago

Cannot be found script library with soapUI API

Hi all!
I use soapUI API, namely class WsdlProjectPro for automated testing web-services. And my soap-project has scripts, that are located in script library on my computer. I set location of my script library in soapUI gui-client. When I run my project on soapUI gui-client, then everything works fine. I use method setScriptLibrary for setting location of my script library in soapUI API. But doesn't help me. When I run my project with API I have log with message:
ERROR [SoapUI] An error occured [startup failed:
Script1.groovy: 2: unable to resolve class MyScript
@ line 2, column 13.
def conv = new MyScript();
^
org.codehaus.groovy.syntax.SyntaxException: unable to resolve class MyScript
Help me, please
Thanks

6 Replies

  • priyanka1107's avatar
    priyanka1107
    Occasional Contributor
    In SoapUI Pro 5.0.0, facing similar type of issue:

    It is not able to find the external Groovy scripts and throwing below error.
    same project is working fine in SOAPUI 4.5.1.

    Tue May 06 17:34:45 IST 2014:ERROR:An error occurred [BUG! exception in phase 'semantic analysis' in source unit 'Script1.groovy' The lookup for dbUtils.dbUtils caused a failed compilaton. There should not have been any compilation from this call.], see error log for details.

    -Thanks
  • Hi,

    I'm getting the same problem as priyanka1107 stated with the setScriptLibrary method. I will investigate this further and open a defect if necessary.
  • priyanka1107's avatar
    priyanka1107
    Occasional Contributor
    Thank you mrJames .
    Please resolve this issue as soon as possible.

    -Thanks,
    Priyanka Gour
  • Hi,

    Actually the problem I reproduced was what was reported by kart100. I believe the problem you are encountering could be due to the upgrade of the groovy library from what you were using in 4.5.1 compared to what is in 5.0.0. Try replacing (after backing up the original first) groovy-all-<vesion number>.jar from 5.0.0 with the groovy jar file in 4.5.1. and see if you encounter the same problem.
  • Liberty_Informa's avatar
    Liberty_Informa
    Regular Contributor
    Hello soapUI guys

    When is the permanent solution coming? We have number of developers who have installed soapUI -Pro 5.0.0. We can ask all of them to so this manual exercise of replacing jar.