Forum Discussion

MatthiasBuck's avatar
Occasional Contributor
12 years ago

[Resolved] Groovy Script - Unable to resolve class

I'm having trouble using soapUi classes in a Groovy script. It shows "unable to resolve class" when executing.

Here is the error:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script8.groovy: 1: unable to resolve class

Here is what I'm trying to do:
I’m trying to put together a groovy script to execute before tests which is supposed to clear all messages from a queue which is available in hermes.
I found a sample online ( but soapUi can’t resolve the imports in my script.

import com.eviware.soapui.impl.wsdl.submit.transport.jms.JMSConnectionBuilder
import com.eviware.soapui.impl.wsdl.submit.transports.jms.JMSEndpoint
import com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils
import hermes.Hermes
import javax.jms.*

Thanks for your help.

3 Replies

  • SmartBear_Suppo's avatar
    SmartBear Alumni (Retired)

    I got the same error when trying the script you are referring to. We will get back to you after some investigation.

    SmartBear Sweden
  • SmartBear_Suppo's avatar
    SmartBear Alumni (Retired)

    The problem is some of the classes imported in your example script does not exist, for example com.eviware.soapui.impl.wsdl.submit.transport.jms.JMSConnectionBuilder.

    I would suggest to have a look at the latest api doc to verify your imported classes

    SmartBear Sweden.
  • MatthiasBuck's avatar
    Occasional Contributor
    Thanks Shadid,

    Sorry, I just assumed that the person posting the example of how to clear a queue from groovy has ran his script at least once.
    Anyway, unfortunately the API doesn't contain enough information to work with it.
    Not that I don't know how to use java doc, it just doesn't contain enough information to work with it.

    For instance, I'm trying to use HermesUtils.getHermes(WsdlProject project, String sessionName) and it doesn't tell me what sessionName would be.
    Here is the extract from the api


    public static hermes.Hermes getHermes(WsdlProject project,
    String sessionName)
    throws NamingException
    project -
    sessionName -

    How do I find out what sessionName is?
    Once I know that, I'm sure I'll run across additional items that don't have documentation in the java docs.

    I will open another topic to discuss creating a script to clear a hermes queue since this doesn't really fit here.

    Anyway, thanks for your help so far, I really appreciate it.