TITLE: $I\cdot J$ principal implies $I$ and $J$ principal?
QUESTION [6 upvotes]: Let $R$ be a Noetherian domain, and let $I$ and $J$ be two ideals of $R$ such that their product $I\cdot J$ is a non-zero principal ideal. Is it true that $I$ and $J$ are principal ideals ? This seems an easy question to settle, but I can't find an answer.
Any idea is welcome, thanks !

Thanks a lot for your enlightening answers. I admit I'm more interested in a geometric setting (i.e. when $R$ is an algebra, finitely generated, or a localization of that). I fail to adapt examples coming from number theory to this setting. What do you think ?

REPLY [8 votes]: At Lierre's request ,  here is a geometric example.  
Consider an elliptic curve $\bar E$ (say over $\mathbb C$), a point $P\in \bar E$  of  order $2$ in the group $\bar E(\mathbb C)$ (there are 3 such) and the complement $E=\bar E \setminus \lbrace O\rbrace $ of the origin in $\bar E$.
Like all non complete integral curves $E$ is affine, with ring $R=\Gamma (E, \mathcal O_E)$.
The ideal $I=\mathfrak m_P\subset R$ of functions vanishing at $P$ is not principal because $\mathcal O_E(-P)$ is a non-trivial line bundle (use Abel-Jacobi's theorem).
However $I^2=\mathfrak m_P^2$ is principal because the line bundle $\mathcal O_E(-P)$ has as its square $\mathcal O_E(-2P)=\mathcal O_E(0)=\mathcal O_E= $ the trivial line bundle, so that $I$ is an example of non-principal ideal with $I\cdot I$ principal.