There are several problems with this integral, all stemming from the incompatibility of the matrix formalism with the old picture of orbits. Which period T should be used? Semiclassically, it should be either m or n, but the difference is order ħ, and an answer to order ħ is sought. The quantum condition tells us that J mn is 2π n on the diagonal, so the fact that J is classically constant tells us that the off-diagonal elements are zero.