Why does the classical continuous partition function blow up as $T \to 0$? At $T = 0$, we'd expect Entropy to be zero because there's only one microstate and the $\log(1) = 0$. However, when I take the limit as $T \to 0$ in the classical canonical ensemble, it goes to infinity.
For example, say we have the Hamiltonian of a simple harmonic oscillator:
$$
\mathscr{H} = \frac{p^2}{2m} + \frac{m \omega^2x^2}{2}
$$
with the partition function defined as:
\begin{equation}
   Z = \frac{1}{N! \hbar^{3N}} \int_{-\infty}^{\infty} \int_{-\infty}^{\infty}   e^{-\beta \mathscr{H}(p, x)_j} dp dx
\end{equation}
we end up getting
$$
Z = \frac{k_b T}{\hbar \omega}
$$
and we can evaluate the entropy using:
$$
S = k_b \ln{Z} + k_b T \frac{\partial \ln{Z}}{\partial T}
$$ 
The term $\ln{Z}$ is bothering me because
$$
\ln{\frac{k_b T}{\hbar \omega}}
$$
goes to -infinity as $T\to 0$, whereas I'd expect $S \to 0$ as $T \to 0$. What am I missing here?
 A: Your treatment of the system is purely classical and this prevents the possibility of obtaining a result consistent with the third principle of thermodynamics. A symptom of what is going wrong with classical statistical mechanics is that for a system of $N$ harmonic oscillators, equipartition theorem provides an average energy of $Nk_BT$. Therefore, the specific heat would be independent on temperature. However such a result is incompatible with the possibility of getting a finite value for the entropy at $T=0$:
$$
S(T) - S(0) = \int_0^T dT^{\prime} \frac{Nk_B}{T^{\prime}}
$$
diverges logarithmically at $T=0$, consistently with the direct calculation you reported.
A quantum treatment of the system solves the problem since the spacing between energy levels of the harmonic oscillator implies that below a temperature of the order of $\hbar \omega / k_B$ there is an progressive reduction of the specific heat, which goes to zero at $T=0$, thus eliminating the divergence of entropy and restoring the third principle.
