Been bit by this a couple of times now. It’s really a problem with a bad route. In my case I had some ajax using the FOSJsRoutingBundle to generate a route along the lines of:
Routing.generate('some_titles', {id: $(this).val()});
where val() was actually returning an empty string. The resulting URL (“some//titles”) was invalid, looks to JMSSerializer like a resource thanks to the double slash, and badda bing badda boom: completely irrelevant error.
I think this may also be the source of “Cannot redeclare class Doctrine\ORM\Mapping\Annotation
” errors to boot. Double whammy.
Im thankful for the post. Great.