douni9620 2015-08-14 14:01
浏览 42

在链配置的命名空间中找不到类XXX

In production I've got this error : The class 'Generic\UserBundle\Entity\Session' was not found in the chain configured namespaces

When checking my entities with php app/console doctrine:mapping:info this is what I get

dev:

Found 18 mapped entities:

[OK]   App\AdminBundle\Entity\ArticleOpen
[OK]   App\AdminBundle\Entity\ModuleQuote
[OK]   App\AdminBundle\Entity\Comment
[OK]   App\AdminBundle\Entity\ModuleVideo
[OK]   App\AdminBundle\Entity\ModuleGallery
[OK]   App\AdminBundle\Entity\ArticlesUsers
[OK]   App\AdminBundle\Entity\ModuleText
[OK]   App\AdminBundle\Entity\User
[OK]   App\AdminBundle\Entity\Story
[OK]   App\AdminBundle\Entity\ModuleTitle
[OK]   App\AdminBundle\Entity\ModuleGalleryPicture
[OK]   App\AdminBundle\Entity\ModulePicture
[OK]   App\AdminBundle\Entity\Category
[OK]   App\AdminBundle\Entity\Group
[OK]   App\AdminBundle\Entity\Article
[OK]   Generic\UserBundle\Entity\Session
[OK]   FOS\UserBundle\Model\User
[OK]   FOS\UserBundle\Model\Group

prod

Found 17 mapped entities:
[OK]   App\AdminBundle\Entity\ModulePicture
[OK]   App\AdminBundle\Entity\Group
[OK]   App\AdminBundle\Entity\ArticlesUsers
[OK]   App\AdminBundle\Entity\Story
[OK]   App\AdminBundle\Entity\ModuleTitle
[OK]   App\AdminBundle\Entity\Category
[OK]   App\AdminBundle\Entity\ArticleOpen
[OK]   App\AdminBundle\Entity\ModuleQuote
[OK]   App\AdminBundle\Entity\Article
[OK]   App\AdminBundle\Entity\ModuleGalleryPicture
[OK]   App\AdminBundle\Entity\Comment
[OK]   App\AdminBundle\Entity\ModuleGallery
[OK]   App\AdminBundle\Entity\ModuleVideo
[OK]   App\AdminBundle\Entity\ModuleText
[OK]   App\AdminBundle\Entity\User
[OK]   FOS\UserBundle\Model\User
[OK]   FOS\UserBundle\Model\Group

As you can see the entity Generic\UserBundle\Entity\Session is missing in production. Ive checked the bundle is registered in appKernel and not under the 'dev' section. I've also check the path for typo having case sensitive content in some files/folder but everything seems fine.

Another fact worth mentioning is, I've manually copied this bundle from another project I didn't used the console to generate it so I might have forgot something. The missing entity is the only one on that bundle so it is possible that the whole bundle is wrong not just this entity (but at the same time how can it work in dev mode ?)

Thank you

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 win11 23H2删除推荐的项目,支持注册表等
    • ¥15 matlab 用yalmip搭建模型,cplex求解,线性化处理的方法
    • ¥15 qt6.6.3 基于百度云的语音识别 不会改
    • ¥15 关于#目标检测#的问题:大概就是类似后台自动检测某下架商品的库存,在他监测到该商品上架并且可以购买的瞬间点击立即购买下单
    • ¥15 神经网络怎么把隐含层变量融合到损失函数中?
    • ¥15 lingo18勾选global solver求解使用的算法
    • ¥15 全部备份安卓app数据包括密码,可以复制到另一手机上运行
    • ¥20 测距传感器数据手册i2c
    • ¥15 RPA正常跑,cmd输入cookies跑不出来
    • ¥15 求帮我调试一下freefem代码