This article presents the numerical eigensolver to find the resonant frequencies of 3-D closed cavity resonators filled with both electric and magnetic lossy, anisotropic media. By introducing a dummy variable with zero value in the 3-D linear vector Maxwell eigenvalue problem for the electric field, we enforce the divergence-free condition for electric flux density in a weak sense. In addition, by introducing a dummy variable with constant value in the 3-D linear vector Maxwell eigenvalue problem for the magnetic field, we enforce the divergence-free condition for magnetic flux density in a weak sense. Moreover, it is theoretically proved that the novel method of introducing dummy variables can be free of all the spurious modes in solving eigenmodes of the 3-D closed cavity problem. Numerical experiments show that the numerical eigensolver supported by this article can eliminate all the spurious modes, including spurious dc modes.