I am find that Server.getAddress() function could not be used.it returns "null" all the time. :(