I am new bie for using ANT build tool.
I did download Ant1.6 and configured the Environmental Settings ANT_HOME to c:\ant
I tried with a very basic one created a simple java file and then a basic build.xml
and when i tried c:>ant
I got the following Error
BUILD FAILED
java.lang.AbstractMethodError: javax.xml.parsers.SAXParser.getXMLReader()Lorg/xm
l/sax/XMLReader;
at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.j
ava:193)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:
215)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:
162)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:126)
at org.apache.tools.ant.Main.runBuild(Main.java:650)
at org.apache.tools.ant.Main.startAnt(Main.java:220)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:162)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:85)
Total time: 0 seconds
java.lang.AbstractMethodError: javax.xml.parsers.SAXParser.getXMLReader()Lorg/xm
l/sax/XMLReader;
at org.apache.tools.ant.util.JAXPUtils.getNamespaceXMLReader(JAXPUtils.j
ava:193)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:
215)
at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:
162)
at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:126)
at org.apache.tools.ant.Main.runBuild(Main.java:650)
at org.apache.tools.ant.Main.startAnt(Main.java:220)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:162)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:85)
javax.xml.parsers.SAXParser.getXMLReader()Lorg/xml/sax/XMLReader;
can anyone please tell me what is wrong in it?
-
How to rectify this Ant Build Error (3 messages)
- Posted by: Shahul Hameed
- Posted on: November 30 2004 07:21 EST
Threaded Messages (3)
- How to rectify this Ant Build Error by Daniel Freitas on November 30 2004 08:44 EST
- How to rectify this Ant Build Error by Shahul Hameed on December 01 2004 00:09 EST
- Surprisingly I am getting the same error... by Amanjeev Sethi on September 30 2007 02:45 EDT
- How to rectify this Ant Build Error by Shahul Hameed on December 01 2004 00:09 EST
-
How to rectify this Ant Build Error[ Go to top ]
- Posted by: Daniel Freitas
- Posted on: November 30 2004 08:44 EST
- in response to Shahul Hameed
Which JDK are you using? javax.xml.parsers.SAXParser is part of the JAXP 1.0 wich is avaiable only from JDK 1.4 or later.
If you are using a prior JDK version, download the JAXP implementation from Sun.
This exception is thrown because Ant was built using JDK 1.4. When you try to use it on previous versions, the JVM will not be able to find the SAXParser class and will throw the AbstractMethodError error. -
How to rectify this Ant Build Error[ Go to top ]
- Posted by: Shahul Hameed
- Posted on: December 01 2004 00:09 EST
- in response to Daniel Freitas
Yeah you are right.. I used JDK 1.2 only.. ..btw i fixed it by deleting the first line(<?xml version="1.0"?>) and tried..it does it..any way i am going to download JAXP implementation ..
Thanks for your suggestion. -
Surprisingly I am getting the same error...[ Go to top ]
- Posted by: Amanjeev Sethi
- Posted on: September 30 2007 14:45 EDT
- in response to Shahul Hameed
Despite the fact that I am using JDK/JRE6