ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Nathan.T...@epiphany.com>
Subject Having problems running Ant 1.6 via Ant's Main.class
Date Sat, 12 Jun 2004 01:45:20 GMT
Hi,

 

We have some wrapper code that runs our Ant builds by calling a slightly
modified version of Ant's Main.class (AntCall). This worked well in
older versions of Ant prior all the launcher changes that were made in
Ant 1.6. Now when we attempt to run the same build process against Ant
1.6, it gives me the following NoClassDefFoundError. Does this mean the
jars in the ant lib directory are not getting found?

 

BUILD FAILED

Unable to load default ProjectHelper due to
java.lang.NoClassDefFoundError: org/xml/sax/ContentHandler

            at
org.apache.tools.ant.ProjectHelper.getProjectHelper(ProjectHelper.java:2
65)

            at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:1
24)

            at org.apache.tools.ant.AntCall.runBuild(Unknown Source)

            at org.apache.tools.ant.AntCall.antcall_listen(Unknown
Source)

            at
com.epiphany.local.ant.AntBuildThread.run(AntBuildThread.java:58)

--- Nested Exception ---

java.lang.NoClassDefFoundError: org/xml/sax/ContentHandler

            at
org.apache.tools.ant.ProjectHelper.getProjectHelper(ProjectHelper.java:2
61)

            at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:1
24)

            at org.apache.tools.ant.AntCall.runBuild(Unknown Source)

            at org.apache.tools.ant.AntCall.antcall_listen(Unknown
Source)

            at
com.epiphany.local.ant.AntBuildThread.run(AntBuildThread.java:58)

 

 

We are using the following constructor to invoke the runBuild method in
the AntCall class.

 

    protected AntCall(String[] args) throws BuildException {

        processArgs(args);

    }

 

We used to have the ant.jar and optional.jar in our classpath. But with
the ant jars separated, we only have the ant.jar and ant-launcher.jar in
our classpath now. It seems like the jars in the ant lib directory are
not getting loaded when we go through this execution route. If that is
the case, does anyone have any suggestions for running Ant
programmatically so that the jars in ant/lib do get loaded?

 

Thanks in advance,

Nathan


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message