Forum Discussion

mmoser18's avatar
mmoser18
Frequent Contributor
9 years ago

TestRunner has issues loading a soapUI project file

Hi - I have a very nasty problem here:

 

As part of our build I want to run several test suites using TestRunner (started via an ant exec-command)

However, to my surprise TestRunner suddenly has an issue with the soapUI project file (which soapUI opens without the slightest issue):

 

     ...
     [exec] SoapUI 5.2.1 TestCase Runner
     [exec] Error at line 459, column 2
     [exec] 22:10:58,948 ERROR [SoapUI] An error occurred [Failed to load project from file [file:/W:/LHAPI_Tests/LHAPI-Tests-v4-soapui-project.xml]], see error log for details
     [exec] org.apache.xmlbeans.XmlException: error: Unexpected character encountered (lex state 9): '<'
     [exec]  at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
     [exec]  at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1276)
     [exec]  at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263)
     [exec]  at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
     [exec]  at com.eviware.soapui.config.SoapuiProjectDocumentConfig$Factory.parse(SoapuiProjectDocumentConfig.java:71)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProject.loadProjectFromInputStream(WsdlProject.java:340)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:301)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:220)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:41)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:28)
     [exec]  at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:341)
     [exec]  at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:204)
     [exec]  at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:139)
     [exec]  at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:114)
     [exec]  at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:120)
     [exec] Caused by: org.xml.sax.SAXParseException; systemId: file:; lineNumber: 459; columnNumber: 2; Unexpected character encountered (lex state 9): '<'
     [exec]  at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
     [exec]  at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
     [exec]  at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
     [exec]  ... 14 more
     [exec] com.eviware.soapui.support.SoapUIException: Failed to load project from file [file:/W:/LHAPI_Tests/LHAPI-Tests-v4-soapui-project.xml]
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:318)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:220)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:41)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:28)
     [exec]  at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:341)
     [exec]  at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:204)
     [exec]  at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:139)
     [exec]  at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:114)
     [exec]  at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:120)
     [exec] Caused by: org.apache.xmlbeans.XmlException: error: Unexpected character encountered (lex state 9): '<'
     [exec]  at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
     [exec]  at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1276)
     [exec]  at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:1263)
     [exec]  at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:345)
     [exec]  at com.eviware.soapui.config.SoapuiProjectDocumentConfig$Factory.parse(SoapuiProjectDocumentConfig.java:71)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProject.loadProjectFromInputStream(WsdlProject.java:340)
     [exec]  at com.eviware.soapui.impl.wsdl.WsdlProject.loadProject(WsdlProject.java:301)
     [exec]  ... 8 more
     [exec] Caused by: org.xml.sax.SAXParseException; systemId: file:; lineNumber: 459; columnNumber: 2; Unexpected character encountered (lex state 9): '<'
     [exec]  at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
     [exec]  at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
     [exec]  at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
     [exec]  ... 14 more
     [exec] 22:10:59,416 ERROR [SoapUITestCaseRunner] java.lang.Exception: Failed to load SoapUI project file [W:/LHAPI_Tests/LHAPI-Tests-v4-soapui-project.xml]
     [exec] 22:10:59,416 ERROR [SoapUI] An error occurred [Failed to load SoapUI project file [W:/LHAPI_Tests/LHAPI-Tests-v4-soapui-project.xml]], see error log for details
     [exec] java.lang.Exception: Failed to load SoapUI project file [W:/LHAPI_Tests/LHAPI-Tests-v4-soapui-project.xml]
     [exec]  at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:345)
     [exec]  at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:204)
     [exec]  at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:139)
     [exec]  at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:114)
     [exec]  at com.eviware.soapui.tools.SoapUITestCaseRunner.main(SoapUITestCaseRunner.java:120)

BUILD FAILED

 

 

I inspected the location (line 459) shown as offending and can not see anything wrong there.

 

...
454 <con:request name="countries/{code} (xml)" mediaType="application/json" id="82a19d29-ca8b-4833-859f-b3f02dfb7a51">
455 <con:settings>
456 <con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment xmlns:con="http://eviware.com/soapui/config">
457 &lt;con:entry key="Authorization" value="Bearer ${#Project#Mashery_Access_Token}"/>
458 &lt;con:entry key="Accept" value="application/xml"/>
459 &lt;/xml-fragment></con:setting>
460 </con:settings>
461 <con:endpoint>${#Project#endpoint_reference_data}</con:endpoint>
462 <con:request/>
...

 

I already re-generated and re-opened that file in soapUI several times to make sure it is not really corrupted, but there is no issue and soapUI itself opens that file without the slightest problem.

 

I welcome all hints or ideas how to overcome this, because I have not the slightest clue how I could convince TestRunner to swallow that file.

 

Regards,

Michael

No RepliesBe the first to reply