[Webtest] Unexpected error when invoking large xml file

Tokutan Tokutan <tokutan@gmail.com>
Fri, 29 Aug 2008 14:56:48 +1000


------=_Part_3016_31067645.1219985808433
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

I am experiencing unexpected error when invoking a large xml file (about 30
mb). Here is the script:

    <dataDriven tableContainer="testsip.xls" table="true">


        <webtest name="verify node ${check1} ">

        <config haltonerror="false" haltonfailure="false" autorefresh="true"
protocol="file"
        basepath="C:\webtest5\myWebTestProject\tests\">
         <option name="ThrowExceptionOnScriptError"
        value="false"
        />
              <option name="ThrowExceptionOnFailingStatusCode"
        value="false"
        />

     </config>


<invoke url="careershays20080825123203.xml" description="invoke file }" />

<not description="check no element in list  found element: ${check1}">
<verifyText text="(?i:${check1})" regex="true"
description="check1smallcase${check1} "/>

</not>

</webtest>
</dataDriven>
</target>
</project>

I got the following error:

Unexpected exception caught: org.apache.tools.ant.BuildException

C:\webtest5\myWebTestProject\tests\testsip.xml:25:
java.lang.OutOfMemoryError: Java heap space
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)
	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)
	at com.canoo.webtest.steps.Step.execute(Step.java:101)
	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:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:206)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:357)
	at org.apache.tools.ant.Target.performTasks(Target.java:385)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
	at org.apache.tools.ant.Main.runBuild(Main.java:698)
	at org.apache.tools.ant.Main.startAnt(Main.java:199)
	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)


The script failed at invoking the file. When invoking smaller xml file it is
ok. Is there anyway I can overcome this problem?


Thanks.

------=_Part_3016_31067645.1219985808433
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div dir="ltr">Hi,<br><br>I am experiencing unexpected error when invoking a large xml file (about 30 mb). Here is the script:<br><br>&nbsp;&nbsp;&nbsp; &lt;dataDriven tableContainer=&quot;testsip.xls&quot; table=&quot;true&quot;&gt;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;webtest name=&quot;verify node ${check1} &quot;&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;config haltonerror=&quot;false&quot; haltonfailure=&quot;false&quot; autorefresh=&quot;true&quot; protocol=&quot;file&quot;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; basepath=&quot;C:\webtest5\myWebTestProject\tests\&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;option name=&quot;ThrowExceptionOnScriptError&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value=&quot;false&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &lt;option name=&quot;ThrowExceptionOnFailingStatusCode&quot;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; value=&quot;false&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /&gt;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&lt;/config&gt;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&lt;invoke url=&quot;careershays20080825123203.xml&quot; description=&quot;invoke file }&quot; /&gt;<br><br>&lt;not description=&quot;check no element in list&nbsp; found element: ${check1}&quot;&gt;<br>
&lt;verifyText text=&quot;(?i:${check1})&quot; regex=&quot;true&quot;&nbsp; description=&quot;check1smallcase${check1} &quot;/&gt;<br><br>&lt;/not&gt;<br><br>&lt;/webtest&gt;<br>&lt;/dataDriven&gt;<br>&lt;/target&gt;<br>&lt;/project&gt;<br>
<br>I got the following error:<br><br>Unexpected exception caught: org.apache.tools.ant.BuildException<br><pre style="display: inline;">C:\webtest5\myWebTestProject\tests\testsip.xml:25: java.lang.OutOfMemoryError: Java heap space<br>
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)<br>	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at com.canoo.webtest.ant.TestStepSequence.executeSteps(TestStepSequence.java:43)<br>
	at com.canoo.webtest.ant.TestStepSequence.doExecute(TestStepSequence.java:31)<br>	at com.canoo.webtest.steps.Step.execute(Step.java:101)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>	at java.lang.reflect.Method.invoke(Method.java:597)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>
	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at com.canoo.webtest.ant.WebtestTask.execute(WebtestTask.java:206)<br>	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)<br>
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>	at java.lang.reflect.Method.invoke(Method.java:597)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>
	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at org.apache.tools.ant.Target.execute(Target.java:357)<br>	at org.apache.tools.ant.Target.performTasks(Target.java:385)<br>	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)<br>
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)<br>	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)<br>	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)<br>
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)<br>	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
	at java.lang.reflect.Method.invoke(Method.java:597)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at org.apache.tools.ant.Target.execute(Target.java:357)<br>
	at org.apache.tools.ant.Target.performTasks(Target.java:385)<br>	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)<br>	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)<br>
	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)<br>	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416)<br>	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)<br>	at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)<br>
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>	at java.lang.reflect.Method.invoke(Method.java:597)<br>	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)<br>
	at org.apache.tools.ant.Task.perform(Task.java:348)<br>	at org.apache.tools.ant.Target.execute(Target.java:357)<br>	at org.apache.tools.ant.Target.performTasks(Target.java:385)<br>	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)<br>
	at org.apache.tools.ant.Project.executeTarget(Project.java:1298)<br>	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)<br>	at org.apache.tools.ant.Project.executeTargets(Project.java:1181)<br>
	at org.apache.tools.ant.Main.runBuild(Main.java:698)<br>	at org.apache.tools.ant.Main.startAnt(Main.java:199)<br>	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)<br>	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)<br>
</pre><br>The script failed at invoking the file. When invoking smaller xml file it is ok. Is there anyway I can overcome this problem? <br><br><br>Thanks.<br></div>

------=_Part_3016_31067645.1219985808433--