OroPlatform Forums

Covering OroPlatform topics, including community updates and company announcements.

Forums Forums OroPlatform OroPlatform – Programming Questions Unknown Entity namespace alias 'InventoryBundle'

This topic contains 3 replies, has 2 voices, and was last updated by  kiatsiong.ng 5 years, 1 month ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #38195

    kiatsiong.ng
    Participant

    I’m a noob on Symfony and OroPlatform. I am following the guide Creating a Simple CRUD. After creating all the files on OroPlatform and refresh the cache, I have this exception Unknown Entity namespace alias ‘InventoryBundle’.

    Stack trace:

    Doctrine\ORM\ORMException:
    Unknown Entity namespace alias ‘InventoryBundle’.

    at vendor\doctrine\orm\lib\Doctrine\ORM\ORMException.php:286
    at Doctrine\ORM\ORMException::unknownEntityNamespace(‘InventoryBundle’)
    (vendor\oro\platform\src\Oro\Bundle\EntityBundle\ORM\Registry.php:100)
    at Oro\Bundle\EntityBundle\ORM\Registry->getAliasNamespace(‘InventoryBundle’)
    (vendor\oro\platform\src\Oro\Bundle\EntityBundle\ORM\EntityClassResolver.php:46)
    at Oro\Bundle\EntityBundle\ORM\EntityClassResolver->getEntityClass(‘InventoryBundle:Vehicle’)
    (vendor\oro\platform\src\Oro\Bundle\SecurityBundle\Metadata\AclAnnotationProvider.php:179)
    at Oro\Bundle\SecurityBundle\Metadata\AclAnnotationProvider->loadAnnotations()
    (vendor\oro\platform\src\Oro\Bundle\SecurityBundle\Metadata\AclAnnotationProvider.php:133)
    at Oro\Bundle\SecurityBundle\Metadata\AclAnnotationProvider->warmUpCache()
    (vendor\oro\platform\src\Oro\Bundle\SecurityBundle\Annotation\AclListener.php:38)
    at Oro\Bundle\SecurityBundle\Annotation\AclListener->onKernelRequest(object(GetResponseEvent), ‘kernel.request’, object(TraceableEventDispatcher))
    (vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\WrappedListener.php:104)
    at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), ‘kernel.request’, object(ContainerAwareEventDispatcher))
    (vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php:212)
    at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), ‘kernel.request’, object(GetResponseEvent))
    (vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php:44)
    at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(‘kernel.request’, object(GetResponseEvent))
    (vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher.php:139)
    at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(‘kernel.request’, object(GetResponseEvent))
    (vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:127)
    at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
    (vendor\symfony\symfony\src\Symfony\Component\HttpKernel\HttpKernel.php:68)
    at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
    (vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Kernel.php:200)
    at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
    (public\index_dev.php:32)

    What am I missing? I would appreciate any hint on going about debugging.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #38202

    Andrey Yatsenko
    Moderator

    It’s hard to say without seeing the whole codebase.

    Probably the issue that you have not created a bundle first.
    It is required as everything in Oro works inside bundles (modules) that should be registered to make Symfony know about it.
    follow the guide to create a bundle before creating CRUD.

    Also, it could be a typo in some namespaces or filenames.

    #38216

    kiatsiong.ng
    Participant

    I am trying to start over the problematic bundle by removing the entire /src/InventoryBundle. When I refresh the page, I have this error:

    > (1/1) ClassNotFoundException
    > Attempted to load class “InventoryBundle” from namespace “InventoryBundle”.
    > Did you forget a “use” statement for another namespace?

    Then I refreshed the cache:

    So, how do I start over the VehicleBundle?

    #38241

    kiatsiong.ng
    Participant

    I needed to restart all over from a fresh install and I managed to make it work as documented here.

Viewing 3 replies - 1 through 3 (of 3 total)

The forum ‘OroPlatform – Programming Questions’ is closed to new topics and replies.

Back to top