do you use Weblogic?
If yes - then this is a Weblogic issue which you may fix in Weblogic admin console ->Domain->Web Applications - click the checkbox "Archived Real Path Enabled".
See: http://ananthkannan.blogspot.com/2009/12/servletcontextgetrealpath-returns-null.html