PURPOSE: This phase I/II trial is studying the side effects and best dose of erlotinib when given together with docetaxel in treating patients with solid tumors and to see how well they work in treating patients with advanced non-small cell lung cancer. (Phase I portion of the study treating patients with any solid tumor was completed as of 12/01/2004)