I have to prove that the following problem $$(P) \begin{cases} -u''-u=1\,\,\,\,\,\,\,\,\text{if}\,\,\, x\in(0,\pi)\\ u(0)=u(\pi)=0 \end{cases} $$ doesn't admit weak solutions.
I'm proceeding by contradiction. Indeed, if $u$ is a weak solution of $(P)$ then, by the Regularity of the weak solution's theorem, $u$ will be also a classical solution of $(P)$, i.e. $u$ is of class $C^2([0,\pi])$ and $u$ satisfies point wise $(P)$.
I can't find a contradiction.
Now that you have proved that every weak solution is a strong solution, you can proceed as follows. Assume that there exists a weak solution, $u$, of your problem. It is simultaneously a strong solution, i.e., in particular, satisfies the equation on $[0,\pi]$. The general solution of this equation is $u=A\sin x+B\cos x-1$. The boundary condition at $x=0$ says that $B=1$, while the boundary condition at $x=\pi$ says that $B=-1$. Thus, you obtain $1=-1$. A contradiction. :)