#5 Ant task tries to parse HTML

1.5
closed-fixed
Ant Task (13)
5
2002-10-17
2002-10-15
No

Environment:

* ant v. 1.5
* junitee v. 1.5 (the latest version)
* weblogic 6.1 (sp 2)

When I run my ant script (presented in part below), I
get the output that follows. I still seem to be
parsing HTML. As you can see from the WebLogic
access.log, the output=xml is set. Any suggestions?
Thanks.

Partial Ant Script:
-------------------

<target name="init-test">
<echo message="INITIALIZING TEST
DIRECTORY............................"/>
<delete dir="${test.data.dir}"/>
<mkdir dir="${test.data.dir}"/>
</target>

<target name="container-test" depends="init-test">
<echo message="ABOUT TO TASKDEF JUNITEE
................................."/>
<taskdef name="junitee"
classname="org.junitee.anttask.JUnitEETask">
<classpath>
<pathelement location="${junitee-anttask.jar}"/>
</classpath>
</taskdef>
<echo message="ABOUT TO CALL JUNITEE
................................."/>
<junitee printsummary="true"

url="http://localhost:7001/rcs-acctsrvtest/TestServlet">
<test runall="true"
resource="WEB-INF/lib/rcs-acctsrvtest.jar"/>
</junitee>

Output (create with ant -debug):
--------------------------------

container-test:
[echo] ABOUT TO TASKDEF JUNITEE
.................................
Finding class org.junitee.anttask.JUnitEETask
Class org.apache.tools.ant.Task loaded from parent loader
Class org.junitee.anttask.JUnitEETask loaded from ant
loader
Class java.lang.Throwable loaded from parent loader
Class org.apache.tools.ant.BuildException loaded from
parent loader
Class java.net.MalformedURLException loaded from parent
loader
Class java.lang.Exception loaded from parent loader
+User task: junitee org.junitee.anttask.JUnitEETask
[echo] ABOUT TO CALL JUNITEE
.................................
Class java.util.Vector loaded from parent loader
+Task: junitee
Finding class org.junitee.anttask.JUnitEETest
Class java.lang.Object loaded from parent loader
Class org.junitee.anttask.JUnitEETest loaded from ant
loader
Class java.lang.String loaded from parent loader
Class java.net.URL loaded from parent loader
Class java.util.Enumeration loaded from parent loader
Class java.lang.StringBuffer loaded from parent loader
Class java.net.URLConnection loaded from parent loader
Class javax.xml.parsers.DocumentBuilderFactory loaded
from parent loader
Class javax.xml.parsers.DocumentBuilder loaded from
parent loader
[Fatal Error] :1:63: White spaces are required between
publicId and systemId.
[junitee] Failed to execute test:
org.xml.sax.SAXParseException: White spaces
are required between publicId and systemId.

WebLogic access.log:
--------------------
127.0.0.1 - - [15/Oct/2002:12:33:54 -0400] "GET
/rcs-acctsrvtest/TestServlet?output=xml&resource=WEB-INF/lib/rcs-acctsrvtest.jarall=true
HTTP/1.1" 200 3846

Discussion

  • Oliver Rossmueller

    Logged In: YES
    user_id=55468

    in the test url created by the ant task a small but very
    important '&' is missing. Instead of

    /rcs-acctsrvtest/TestServlet?output=xml&resource=WEB-INF/lib/rcs-acctsrvtest.jarall=true

    it should be

    /rcs-acctsrvtest/TestServlet?output=xml&resource=WEB-INF/lib/rcs-acctsrvtest.jar&all=true

    The servlet takes the all=true as part of the 'resource'
    value, and therefore generates an error page because no test
    suite is specified => html is parsed by the ant task

     
  • Oliver Rossmueller

    • status: open --> closed-fixed
     
  • Oliver Rossmueller

    Logged In: YES
    user_id=55468

    fixed in 1.5.1

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks