Sounds like you're not clearing (setting all values to a clip-far value) your shadow map before rendering.
Finally I found it.
From MSDN:
IDirect3DDevice9::Clear will fail if you:
1-Try to clear either the depth buffer or the stencil buffer of a render target that does not have an attached depth buffer.
2-Try to clear the stencil buffer when the depth buffer does not contain stencil data.
Mine was case 2.

Find content
Not Telling