Planck, in his treatment to solve blackbody radiation, considered that the electromagnetic waves inside the cavity of the blackbody are standing waves due to oscillating charges on the wall of the cavity. At equilibrium, the frequency of oscillation of the oscillating charge is equal to the frequency of the electromagnetic wave produced by it i.e. at equilibrium, energy of the oscillating charge is equal to the energy of the produced electromagnetic wave.
He proposed that, the energy of the oscillating charge is integral multiple of $h\nu$ i.e. $\epsilon_n=nh\nu$ where $n=0,1,2,3,4,...$
According to this, radiation energy density per unit volume is $$u(\nu)d\nu=\frac{8\pi \nu^2}{c^3}\left(\frac{h\nu}{e^{\frac{h\nu}{k_BT}}-1}\right)d\nu$$ but we know that quantum harmonic oscillators have energy $\epsilon_n=(n+\frac{1}{2})h\nu$** where n=0,1,2,3,4,...
If we consider this $\epsilon_n=(n+\frac{1}{2})h\nu$, then the average energy per vibrational mode becomes $$\left<E\right>=\frac{\sum_0^\infty(n+\frac{1}{2})h\nu \ e^{-\frac{(n+\frac{1}{2})h\nu}{k_BT}}}{\sum_0^\infty e^{-\frac{(n+\frac{1}{2})h\nu}{k_BT}}}=\frac{h\nu}{2}\left(1+\frac{2}{e^{\frac{h\nu}{k_BT}}-1}\right) \, .$$
From this, the radiation energy per volume becomes $$u(\nu)d\nu=\frac{4\pi h\nu^3}{c^3}\left(1+\frac{2}{e^{\frac{h\nu}{k_BT}}-1}\right)d\nu \, .$$
If we plot these $u(\nu)$ vs $\nu$, we get this plot
which shows that energy distribution for $\epsilon_n=(n+\frac{1}{2})h\nu$ results in ultraviolet catastrophe i.e. it is impossible!
Then, are not the oscillating charges on the wall of the cavity supposed to be quantum harmonic oscillators?