Forum Discussion

averet's avatar
averet
New Contributor
16 years ago

[AMF Load test] SAXParseException for property transfer and groovy script

Hi, i try to execute load tests for AMF, when copying property from one request to another, the following message appears : error: Unexpected end of file after null.

The TestSuite run correctly, but when running load tests it fail. I have tried to copy the property with both a PropertyTranfer object and a groovy script.
I use SoapUI 3.5.1

With the PropertyTranfer, the message appears in the load test log console.

With the groovy script, the following message appears in the error log file.


2010-04-29 10:36:20,032 ERROR [errorlog] org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
            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.XmlHolder.<init>(XmlHolder.java:37)
            at com.eviware.soapui.support.XmlHolder.<init>(XmlHolder.java:52)
            at com.eviware.soapui.support.GroovyUtils.getXmlHolder(GroovyUtils.java:54)
            at sun.reflect.GeneratedMethodAccessor829.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
            at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
            at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
            at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
            at Script1.run(Script1.groovy:5)
            at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:93)
            at com.eviware.soapui.impl.wsdl.panels.teststeps.amf.AMFRequest.executeAmfScript(AMFRequest.java:113)
            at com.eviware.soapui.impl.wsdl.teststeps.AMFRequestTestStep.initAmfRequest(AMFRequestTestStep.java:680)
            at com.eviware.soapui.impl.wsdl.teststeps.AMFRequestTestStep.run(AMFRequestTestStep.java:180)
            at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runTestStep(WsdlTestCaseRunner.java:194)
            at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:125)
            at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.internalRun(WsdlTestCaseRunner.java:39)
            at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:138)
            at com.eviware.soapui.impl.wsdl.loadtest.WsdlLoadTestRunner$InternalTestCaseRunner.run(WsdlLoadTestRunner.java:546)
            at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
            at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
            at java.util.concurrent.FutureTask.run(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException: Unexpected end of file after null
            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)
            ... 32 more


I found a "related" issue for XMLBeans : https://issues.apache.org/jira/browse/XMLBEANS-226
I try to replace the commons-io 1.3.2 with the 1.4 version but it doesnt fix the problem.

Any help appreciated
Thanks

6 Replies

  • averet's avatar
    averet
    New Contributor

    def groovyUtils = new com.eviware.soapui.support.GroovyUtils( context )
    log.info( groovyUtils.projectPath )

    def holder = groovyUtils.getXmlHolder( "find activation#ResponseAsXml" )
    def String idActivation = holder.getNodeValue( "(//double)[1]" )

    parameters['idActivation']=idActivation
  • Hi,

    one thing that I notice first i s your line

    def String idActivation = holder.getNodeValue( "(//double)[1]" )


    when you type def you replacing the type of variable . So def and String cannot go together .

    Can you send us your response xml here and screenshot of Test case.

    regards
    nebojsa
    eviware.com
  • averet's avatar
    averet
    New Contributor
    Thanks for the groovy tips, but it doesn't change anything

    The XML response :


    <flex.messaging.io.ArrayCollection>
      <object-array>
        <flex.messaging.io.amf.ASObject serialization="custom">
          <unserializable-parents/>
          <map>
            <default>
              <loadFactor>0.75</loadFactor>
              <threshold>48</threshold>
            </default>
            <int>64</int>
            <int>25</int>
            <string>numclient</string>
            <string>2000000174</string>
            <string>idt</string>
            <double>1265763.0</double>
          </map>
          <flex.messaging.io.amf.ASObject>
            <default>
              <inHashCode>false</inHashCode>
              <inToString>false</inToString>
              <namedType>ma.iam.archivage.dto.ActivationDto</namedType>
            </default>
          </flex.messaging.io.amf.ASObject>
        </flex.messaging.io.amf.ASObject>
      </object-array>
    </flex.messaging.io.ArrayCollection>


    The screenshot show the error in load tests. It works for the TestCase.

    Thanks
  • Hi!

    ok... can you please upgrade to the latest 3.5.1 nightly build, there have been a number of fixes in the AMF support since the 3.5 release so their might be something in there that helps you out.. let us know!

    regards,

    /Ole
    eviware.com