It's what the exception says it is: the named class cannot be found by the program within the context of being run in the IDE. Find out what jar(s) you need and add them to the classpath of the client program. And to find out what jar(s) you need, google "com.sun.appserv.naming.S1ASCtxFactory jar" and read the very first hit.
[Message sent by forum member 'matterbury' (matterbury)]
http://forums.java.net/jive/thread.jspa?messageID=348189