Resolved.
appserv-rt.jar needs to be added to the class path.because my client app isn't run in the glassfish,so the class path need to be set.that jar provides the naming service.
[Message sent by forum member 'fxbird' (fxbird1978_at_163.com)]
http://forums.java.net/jive/thread.jspa?messageID=366759