After restoring content database, we were
getting 404 error into one of the web front server. We all were surprised to
see this error because we followed same exact steps for restoring content database. We have found issue is related to web front
end server caching.
Here is very good link which is talking about
issue and how to resolve this issue : http://myspworld.wordpress.com/2012/02/06/unexpected-system-nullreferenceexception/