Related: Poisson brackets of angular momentum
When Poisson Brackets are taught as part of an Analytical Mechanics courses, examples are commonly shown which anticipate analogue results in QM. One such example, which the the book I'm using ([1]) shows, is that since the components of the angular momentum vector $L$ obey the relation
$$\displaystyle [L_i,L_j] = \epsilon_{ijk}L_k \tag{1},$$
they obviously do not obey the canonical variable relations $[p_i,p_j] = 0$ and therefore no two components of $L$ can serve as canonical variables at the same time. It then goes on to show that $L^2$ commutes with $L_i$, so that this pair can be used as canonical variables. An analogue result is standard QM fare about commutation relations and observation.
I seem to have found a counter-example. If we write The hamiltonian for a free particle, by starting with the Lagrangian in spherical coordinates $(r,\theta,\phi)$, we end up with
$$\displaystyle H=\frac{{p_r}^2}{2 m}+\frac{{p_\theta}^2}{2 m r^2}+\frac{{p_\phi}^2}{2 m r^2 \sin ^2(\theta )}$$
with generalized momenta
$$\displaystyle p_r= m\dot{r},\quad p_\theta=m r^2 \dot{\theta},\quad p_\phi=m (r \sin (\theta))^2 \dot{\phi}$$
It's easy to see from the definition that $$p_\phi=L_z\quad\text{and} \quad p_\theta= L_x.$$ This looks like a counterexample. I did not arrive at this hamiltonian through a canonical transformation, but it is a "legal" hamiltonian and two of the canonical variables/momenta are two components of $L$, contradicting the claim above.
As an additional quandary, the book shows that Poisson Brackets are canonical invariants, i.e. preserved under canonical transformations, but when I calculated $[L_x,L_z]$ in Cartesian coordinates, I got the result $[L_x,L_z]-L_y$ as (1) suggests, and when I calculated $[L_x,L_z]$ in the phase space of spherical coordinates I got the result $[p_\theta,p_\phi]=0$ as I'd expect from a pair of canonical variables..
These results seem to contradict one another. What's the explanation?
[1] Hamill, Patrick. "Student's Guide to Lagrangians and Hamiltonians", p.130.