You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by lily Gao <xm...@hotmail.com> on 2001/05/03 15:18:36 UTC

Problem: Ant 1.3 with JDK1.2.2.007

Greeting all:

I got the following Java exception with running Ant1.3 with JDK1.2.2.007. 
When I run Tomcat 3.2.1, I got exactly the same problem. I have only 
tools.jar with whatever jar files in ant\lib\ and tomcat\lib in my 
classpath. Any idea?

---------
Buildfile: example1.xml

BUILD FAILED

javax.xml.parsers.FactoryConfigurationError: 
com.sun.xml.parser.SAXParserFactoryImpl
        at 
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:84)
        at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java, 
Compiled Code)
        at 
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:85)
        at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
        at org.apache.tools.ant.Main.main(Main.java:149)

Total time: 0 seconds
com.sun.xml.parser.SAXParserFactoryImpl
----------

Thanks a lot!

-Jianhe
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


Multiple app server vendors in one build.xml?

Posted by Keith Kee <ke...@netsco.com>.
Hi:
  Being new in the ant thing, I would appreciate if you can comment on the
best approach to support multiple app server vendors using ant.
  I like to make the build.xml file as such it can determine which variable
to use based on the vendor. For instance, I have set up a classpath which
our applications use called dev.build.path in this manner:
   <path id="dev.build.cpath">
      <pathelement location="/devtools/jakarta-log4j-1.0.4/log4j.jar"/>
      <pathelement location="/devtools/junit/junit3.5/junit.jar"/>
      <pathelement location="/devtools/jaxp/jaxp-1.1/jaxp.jar"/>
      <pathelement location="/devtools/jaxp/jaxp-1.1/crimson.jar"/>
      <pathelement location="/devtools/jaxp/jaxp-1.1/xalan.jar"/>
  </path>
  Then I have another path defined, which is application server vendor
specific:
 <!-- Iplanet classpath -->
    <path id="ias.build.cpath">
      <pathelement location="${ias.home}/classes/java/jdbc20.jar" />
      <pathelement location="${ias.home}/classes/java/servlet.jar" />
      <pathelement location="${ias.home}/classes/java/ldapjdk.jar" />
      <pathelement location="${ias.home}/classes/java/javax.jar" />
      <pathelement location="${ias.home}/classes/java/kfcjdk11.jar" />
      <pathelement location="${ias.home}/classes/java/jndi/cosnaming.jar" />
      <pathelement location="${ias.home}/classes/java/jndi/providerutil.jar"
/>
      <pathelement location="${ias.home}/classes/java/activation.jar" />
      <pathelement location="${ias.home}/classes/java/jms.jar" />
      <pathelement location="${ias.home}/classes/java/mail.jar" />
      <pathelement location="${ias.home}/classes/java" />
  </path>

  and
    <!-- Weblogic classpath -->
  <path id="weblogic.build.cpath">
      <pathelement location="${wl.home}/lib/weblogic_sp.jar" />
      <pathelement location="${wl.home}/lib/weblogic.jar" />
  </path>

  My goal is to have a path called as.build.path which will combined
dev.build.cpath and ias.build.cpath or dev.build.cpath and
weblogic.build.cpath based on a property called asvendor. This way, I can
have a target to build that source files.

  How can do such a conditional variable?

TIA,
keith