Hi all I will summarize my problem. We have a class path ref which refers to jboss-all-client jar and other dependent jars. I am using this class path ref in two places In junit task and in my custom task definition The process(lookup) what i do with the classes in jboss-all-client.jar is same in both the places. Junit task works perfectly as i expected. But my custom task throws the below exception
MyTask] javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory (Full trace below) I solved this problem temporarily by adding the jboss-all-client.jar in system classpath variable. Why do i face this problem? whats worng here? when it is working in junit task why not in custom task? Any thing i can do in the custom task do avoid this problem? Please help me on this problem Actually Steve Loughran helped me when i posted this few months back asking me to run my task as seperate process. But i couldnt figure out how to do it. Can any one provide some help on doing this? my old thread : http://marc.info/?l=ant-user&m=119125457910403&w=2 Sorry for another thread on the same problem -- Thank you Ramu S