Bug 29178 - InstantiationException with Ant 1.6.1 not with Ant 1.5.4
Summary: InstantiationException with Ant 1.6.1 not with Ant 1.5.4
Status: RESOLVED INVALID
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.6.1
Hardware: PC other
: P3 minor (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-24 12:39 UTC by Adrien Meaudre
Modified: 2008-02-22 12:18 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien Meaudre 2004-05-24 12:39:38 UTC
Trying to launch ant 1.6.1 I have an InstantiationException reported (see the 
stack trace below).
java.lang.InstantiationException: org.apache.tools.ant.Main
        at java.lang.Class.newInstance0(Class.java:291)
        at java.lang.Class.newInstance(Class.java:259)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:56)

Simply back to an older release (Ant 1.5.4 for example), everything run fine.

I'm sure it's a Java environment issue on my computer but I can't see it (JDK 
release, CLASSPATH definition, something else). Have you any information about 
that ? I'm using JDK 1.4.1.
Comment 1 Erwan Le Bras 2004-06-01 09:21:40 UTC
I have faced this pb with Ant 1.6.1 as well
Could workaround it by adding %ANT_HOME%\lib to my CLASSPATH environment 
variable

Comment 2 Richard Gill 2004-06-25 13:33:20 UTC
Which jar files do you add to your CLASSPATH?

I'm encountering the same problem with the 1.6.1 build (I haven't tried
compiling from source - yet). I'm using a Windows 2000 service pack 4 on a DELL
Pentium 4 2.0GHz with 1G of RAM. ANT_HOME is set to
C:\Programs\Ant\apache-ant-1.6.1 and JAVA_HOME is set to C:\J2sdk1.4.2.
Additionally, my CLASSPATH includes %JAVA_HOME%\lib\tools.jar;

Everything works fine with earlier builds on this machine.

LAST NOTE: I also own a Mac G4 dual 1GHz processor running OSX 10.3.4 and have
ant1.6.1 installed on this machine. This version of Ant runs without any
problems on my Mac. Leading me to suspect that the problem is with the build.
Comment 3 Peter Reilly 2004-09-08 10:09:14 UTC
The cause of this problem is normally an old ant.jar or weblogic.jar in
the classpath. I have added an entry in the FAQ.
One does *NOT* work around this by adding $ANT_HOME/lib to the
classpath.

Try unsetting the CLASSPATH and calling ant -version.