Post some more of your error from the logs. The "cannot remove directory" bit has nothing to do with your jndi conflict; I redeploy EJBs where it can't remove the temp directories all day long and have no issues.
Also double check that you don't have two of your .ears deployed and that you're not getting any other errors on startup.
Have you found the solution? I have the same problem. And it is really annoying.
ebu, Can you describe your problem fully.
I have the same problem on Windows 2000 and XP,
On Linux everything works fine. Using JDK 1.5
Whenever I try to redeploy an .jar, .ear or .sar on a Windows platform it fails because Windows does not want to overwrite the existing file before JBoss is stopped.
I have no other workaround than using Linux.
... JBoss version 4.0.0