Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctrine\Common\Persistence\Mapping\MappingException Error #154

Closed
verymilan opened this issue Oct 1, 2015 · 6 comments
Closed

Doctrine\Common\Persistence\Mapping\MappingException Error #154

verymilan opened this issue Oct 1, 2015 · 6 comments

Comments

@verymilan
Copy link

@verymilan verymilan commented Oct 1, 2015

Hi, got the following problem and dont find anything on the web to solve it:

File
/srv/vimbadmin/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/MappingException.php
Line
86
Message
Invalid mapping file 'Entities.Admin.dcm.xml' for class 'Entities\Admin'.
Code
0

#0 /srv/vimbadmin/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/FileDriver.php(117): Doctrine\Common\Persistence\Mapping\MappingException::invalidMappingFile('Entities\\Admin', 'Entities.Admin....')
#1 /srv/vimbadmin/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php(58): Doctrine\Common\Persistence\Mapping\Driver\FileDriver->getElement('Entities\\Admin')
#2 /srv/vimbadmin/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php(116): Doctrine\ORM\Mapping\Driver\XmlDriver->loadMetadataForClass('Entities\\Admin', Object(Doctrine\ORM\Mapping\ClassMetadata))
#3 /srv/vimbadmin/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(332): Doctrine\ORM\Mapping\ClassMetadataFactory->doLoadMetadata(Object(Doctrine\ORM\Mapping\ClassMetadata), NULL, false, Array)
#4 /srv/vimbadmin/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php(216): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->loadMetadata('Entities\\Admin')
#5 /srv/vimbadmin/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(265): Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory->getMetadataFor('Entities\\Admin')
#6 /srv/vimbadmin/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php(67): Doctrine\ORM\EntityManager->getClassMetadata('Entities\\Admin')
#7 /srv/vimbadmin/vendor/doctrine/orm/lib/Doctrine/ORM/Repository/DefaultRepositoryFactory.php(50): Doctrine\ORM\Repository\DefaultRepositoryFactory->createRepository(Object(Doctrine\ORM\EntityManager), 'Entities\\Admin')
#8 /srv/vimbadmin/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(665): Doctrine\ORM\Repository\DefaultRepositoryFactory->getRepository(Object(Doctrine\ORM\EntityManager), '\\Entities\\Admin')
#9 /srv/vimbadmin/application/controllers/AuthController.php(52): Doctrine\ORM\EntityManager->getRepository('\\Entities\\Admin')
#10 /srv/vimbadmin/vendor/opensolutions/oss-framework/src/OSS/Controller/Trait/Auth.php(99): AuthController->_preLogin()
#11 /srv/vimbadmin/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php(516): AuthController->loginAction()
#12 /srv/vimbadmin/vendor/zendframework/zendframework1/library/Zend/Controller/Dispatcher/Standard.php(308): Zend_Controller_Action->dispatch('loginAction')
#13 /srv/vimbadmin/vendor/zendframework/zendframework1/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#14 /srv/vimbadmin/vendor/zendframework/zendframework1/library/Zend/Application/Bootstrap/Bootstrap.php(105): Zend_Controller_Front->dispatch()
#15 /srv/vimbadmin/vendor/zendframework/zendframework1/library/Zend/Application.php(384): Zend_Application_Bootstrap_Bootstrap->run()
#16 /srv/vimbadmin/public/index.php(34): Zend_Application->run()
#17 {main}
@zwnk

This comment has been minimized.

Copy link

@zwnk zwnk commented Oct 7, 2015

hi, i have the same error and could not resolve it until now.

@Ahava

This comment has been minimized.

Copy link

@Ahava Ahava commented Nov 2, 2015

I'm having the same problem aswell for over a week now and couldn't solve it.

@tanrax

This comment has been minimized.

Copy link

@tanrax tanrax commented Nov 2, 2015

+1

@andryyy

This comment has been minimized.

Copy link

@andryyy andryyy commented Nov 18, 2015

You are probably using a pretty new PHP version (e.g. from the dotdeb repo).

Just open /srv/vimbadmin/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php and add libxml_disable_entity_loader(false); right before class XmlDriver extends FileDriver for a quick and dirty fix.

@tanrax

This comment has been minimized.

Copy link

@tanrax tanrax commented Nov 18, 2015

working!!!
Thanks :)

@barryo barryo closed this Apr 2, 2016
@Mindbuild

This comment has been minimized.

Copy link

@Mindbuild Mindbuild commented Sep 25, 2016

I got the same problem with Debian 8 and PHP 7. Above solution didn't work for me. Instead I had to do this:
apt-get install php7.0-xml
This error comes because php7 from dotdeb repo has the extension SimpleXML somehow disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.