Problem upgrading from 7.22
I was experiencing this problem on two different test servers (different Debian and PHP versions) using data imported from our production server. All of the cache tables were emptied first, and I did try reinstalling Drupal using various methods. Couldn't find a solution anywhere.

What finally fixed it for me was emptying the registry and registry_file tables, then running update.php.  (Update didn't find any database changes, but it reset the registry - clearing the cache may have worked as well.)

Hope this helps someone - this problem was driving me crazy for two days.