We analyze the classical Merton's portfolio optimization problem when the risky asset follows an exponential Ornstein-Uhlenbeck process, also known as the Schwartz mean-reversion dynamics. The corresponding Hamilton-Jacobi-Bellman equation is a two-dimensional nonlinear parabolic partial differential equation. We produce an explicit solution to this equation by reducing it to a simpler one-dimensional linear parabolic equation. This reduction is achieved through a Cole-Hopf type transformation, recently introduced in portfolio optimization theory by Zariphopoulou . A verification argument is then used to prove that this solution coincides with the value function of the control problem. The optimal investment strategy is also given explicitly. On the technical side, the main problem we are facing here is the necessity to identify conditions on the parameters of the control problem ensuring uniform integrability of a family of random variables that roughly speaking are the exponentials of squared Wiener integrals.