A federal judge on Thursday dismissed Exxon Mobil Corp's lawsuit seeking to stop New York and Massachusetts from probing whether the company misled investors and the public about climate change and the potential effects on its business.