Forum Discussion

JoostDG's avatar
JoostDG
Frequent Contributor
6 years ago
Solved

v.2.5.0 external scripts fail "Could not find matching constructor"

Hi,

 

I have some groovy scripts that work perfectly fine in ReadyAPI v.2.4.0, but after update to 2.5.0 they fail. The scripts can be found in my library just fine, but upon execution I get:

 

 ERROR: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: scriptABC(com.eviware.soapui.impl.wsdl.panels.support.MockTestRunContext, org.apache.logging.log4j.core.Logger, com.eviware.soapui.impl.wsdl.panels.support.MockTestRunner)

 

My scriptABC.groovy :

 

import com.eviware.soapui.model.propertyexpansion.PropertyExpansionContext;
import org.apache.log4j.Logger;
import com.eviware.soapui.model.testsuite.TestRunner;

public class scriptABC
{
// Properties
def testRunner
def context
def log

// Constructor
scriptABC(PropertyExpansionContext context, Logger log, TestRunner testRunner)
{
this.context = context
this.log = log
this.testRunner = testRunner
}

// Methods
void Execute()
{...

}

  • Nevermind, found the solution.

     

    Apparently

     

    import org.apache.log4j.Logger

    no longer covers it, it should be:

    import org.apache.logging.log4j.core.Logger

     

    That makes my scripts run again in 2.5.0.

1 Reply

  • JoostDG's avatar
    JoostDG
    Frequent Contributor

    Nevermind, found the solution.

     

    Apparently

     

    import org.apache.log4j.Logger

    no longer covers it, it should be:

    import org.apache.logging.log4j.core.Logger

     

    That makes my scripts run again in 2.5.0.