A two cocycle is associated to any action of a Lie group on a symplectic manifold. This allows to enlarge the concept of anomaly in classical dynamical systems considered by F Toppan in [J. Nonlinear Math. Phys. 8, Nr. 3 (2001), 518–533] so as to encompass some extensions of Lie algebras related to noncanonical actions.