ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Kumar" <ashutosh.ku...@ionidea.com>
Subject RE: calling ant from java program
Date Fri, 10 Sep 2004 12:40:12 GMT
I am trying to send email from ant. It sends mail but says failed to
initialize  mime type. Even thoughI receive mail , I does not contain
message, only subject is there.
Regds
Ashutosh

-----Original Message-----
From: Olivier Croisier [mailto:Olivier.Croisier@thales-is.com] 
Sent: Friday, August 27, 2004 2:26 PM
To: Ant Users List
Subject: Re: calling ant from java program

> What may be the reason of  project.executetarget throwing nullpointer
> exception?
> regds

Hi

My first idea was that this exception could get thrown if you call the
executeTarget method with a null argument, but this error seems to be
already managed by the BuildException (@see ant javadoc).

[ executeTarget ]
public void executeTarget(java.lang.String targetName) throws
BuildException
Executes the specified target and any targets it depends on.
Parameters:
	targetName - The name of the target to execute. Must not be
null.
Throws:
	BuildException - if the build failed



So... Another answer would be : your "NullPointerException" occurs if
your Project object is null (java obviously can't call the
"executeTarget" method on a null Project object). Check if your Project
is initialized.

Third clue : the "test_config" string you give as an argument is a valid
String, but its contents may cause an error somewhere in the
executeTarget process, for example if this isn't a valid target name.
Or if the target is only defined as an internal target (no "description"
for it) : I don't know if executeTarget sees them.


best regs


-- 
CROISIER Olivier
Software Engineer
Thales IS - ANS
olivier.croisier@thales-is.com

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message