PURPOSE: This randomized phase II trial is studying docetaxel to see how well it works compared with docetaxel given together with vandetanib in treating patients with metastatic stomach cancer or gastroesophageal junction cancer.