Jenkins抛出org.apache.xmlbeans.XmlException:错误:意外的元素:CDATA [英] Jenkins throws org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA

查看:185
本文介绍了Jenkins抛出org.apache.xmlbeans.XmlException:错误:意外的元素:CDATA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SOAPUI运行自动化测试.在SOAPUI中运行时,我的测试可以安全运行,但是在Jenkins中作为maven项目运行时,一项测试将失败.

I am running automated tests using SOAPUI. My tests run safe when running in SOAPUI but one test fails when running in Jenkins as maven project.

10:54:36,633 ERROR [SoapUI] An error occurred [error: Unexpected element: CDATA], see error log for details
org.apache.xmlbeans.XmlException: error: Unexpected element: CDATA
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:712)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:696)
at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:683)
at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:208)
at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:580)
at com.eviware.soapui.support.xml.XmlUtils.createXmlObject(XmlUtils.java:263)
at com.eviware.soapui.model.propertyexpansion.resolvers.ResolverUtils.extractXPathPropertyValue(ResolverUtils.java:97)
at com.eviware.soapui.model.propertyexpansion.resolvers.ResolverUtils.parseProperty(ResolverUtils.java:67)
at com.eviware.soapui.model.propertyexpansion.resolvers.ResolverUtils.checkForExplicitReference(ResolverUtils.java:44)
at com.eviware.soapui.model.propertyexpansion.resolvers.ModelItemPropertyResolver.getScopedProperty(ModelItemPropertyResolver.java:218)
at com.eviware.soapui.model.propertyexpansion.resolvers.ModelItemPropertyResolver.resolveProperty(ModelItemPropertyResolver.java:51)
at com.eviware.soapui.model.propertyexpansion.PropertyExpander.expand(PropertyExpander.java:184)
at com.eviware.soapui.model.propertyexpansion.PropertyExpander.expandProperties(PropertyExpander.java:112)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext.expand(WsdlTestRunContext.java:157)
at com.eviware.soapui.model.testsuite.TestRunContext$expand.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at Script1.run(Script1.groovy:34)
at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:100)
at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:89)
at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.assertScript(GroovyScriptAssertion.java:122)
at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.internalAssertResponse(GroovyScriptAssertion.java:139)
at com.eviware.soapui.impl.wsdl.teststeps.WsdlMessageAssertion.assertResponse(WsdlMessageAssertion.java:165)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.assertResponse(RestTestRequest.java:156)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.setResponse(RestTestRequest.java:141)
at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:927)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:239)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:52)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:152)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:47)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:139)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.xml.sax.SAXParseException; systemId: file:; lineNumber: 1; columnNumber: 53; Unexpected element: CDATA
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)

我正在尝试从项目自定义属性中加载存储的变量.

I am trying to load a stored variable from project custom properties.

`context.expand( '${#TestCase#ControllerIds#$[1]}' )`

有人可以告诉我一个解决办法.

Could some one tell me a fix for this.

推荐答案

我遇到了同样的问题,已通过切换到soap ui pro maven插件版本5.1.0进行了修复,该错误已得到修复.您还需要添加额外的依赖关系,以避免类未找到错误:

I had the same problem, fixed by switching to soap ui pro maven plugin version 5.1.0 where that bug has been fixed. You will also need to add extra dependency in order to avoid class not found error:

<plugin>
     <groupId>com.smartbear.soapui</groupId>
     <artifactId>soapui-pro-maven-plugin</artifactId>
     <version>5.1.0</version>
     <dependencies>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>10.2.0.1.0</version>
        </dependency>
        <dependency>  
            <groupId>org.reflections</groupId>  
            <artifactId>reflections-maven</artifactId>  
            <version>0.9.9-RC2</version>  
        </dependency>
 .......
 <plugin>

这篇关于Jenkins抛出org.apache.xmlbeans.XmlException:错误:意外的元素:CDATA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆