BentCoder
BentCoder

Reputation: 12740

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:

Upvotes: 7

Views: 7865

Answers (5)

František Heča
František Heča

Reputation: 425

We had the same issue and in our case (Nginx), the restart of Nginx didn't help.

But restart of memcache was the right solution:

sudo service memcached restart

Upvotes: 0

lsd
lsd

Reputation: 670

I had similar problem, I just used doctrine:mapping:import and that was it.

Cheers

Upvotes: 0

Couru d'avance
Couru d'avance

Reputation: 51

  • php app/console doctrine:cache:clear-query --env=prod

Clearing ALL Query cache entries

  • php app/console doctrine:cache:clear-result --env=prod

Clearing ALL Result cache entries

  • php app/console doctrine:cache:clear-metadata --env=prod

Clearing ALL Metadata cache entries

  • php app/console cache:clear --env=prod

Clearing the cache for the prod environment with debug false

And don't forget to put --env=prod to your commands

Upvotes: 5

Ammar
Ammar

Reputation: 1

"Old but still happens" If none of the solutions mentioned above worked try to delete the Entity cache file manually : (e.g Entity costumer cache file path should be this one)

projectdirectory\projectname\var\cache{dev or prod}\jms_serializer\Tete-AdminBundle-Entity-Customer.cache.php

Upvotes: 0

BentCoder
BentCoder

Reputation: 12740

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

Upvotes: 7

Related Questions