Note that there are some explanatory texts on larger screens.

plurals
  1. POsymfony2 is not a valid entity or mapped super class
    primarykey
    data
    text
    <p>I have a symfony2 app, in my local pc with ubuntu and works well, but in server with CentOS and Cpanel not works, I obtained this error:</p> <blockquote> <p>Class "Propa\PageBundle\Entity\Page" is not a valid entity or mapped super class.</p> <p>CRITICAL - Doctrine\ORM\Mapping\MappingException: Class "Propa\PageBundle\Entity\Page" is not a valid entity or mapped super class. (uncaught exception) at /home/estudi83/domains/serverprova.com.es/propa/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/MappingException.php line 216</p> </blockquote> <p>I prove:</p> <pre><code>$page=$em-&gt;getRepository('PropaPageBundle:Page')-&gt;findOneBy(array('codi'=&gt;'0001')); </code></pre> <p>And obtain this error: <code>Unknown Entity namespace alias 'PropaPageBundle'.</code></p> <p>And I prove:</p> <pre><code> $page=$em-&gt;getRepository('Propa\PageBundle\Entity\Page')-&gt;findOneBy(array('codi'=&gt;'0001')); </code></pre> <p>And obtain same error: <code>Class "Propa\PageBundle\Entity\Page" is not a valid entity or mapped super class.</code></p> <p>This is the Entity:</p> <pre><code>&lt;?php namespace Propa\PageBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; use Doctrine\Common\Collections\ArrayCollection; use Vich\UploaderBundle\Mapping\Annotation as Vich; use Propa\PageBundle\Util; use Gedmo\Mapping\Annotation as Gedmo; /** * @ORM\Entity(repositoryClass="Propa\PageBundle\Repository\PageRepository") * @Gedmo\TranslationEntity(class="Propa\PageBundle\Entity\Translation\PageTranslation") * @ORM\HasLifecycleCallbacks * @Vich\Uploadable */ class Page { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue */ protected $id; </code></pre> <p>I had proved:</p> <pre><code>auto_mapping: true </code></pre> <p>and </p> <pre><code>auto_mapping: false mappings: PageBundle: ~ </code></pre> <p>But always obtain the same error.</p> <p>What Can I do?</p> <p>UPDATE: Resolved the problem was in eAccelerator with symfony2 annotations, I'm uninstalled eAccelerator and installed APC and works fine!!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload