Analytic integrability of Hamiltonian systems with exceptional potentials