Unable to use compile target in build.xml

By: Mark Hayes - markh46
Unable to use compile target in build.xml
2003-04-06 23:53
JR 0.4.5
Ant 1.5.2
SDK 1.3.1_07

When I attempt to use the <compile> target for the query sample I get:
java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler

I have tried everything I can think to track this down. If I invoke QueryApp from the command line, setting -classpath to the jar's in the JR lib directory, it works.

This fails:

<target name="compile">
<java classname="QueryApp" fork="true">
<sysproperty key="org.xml.sax.driver" value="org.apache.xerces.parsers.SAXParser"/>
<arg value="-Tcompile"/>
<arg value="-FQueryReport.xml"/>
<classpath>
<pathelement location="./"/>
<pathelement location="../../../classes"/>
<fileset dir="../../../lib">
<include name="**/*.jar"/>
</fileset>
</classpath>
</java>
</target>


But this works:

java -classpath .;..\..\..\lib\tools.jar;..\..\..\classes;..\..\..\lib\xercesImpl.jar;..\..\..\lib\xmlParserAPIs.jar;..\..\..\lib\commons-digester.jar;..\..\..\lib\commons-collections.jar;..\..\..\lib\commons-logging.jar;..\..\..\lib\commons-beanutils.jar -Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser QueryApp -Tcompile -FQueryReport.xml
2002 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:28am
Last seen: 16 years 5 months ago

0 Answers:

No answers yet
Feedback