You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Anuj Agrawal <ag...@lucent.com> on 2001/05/02 15:26:11 UTC

REPOST: Failed to load Main-Class manifest attribute

Hi folks -

i'm running ant 1.3 on solaris 8 (with jdk1.3), but when i run the following
antmake.sh file (below) i get the corresponding error message (below). 8((

This doesn't happen when i run basically the same script on a windows box.

Anybody face the same issue, or have a workaround?
Thanks.
Anuj.

====== antmake.sh file ======
export ANT_HOME=/export/home/www/framework/buildtools/jakarta-ant-bin
export
CLASSPATH=$ANT_HOME/lib/ant.jar;$ANT_HOME/lib/optional.jar;$ANT_HOME/lib/jaxp.jar;$ANT_HOME/lib/parser.jar;/export/hom

e/www/framework/buildtools/lib/tools.jar

/opt/j2se/bin/java -Dant.home=$ANT_HOME org.apache.tools.ant.Main $1 $2 $3 $4 $5
$6 $7 $8 $9

====== output of executing antmake.sh  ======
Failed to load Main-Class manifest attribute from
/export/home/www/framework/buildtools/jakarta-ant-bin/lib/optional.jar
Failed to load Main-Class manifest attribute from
/export/home/www/framework/buildtools/jakarta-ant-bin/lib/jaxp.jar
Failed to load Main-Class manifest attribute from
/export/home/www/framework/buildtools/jakarta-ant-bin/lib/parser.jar
Failed to load Main-Class manifest attribute from
/export/home/www/framework/buildtools/lib/tools.jar
Buildfile: build.xml

BUILD FAILED

No JAXP compliant XML parser found. See http://java.sun.com/xml for the
reference implementation.
--- Nested Exception ---
java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:120)
        at org.apache.tools.ant.Main.runBuild(Main.java:402)
        at org.apache.tools.ant.Main.main(Main.java:149)

Re: REPOST: Failed to load Main-Class manifest attribute

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Try a colon separated classpath :-)

----- Original Message -----
From: "Anuj Agrawal" <ag...@lucent.com>
To: <an...@jakarta.apache.org>
Sent: Wednesday, May 02, 2001 11:26 PM
Subject: REPOST: Failed to load Main-Class manifest attribute


> Hi folks -
>
> i'm running ant 1.3 on solaris 8 (with jdk1.3), but when i run the
following
> antmake.sh file (below) i get the corresponding error message (below).
8((
>
> This doesn't happen when i run basically the same script on a windows
box.
>
> Anybody face the same issue, or have a workaround?
> Thanks.
> Anuj.
>
> ====== antmake.sh file ======
> export ANT_HOME=/export/home/www/framework/buildtools/jakarta-ant-bin
> export
>
CLASSPATH=$ANT_HOME/lib/ant.jar;$ANT_HOME/lib/optional.jar;$ANT_HOME/lib/ja
xp.jar;$ANT_HOME/lib/parser.jar;/export/hom
>
> e/www/framework/buildtools/lib/tools.jar
>
> /opt/j2se/bin/java -Dant.home=$ANT_HOME org.apache.tools.ant.Main $1 $2
$3 $4 $5
> $6 $7 $8 $9
>
> ====== output of executing antmake.sh  ======
> Failed to load Main-Class manifest attribute from
> /export/home/www/framework/buildtools/jakarta-ant-bin/lib/optional.jar
> Failed to load Main-Class manifest attribute from
> /export/home/www/framework/buildtools/jakarta-ant-bin/lib/jaxp.jar
> Failed to load Main-Class manifest attribute from
> /export/home/www/framework/buildtools/jakarta-ant-bin/lib/parser.jar
> Failed to load Main-Class manifest attribute from
> /export/home/www/framework/buildtools/lib/tools.jar
> Buildfile: build.xml
>
> BUILD FAILED
>
> No JAXP compliant XML parser found. See http://java.sun.com/xml for the
> reference implementation.
> --- Nested Exception ---
> java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:120)
>         at org.apache.tools.ant.Main.runBuild(Main.java:402)
>         at org.apache.tools.ant.Main.main(Main.java:149)
>


Re: REPOST: Failed to load Main-Class manifest attribute

Posted by Anuj Agrawal <ag...@lucent.com>.
sheesh! I must be blind! 8((
Thanks a bunch.
Anuj.

Jason Crickmer wrote:

> Try using colons in your classpath instead of semi-colons.  Windows/DOS
> uses the semi-colon as a separator, but sh, bash, and tcsh use the
> colon.


re: REPOST: Failed to load Main-Class manifest attribute

Posted by Jason Crickmer <jc...@hire.com>.
Try using colons in your classpath instead of semi-colons.  Windows/DOS
uses the semi-colon as a separator, but sh, bash, and tcsh use the
colon.

Hoep this helps,
Jason

Anuj Agrawal writes:
> Hi folks -
> 
> i'm running ant 1.3 on solaris 8 (with jdk1.3), but when i run the following
> antmake.sh file (below) i get the corresponding error message (below). 8((
> 
> This doesn't happen when i run basically the same script on a windows box.
> 
> Anybody face the same issue, or have a workaround?
> Thanks.
> Anuj.
> 
> ====== antmake.sh file ======
> export ANT_HOME=/export/home/www/framework/buildtools/jakarta-ant-bin
> export
> CLASSPATH=$ANT_HOME/lib/ant.jar;$ANT_HOME/lib/optional.jar;$ANT_HOME/lib/jaxp.jar;$ANT_HOME/lib/parser.jar;/export/hom
> 
> e/www/framework/buildtools/lib/tools.jar
> 
> /opt/j2se/bin/java -Dant.home=$ANT_HOME org.apache.tools.ant.Main $1 $2 $3 $4 $5
> $6 $7 $8 $9
> 
> ====== output of executing antmake.sh  ======
> Failed to load Main-Class manifest attribute from
> /export/home/www/framework/buildtools/jakarta-ant-bin/lib/optional.jar
> Failed to load Main-Class manifest attribute from
> /export/home/www/framework/buildtools/jakarta-ant-bin/lib/jaxp.jar
> Failed to load Main-Class manifest attribute from
> /export/home/www/framework/buildtools/jakarta-ant-bin/lib/parser.jar
> Failed to load Main-Class manifest attribute from
> /export/home/www/framework/buildtools/lib/tools.jar
> Buildfile: build.xml
> 
> BUILD FAILED
> 
> No JAXP compliant XML parser found. See http://java.sun.com/xml for the
> reference implementation.
> --- Nested Exception ---
> java.lang.ClassNotFoundException: javax.xml.parsers.SAXParserFactory
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:120)
>         at org.apache.tools.ant.Main.runBuild(Main.java:402)
>         at org.apache.tools.ant.Main.main(Main.java:149)