You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by g&lhome <gm...@mediaone.net> on 2001/12/14 16:01:06 UTC
javax.xml.parsers.FactoryConfigurationError [Ant 1.4.1 on Win 2000]
RE: javax.xml.parsers.FactoryConfigurationError: Provider null could not
be instantiated: java.lang.NullPointerException
Problems testing my Ant 1.4.1 on Win 2000:
I am a new Ant 1.4.1 user and recently installed Ant 1.4.1 on Win 2000
and I am having problems testing it.
Read the manual over a number of times and reinstalled the build many
times only to get the same results.
Read FAQ, searched the Web and asked a number of friends.
Created class to create a new instance of a SAXParserFactory with no
problems.
Ant is installed in its own directory C:\ant
CLASSPATH is set as =
.;C:\ant\jakarta-ant-1.4.1\lib\ant.jar;C:\ant\jakarta-ant-1.4.1\lib\crimson.jar;C:\ant\jakarta-ant-1.4.1\lib\jaxp.jar
PATH as C:\JavaSrv\jdk1.3.1_01;C:\ant\jakarta-ant-1.4.1\bin
After putting the build.xml [ below] file I got from a new JBoss 2.4.3
installation.
into a temp directory and running ant from a new command prompt box
--------------------------------------------------------------------------------
<!-- Simple Ant build script to test an Ant installation -->
<project name="TestInstall" default="run" basedir=".">
<target name="init">
<available file="ASimpleHelloObject.java" property="ASimpleHelloObject"/>
</target>
<target name="ASimpleHelloObject" unless="ASimpleHelloObject"
depends="init">
<echo file="ASimpleHelloObject.java">
public class ASimpleHelloObject
{
public static void main(String[] args)
{
System.out.println("ASimpleHelloObject.main was called");
}
}
</echo>
<echo message="Wrote ASimpleHelloObject.java" />
</target>
<target name="compile" depends="ASimpleHelloObject">
<javac destdir="." srcdir="." debug="on" classpath=".">
<include name="ASimpleHelloObject.java"/>
</javac>
</target>
<target name="run" depends="compile">
<java classname="ASimpleHelloObject" classpath="." />
<echo message="Ant appears to be successfully installed" />
</target>
</project>
---------------------------------------------------------------------
I received this out put:
Buildfile: build.xml
BUILD FAILED
javax.xml.parsers.FactoryConfigurationError: Buildfile: build.xml
BUILD FAILED
javax.xml.parsers.FactoryConfigurationError: Provider null could not be
instantiated: java.lang.NullPointerException
at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:105)
at
org.apache.tools.ant.ProjectHelper.getParserFactory(ProjectHelper.java:776)
at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:105)
at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:85)
at org.apache.tools.ant.Main.runBuild(Main.java:439)
at org.apache.tools.ant.Main.start(Main.java:153)
at org.apache.tools.ant.Main.main(Main.java:176)
Total time: 1 second
Provider null could not be instantiated: java.lang.NullPointerException
at
javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:105)
at
org.apache.tools.ant.ProjectHelper.getParserFactory(ProjectHelper.java:776)
at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:105)
at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:85)
at org.apache.tools.ant.Main.runBuild(Main.java:439)
at org.apache.tools.ant.Main.start(Main.java:153)
at org.apache.tools.ant.Main.main(Main.java:176)
Total time: 1 second
Provider null could not be instantiated: java.lang.NullPointerException
----------------------------------------------------------------------
What am I missing here? Can someone point me to a better test of my ant
installation?
Any help appreciated.
Thanking you in advance.
Glen Manson-Hing
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: javax.xml.parsers.FactoryConfigurationError [Ant 1.4.1 on Win 2000]
Posted by David Medinets <me...@mtolive.com>.
Perhaps you don't have the right XML parser in your CLASSPATH?
David Medinets, Consultant, http://www.codebits.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>