Illegal argument exception in client constructor