Hi..,
This solution is specific for Sun App Server-8. To solve this exception " javax.naming.NoInitialContextException ", you have to specify a resource for java.naming.factory.initial
To do that just add appserv-rt.jar in the Sun\AppServer\lib folder to your classpath.
This jar has jndi.properties file, which specifies the value for
java.naming.factory.initial.
If you are using some other server, just find the jndi.properties file and add it to your classpath.., that'll solve ur problem.
Hope this helps...