An investigation on the resonance frequency shift for a plane-wave mode in a cylindrical cavity produced by a rigid sphere is reported in this paper. This change of the resonance frequency has been previously considered as a cause of oscillational instabilities in single-mode acoustic levitation devices. It is shown that the use of the Boltzmann-Ehrenfest principle of adiabatic invariance allows the derivation of an expression for the resonance frequency shift in a simpler and more direct way than a method based on a Green's function reported in literature. The position of the sphere can be any point along the axis of the cavity. Obtained predictions of the resonance frequency shift with the deduced equation agree quite well with numerical simulations based on the boundary element method. The results are also confirmed by experiments. The equation derived from the Boltzmann-Ehrenfest principle appears to be more general, and for large spheres, it gives a better approximation than the equation previously reported.