Jonas T already hit on the important point that for the first integral to be defined, $f$ must be in $L^1$. Similarly, for the second integral to be defined, $\hat{f}$ must be in $L^1$.
Fabian has mentioned that the Fourier tranform can be generalized even beyond $L^2$. But if you're only concerned with $L^2$, then one way to define the Fourier transform is to first show that it defines an isometric (with respect to the $L^2$ norm) isomorphism on the Schwartz space, which is dense in $L^2$, and then take the unique extension to all of $L^2$. The fact that the Fourier transform defines an isometry with dense range on a dense subspace of $L^2$, and thus has a unique extension to a unitary operator on $L^2$, is known as Plancherel's theorem. I have only mentioned one approach, which is the one I learned from Chapter 10 of J.B. Conway's A course in functional analysis.
So the answer to your final question, at least restricted to $L^2$, is that every element of $L^2\setminus L^1$ provides an example, strictly speaking. However, you can show that $\frac{1}{\sqrt{2\pi}}\int_{-R}^R f(x)e^{-i\omega x}dx$ converges to $\hat{f}(\omega)$ in $L^2$ norm as $R\to\infty$, and similarly $\frac{1}{\sqrt{2\pi}}\int_{-R}^R \hat{f}(\omega)e^{i\omega x}dx$ converges to $f(x)$ in $L^2$ norm as $R\to\infty$. I don't have a reference to a proof handy, but this and more is summarized in the Springer online encyclopedia's article on the Fourier transform, which includes helpful references and links.