ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "matus.majchrak" <matus.majch...@gmail.com>
Subject how to define JNDI props, ant failed to find them when runnin ant task
Date Mon, 17 Sep 2007 14:25:56 GMT

Greetings,

I have a simple Ant Task, which looks up EJB in it. 
it works when i run it via Eclipse IDE >run as java app but whne i try to
run it via Ant it gives an NoInitialContextException. Folder structure is
like this 
-root
-root/lib
-root/execute.xml

lib folder conatins all the neccesary jar files, this is not a problem Ant
can find all the needed classes. The particular Ant Task clas is in
-root/lib/Myclient.jar which has this structure:
-Myclient.jar/myPackage/MyAntTask.class
-Myclient.jar/jndi.properties

Ant succesfuly finds the task and runs it, but when it comes to 'ic = new
InitialContext();'  it throws an  javax.naming.NoInitialContextException:
Need to specify class name in environment or system property, or as an
applet parameter, or in an application resource file: 
java.naming.factory.initial

but the jndi.properties fiels provided is correct, as  I mentioned It works
when i run it from IDE. But somehow Ant doesnt not recognise it 
Any help would be very appreciated.Thanks Matus

 
-- 
View this message in context: http://www.nabble.com/how-to-define-JNDI-props%2C-ant-failed-to-find-them-when-runnin-ant-task-tf4467155.html#a12736986
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Mime
View raw message