Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Class not found errors for running code#60900

Unanswered
edhgoose asked this question inQ&A
Discussion options

Hi,

We are seeing a really bizarre problem where we frequently get errors saying a class cannot be found. It's often as part of a Symfony Command, but not always.

It isn't unique to one specific class, it covers lots of classes and never the same ones.

e.g. here's a couple of different snippets of stack traces:

Error: Class "Doctrine\Common\Collections\ArrayCollection" not found#43 /vendor/doctrine/orm/src/AbstractQuery.php(176): Doctrine\ORM\AbstractQuery::__construct#42 /vendor/doctrine/orm/src/EntityManager.php(337): Doctrine\ORM\EntityManager::createQuery#41 /var/cache/prod/ContainerFgpM7ZD/EntityManager_9a5be93.php(65): ContainerFgpM7ZD\EntityManager_9a5be93::createQuery#40 /src/Nora/ReferralBundle/Entity/Repository/MerchantRepository.php(427): Nora\ReferralBundle\Entity\Repository\MerchantRepository::findByPartnerCode...
Error: Class "Symfony\Component\Validator\Validator\RecursiveValidator" not found#35 /vendor/symfony/symfony/src/Symfony/Component/Validator/ValidatorBuilder.php(423): Symfony\Component\Validator\ValidatorBuilder::getValidator#34 /var/cache/prod/ContainerFgpM7ZD/AppKernelProdContainer.php(991): ContainerFgpM7ZD\AppKernelProdContainer::get_Container_Private_ValidatorService#33 /var/cache/prod/ContainerFgpM7ZD/getIntegrationLogsPersister2Service.php(30): ContainerFgpM7ZD\getIntegrationLogsPersister2Service::do#32 /var/cache/prod/ContainerFgpM7ZD/AppKernelProdContainer.php(582): ContainerFgpM7ZD\AppKernelProdContainer::load#31 /var/cache/prod/ContainerFgpM7ZD/getBufferedIntegrationLogsPersisterService.php(25): ContainerFgpM7ZD\getBufferedIntegrationLogsPersisterService::do#30 /var/cache/prod/ContainerFgpM7ZD/AppKernelProdContainer.php(582): ContainerFgpM7ZD\AppKernelProdContainer::load#29 /var/cache/prod/ContainerFgpM7ZD/AppKernelProdContainer.php(2027): ContainerFgpM7ZD\AppKernelProdContainer::{closure:ContainerFgpM7ZD\AppKernelProdContainer::getEventDispatcherService():2026}....

We're running PHP 8.4.6, but have seen it on PHP 8.2.28 too. We're using Symfony 5.4.47.

We can't reproduce the problem locally.

The really confusing thing is that this command, on this machine, may have run multiple times before the failure occurs. The machines are running on AWS Elastic Container Service and so are self scaling up and down regularly (i.e. we're regularly replacing the physical VM). I had assumed it might be something to do with when the instance first starts, but it doesn't appear to be the case - it can be after multiple successful runs it fails.

I am struggling to know where to begin - does anyone have any suggestions on how I'd figure this one out?

Thanks,
Ed

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@edhgoose

[8]ページ先頭

©2009-2025 Movatter.jp