我有一个树型实体,在“嵌套”树类型中配置了注释。
我激活了PHP5.5 APCu扩展,过了一段时间,一个奇怪的异常被抛出:ORM TreeListener does not support tree type: (在“type:”之后没有任何异常)
该网站运行良好的几个小时后,这一点。
如果我清除了APCu缓存,那么所有这些都可以正常工作几个小时。
下面是堆栈跟踪:
Stacktrace (most recent call first):
File "[...]/vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/TreeListener.php", line 84, in getStrategy
throw new \Gedmo\Exception\InvalidArgumentException($managerName." TreeListener does not support tree type: {$config['strategy']}");
File "[...]/vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity/Repository/NestedTreeRepository.php", line 846, in validate
return $this->listener->getStrategy($this->_em, $this->getClassMetadata()->name)->getName() === Strategy::NESTED;
File "[...]/vendor/gedmo/doctrine-extensions/lib/Gedmo/Tree/Entity/Repository/AbstractTreeRepository.php", line 52, in __construct
if (!$this->validate()) {
File "[...]/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php", line 689, in getRepository
$repository = new $repositoryClassName($this, $metadata);
File "[...]/app/cache/prod/jms_diextra/doctrine/EntityManager_520e1bbfadf9e.php", line 180, in getRepository
$repository = $this->delegate->getRepository($className);
File "[...]/src/Mapado/ActivityFrontBundle/Controller/ActivityController.php", line 85, in viewAction
$rubricRepo = $this->getDoctrine()->getManager('rubric')->getRepository('MapadoRubric:Rubric');
File "[...]/app/bootstrap.php.cache", line 2805, in handleRaw
$response = call_user_func_array($controller, $arguments);
File "[...]/app/bootstrap.php.cache", line 2779, in handle
return $this->handleRaw($request, $type);
File "[...]/app/bootstrap.php.cache", line 2908, in handle
$response = parent::handle($request, $type, $catch);
File "[...]/app/bootstrap.php.cache", line 2210, in handle
return $this->getHttpKernel()->handle($request, $type, $catch);
File "[...]/web/app.php", line 22, in null
$response = $kernel->handle($request);你有什么提示可以帮我解决这个问题吗?
谢谢
发布于 2013-08-28 14:56:57
面临着同样的问题。请参见此https://github.com/krakjoe/apcu/issues/35将选项apc.serializer设置为php
https://stackoverflow.com/questions/18309583
复制相似问题