It was my understanding that the Hamiltonian formalism was inadequate to describe systems that are invariant under time reparametrization or that have gauge symmetries.
However, I see in Classical Dynamics by Jorge V. José and Eugene J. Saletan, that both a relativistic particle and a particle under an electromagnetic potential are described using the Hamilton-Jacobi formalism, dealing the right equations of motion.
I wonder why does this work: Are there systems that can be treated with by Hamilton-Jacobi formalism but yield false results when treated by Hamilton? Is there a way to adequately treat systems with the mentioned invariances through Hamiltonian mechanics? If so, are their Hamiltonians always of the form $H=T+V$?