Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony: Property does not exist - 500 Internal Server Error - ReflectionException

I removed $hearAboutIndustry from the entity and now getting error below only in production server, not on local and staging server! Any idea why or solution?

Property Tete\AdminBundle\Entity\Customer::$hearAboutIndustry does not exist
500 Internal Server Error - ReflectionException

config_prod.yml

doctrine:
    orm:
        metadata_cache_driver: apc
        result_cache_driver: apc
        query_cache_driver: apc

What I have do to solve it so far:

  • Removed getter and setters from the entity.
  • Deleted whole cache and logs folders and re-created back, inc 777.
  • Just in case run cache:clear --env=prod
  • Searched hearAboutIndustry in all directories/files of the project. No reference at all.
  • Run doctrine:schema:update. DB is updated.
  • Run doctrine:generate:entities. Entity is updated.
  • app/console doctrine:cache:clear-metadata
  • app/console doctrine:cache:clear-query
  • app/console doctrine:cache:clear-result
like image 691
BentCoder Avatar asked Oct 27 '14 18:10

BentCoder


1 Answers

As Adam suggested above in comment, we better restart apache if all the above solutions have been tried and getting no success. The solution is:

sudo apachectl graceful

like image 198
BentCoder Avatar answered Oct 10 '22 02:10

BentCoder