Forum Discussion
shiva_kakarla
18 years agoContributor
Hi Ole,
I have added the statement as you specified. Now wsdlproject object is created without any errors. I got the testsuite name too but when I call runSuite it fails. In the logs I see wsdloader loads all the wsdls and while loading shemautils I get below Linkage Error exception. Am i missing anything to set?
My groovy code is like below and I have copied all the SOAPUI jars into groovy lib folder and which is set in my CLASSPATH.
def pathToSettingsFile='C:/soapui-pro-2.0.2-bin/soapui-pro-2.0.2/bin/soapui-settings.xml'
SoapUI.setSoapUICore( new SoapUIPro.SoapUIProCore( true, pathToSettingsFile ));
SoapUIProTestCaseRunner proTestcaseRunner= new SoapUIProTestCaseRunner()
proTestcaseRunner.setProjectFile("C:/soapuiE2Eprojects/"+soapTestProj)
proTestcaseRunner.setHost('host:8080')
proTestcaseRunner.setJUnitReport(true)
proTestcaseRunner.setOutputFolder("C:/soupui_reports"+soapTestProj)
WsdlProject project = new WsdlProject("C:/soapuiE2Eprojects/"+soapTestProj);
println("wsdlprojct created")
//Get testsuite names
Map testSuiteMap = project.getTestSuites();
Iterator x = testSuiteMap.keySet().iterator();
while( x.hasNext())
{
println("in while");
String testsuiteName = (String) x.next()
println("testsuite is::"+testsuiteName)
//Create Testsuite
WsdlTestSuite wsdlTestSuite= project.getTestSuiteByName(testsuiteName);
try {
proTestcaseRunner.setTestSuite(testsuiteName)
proTestcaseRunner.runSuite(wsdlTestSuite);
}
catch(Exception ex)
{
println "in exp"+ex.getMessage()
}
}
16:05:14,057 ERROR [WsdlTestCaseRunner] Exception during TestCase Execution
java.lang.LinkageError: Class org/w3c/dom/DOMConfiguration violates loader constraints
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.privateGetPublicMethods(Class.java:2519)
at java.lang.Class.privateGetPublicMethods(Class.java:2529)
at java.lang.Class.getMethods(Class.java:1406)
at net.sf.saxon.dom.DocumentWrapper.(DocumentWrapper.java:42)
at net.sf.saxon.dom.DOMObjectModel.wrapDocument(DOMObjectModel.java:296)
at net.sf.saxon.value.Value.convertToBestFit(Value.java:964)
at net.sf.saxon.value.Value.convertJavaObjectToXPath(Value.java:762)
at net.sf.saxon.trans.Variable.setValue(Variable.java:123)
at org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectNodes(XBeansXPath.java:105)
at org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectPath(XBeansXPath.java:132)
at org.apache.xmlbeans.impl.store.Path$SaxonPathImpl$SaxonPathEngine.next(Path.java:500)
at org.apache.xmlbeans.impl.store.Cursor._toSelection(Cursor.java:931)
at org.apache.xmlbeans.impl.store.Cursor._toNextSelection(Cursor.java:920)
at org.apache.xmlbeans.impl.store.Cursor.toNextSelection(Cursor.java:2670)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer.transferStringToXml(PropertyTransfer.java:440)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer.transferProperties(PropertyTransfer.java:269)
at com.eviware.soapui.impl.wsdl.teststeps.TransferResponseValuesTestStep.run(TransferResponseValuesTestStep.java:133)
at com.eviware.soapui.impl.wsdl.teststeps.TransferResponseValuesTestStep.run(TransferResponseValuesTestStep.java:106)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.run(WsdlTestCaseRunner.java:185)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.start(WsdlTestCaseRunner.java:84)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:513)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:57)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:464)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runSuite(SoapUITestCaseRunner.java:423)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:904)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:761)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:749)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167)
at IntegrationTest.run(IntegrationTest.groovy:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:904)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:773)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:753)
at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:402)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1077)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:744)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167)
at IntegrationTest.main(IntegrationTest.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1077)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:744)
at groovy.lang.GroovyShell.runMainOrTestOrRunnable(GroovyShell.java:244)
at groovy.lang.GroovyShell.run(GroovyShell.java:218)
at groovy.lang.GroovyShell.run(GroovyShell.java:147)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:492)
at groovy.ui.GroovyMain.run(GroovyMain.java:308)
at groovy.ui.GroovyMain.process(GroovyMain.java:294)
at groovy.ui.GroovyMain.processArgs(GroovyMain.java:111)
at groovy.ui.GroovyMain.main(GroovyMain.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:101)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)
I have added the statement as you specified. Now wsdlproject object is created without any errors. I got the testsuite name too but when I call runSuite it fails. In the logs I see wsdloader loads all the wsdls and while loading shemautils I get below Linkage Error exception. Am i missing anything to set?
My groovy code is like below and I have copied all the SOAPUI jars into groovy lib folder and which is set in my CLASSPATH.
def pathToSettingsFile='C:/soapui-pro-2.0.2-bin/soapui-pro-2.0.2/bin/soapui-settings.xml'
SoapUI.setSoapUICore( new SoapUIPro.SoapUIProCore( true, pathToSettingsFile ));
SoapUIProTestCaseRunner proTestcaseRunner= new SoapUIProTestCaseRunner()
proTestcaseRunner.setProjectFile("C:/soapuiE2Eprojects/"+soapTestProj)
proTestcaseRunner.setHost('host:8080')
proTestcaseRunner.setJUnitReport(true)
proTestcaseRunner.setOutputFolder("C:/soupui_reports"+soapTestProj)
WsdlProject project = new WsdlProject("C:/soapuiE2Eprojects/"+soapTestProj);
println("wsdlprojct created")
//Get testsuite names
Map testSuiteMap = project.getTestSuites();
Iterator x = testSuiteMap.keySet().iterator();
while( x.hasNext())
{
println("in while");
String testsuiteName = (String) x.next()
println("testsuite is::"+testsuiteName)
//Create Testsuite
WsdlTestSuite wsdlTestSuite= project.getTestSuiteByName(testsuiteName);
try {
proTestcaseRunner.setTestSuite(testsuiteName)
proTestcaseRunner.runSuite(wsdlTestSuite);
}
catch(Exception ex)
{
println "in exp"+ex.getMessage()
}
}
16:05:14,057 ERROR [WsdlTestCaseRunner] Exception during TestCase Execution
java.lang.LinkageError: Class org/w3c/dom/DOMConfiguration violates loader constraints
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
at java.lang.Class.privateGetPublicMethods(Class.java:2519)
at java.lang.Class.privateGetPublicMethods(Class.java:2529)
at java.lang.Class.getMethods(Class.java:1406)
at net.sf.saxon.dom.DocumentWrapper.
at net.sf.saxon.dom.DOMObjectModel.wrapDocument(DOMObjectModel.java:296)
at net.sf.saxon.value.Value.convertToBestFit(Value.java:964)
at net.sf.saxon.value.Value.convertJavaObjectToXPath(Value.java:762)
at net.sf.saxon.trans.Variable.setValue(Variable.java:123)
at org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectNodes(XBeansXPath.java:105)
at org.apache.xmlbeans.impl.xpath.saxon.XBeansXPath.selectPath(XBeansXPath.java:132)
at org.apache.xmlbeans.impl.store.Path$SaxonPathImpl$SaxonPathEngine.next(Path.java:500)
at org.apache.xmlbeans.impl.store.Cursor._toSelection(Cursor.java:931)
at org.apache.xmlbeans.impl.store.Cursor._toNextSelection(Cursor.java:920)
at org.apache.xmlbeans.impl.store.Cursor.toNextSelection(Cursor.java:2670)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer.transferStringToXml(PropertyTransfer.java:440)
at com.eviware.soapui.impl.wsdl.teststeps.PropertyTransfer.transferProperties(PropertyTransfer.java:269)
at com.eviware.soapui.impl.wsdl.teststeps.TransferResponseValuesTestStep.run(TransferResponseValuesTestStep.java:133)
at com.eviware.soapui.impl.wsdl.teststeps.TransferResponseValuesTestStep.run(TransferResponseValuesTestStep.java:106)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.run(WsdlTestCaseRunner.java:185)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.start(WsdlTestCaseRunner.java:84)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:513)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCase.run(WsdlTestCase.java:57)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runTestCase(SoapUITestCaseRunner.java:464)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runSuite(SoapUITestCaseRunner.java:423)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:904)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at org.codehaus.groovy.runtime.InvokerHelper.invokePojoMethod(InvokerHelper.java:761)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:749)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167)
at IntegrationTest.run(IntegrationTest.groovy:142)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:904)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:740)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:773)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:753)
at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:402)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1077)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:744)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:167)
at IntegrationTest.main(IntegrationTest.groovy)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:95)
at org.codehaus.groovy.runtime.MetaClassHelper.doMethodInvoke(MetaClassHelper.java:599)
at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1077)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:744)
at groovy.lang.GroovyShell.runMainOrTestOrRunnable(GroovyShell.java:244)
at groovy.lang.GroovyShell.run(GroovyShell.java:218)
at groovy.lang.GroovyShell.run(GroovyShell.java:147)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:492)
at groovy.ui.GroovyMain.run(GroovyMain.java:308)
at groovy.ui.GroovyMain.process(GroovyMain.java:294)
at groovy.ui.GroovyMain.processArgs(GroovyMain.java:111)
at groovy.ui.GroovyMain.main(GroovyMain.java:92)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:101)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:130)