Forum Discussion
First of all I didn't post the entire exception. But I'll do that.
Regarding suggestions. Do you mean looking on the net? I'm very well aware of the meaning of the exception, and yes I did look on the net. But since my groovy plugin work well when running the test from the SoapUI GUI I assume the problem is around testrunner.sh not being able to load the plugin dependent libraries properly. Any other ideas?
/Rune
- nmrao7 years agoChampion Level 3Ok.
When you say, "when running the test from the SoapUI GUI", how are you using your custom jar file? In a script?- tempo667 years agoOccasional Contributor
So I have a test step where I call a REST-function that returns some XML. In the test step I have added a "script assertion" that looks like this:
def xml = org.apache.commons.io.IOUtils.toInputStream(messageExchange.responseContent, "utf-8")
def xmlValidator = new XMLValidator(log)
xmlValidator.validate(xml)The XMLValidator is a class I have defined in a groovy script (compiled into a jar).
This works well when I use the green triangle (submit) button in my test. But if I use the testRunner.sh script I get the following (full) exception:
Configuring log4j from [/Applications/SoapUI-5.4.0.app/Contents/java/app/bin/soapui-log4j.xml]
16:41:37,723 INFO [SoapUI] Adding [/Applications/SoapUI-5.4.0.app/Contents/java/app/bin/ext/RDFinedSoapUILib.jar] to extensions classpath
16:41:37,724 INFO [SoapUI] Adding [/Applications/SoapUI-5.4.0.app/Contents/java/app/bin/ext/saxon9pe.jar] to extensions classpath
16:41:37,724 INFO [SoapUI] Adding [/Applications/SoapUI-5.4.0.app/Contents/java/app/bin/ext/xercesImpl-xsd11-shaded-2.12-beta-r1667115.jar] to extensions classpath
16:41:37,724 INFO [SoapUI] Adding [/Applications/SoapUI-5.4.0.app/Contents/java/app/bin/ext/xml-apis-1.4.01.jar] to extensions classpath
16:41:37,955 INFO [DefaultSoapUICore] initialized soapui-settings from [/Users/runestilling/soapui-settings.xml]
16:41:38,525 INFO [PluginManager] 0 plugins loaded in 1 ms
16:41:38,526 INFO [DefaultSoapUICore] All plugins loaded
16:41:39,786 INFO [WsdlProject] Loaded project from [file:/Users/runestilling/Dropbox/Dokumenter/RDFined/Udvikling/SOAPUI/KLE-REST/KLE-REST-validering-soapui-project.xml]
16:41:39,790 INFO [SoapUITestCaseRunner] Running SoapUI tests in project [KLE-REST validator]
16:41:39,790 INFO [SoapUITestCaseRunner] Running TestCase [Handlingsfacetter]
16:41:39,794 INFO [SoapUITestCaseRunner] Running SoapUI testcase [Handlingsfacetter]
16:41:39,798 INFO [SoapUITestCaseRunner] running step [XML-validering]
16:41:39,923 DEBUG [HttpClientSupport$SoapUIHttpClient] Attempt 1 to execute request
16:41:39,923 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Sending request: GET /resources/kle/handlingsfacetter HTTP/1.1
16:41:43,290 DEBUG [SoapUIMultiThreadedHttpConnectionManager$SoapUIDefaultClientConnection] Receiving response: HTTP/1.1 200
16:41:43,294 DEBUG [HttpClientSupport$SoapUIHttpClient] Connection can be kept alive for 5000 MILLISECONDS
16:41:44,715 INFO [log] Validate begin
16:41:44,758 INFO [log] No SchemaFactory that implements the schema language specified by: http://www.w3.org/XML/XMLSchema/v1.1 could be loaded
16:41:44,759 INFO [log] [Ljava.lang.StackTraceElement;@3e2fc448
java.lang.IllegalArgumentException: No SchemaFactory that implements the schema language specified by: http://www.w3.org/XML/XMLSchema/v1.1 could be loaded
at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:215)
at javax.xml.validation.SchemaFactory$newInstance.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at XMLValidator.validate(XMLValidator.groovy:123)
at XMLValidator$validate.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
at Script1.run(Script1.groovy:4)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:90)
at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.assertScript(GroovyScriptAssertion.java:118)
at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.internalAssertResponse(GroovyScriptAssertion.java:130)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlMessageAssertion.assertResponse(WsdlMessageAssertion.java:150)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.assertResponse(RestTestRequest.java:141)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.setResponse(RestTestRequest.java:128)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:810)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:211)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:138)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:46)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:128)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.start(AbstractTestRunner.java:76)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:594)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:573)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:405)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:202)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:137)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:112)
at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:122)
16:41:44,768 INFO [SoapUITestCaseRunner] Assertion [Script Assertion] has status VALID
16:41:44,769 INFO [SoapUITestCaseRunner] Finished running SoapUI testcase [Handlingsfacetter], time taken: 4354ms, status: FINISHED
16:41:44,770 INFO [SoapUITestCaseRunner] TestCase [Handlingsfacetter] finished with status [FINISHED] in 4354ms
- nmrao7 years agoChampion Level 3Can't "Schema Validation" assertion be used simply to achieve the same?
Related Content
Recent Discussions
- 3 days ago