Symfony2.0 - InvalidArgumentException

I have a bit of a problem with symfony 2.3 and I hope you can help me.

I really do not know what I did wrong, but because of the suddenness I got these errors, and now I can not get rid of them.

Error 1:

InvalidArgumentException: [WARNING 1549] failed to load external entity "file:///C:/wamp/www/Symfony/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd" (in n/a - line 0, column 0) [WARNING 3084] Element '{http://www.w3.org/2001/XMLSchema}import': Failed to locate a schema at location 'file:///C:/wamp/www/Symfony/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Loader/schema/dic/services/services-1.0.xsd'. Skipping the import. (in in_memory_buffer - line 8, column 0) [ERROR 1845] Element '{http://symfony.com/schema/dic/services}container': No matching global declaration available for the validation root. (in file:///C:/wamp/www/Symfony/web/ - line 5, column 0) 

Error2:

 InvalidArgumentException: Unable to parse file "C:\wamp\www\Symfony\vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\DependencyInjection/../Resources/config\web.xml". 

I tried to delete what I thought was causing these errors (I also tried to clear the cache), but none of this succeeded.

I assume that I should have something wrong in the twig or xlf file, because these errors appeared after I modified only these files, but I can’t find out what I am doing wrong in these files (for me, all that I really looked fine)

I can publish files if they need them.

EDIT:

twig file:

 {% extends '::base.html.twig' %} {% block title %}{{ 'myAccount'|trans }}{% endblock %} {% block stylesheets %} {{ parent() }} <link href="{{ asset('bundles/account/css/myProfile.css') }}" rel="stylesheet"> {% endblock %} {% block content %} <div class="profile-hor-nav"> <ul class="nav nav-pills profile-menu-font"> <li class="active profile-hor-nav-element"> <a href="#">{{ 'gameInfo'|trans }}</a> </li> <li class="profile-hor-nav-element"> <a href="#">{{ 'accountInfo'|trans }}</a> </li> </ul> </div> <div class="profile-ver-nav"> <ul class="nav nav-pills nav-stacked profile-menu-font"> <li class="active profile-ver-nav-element"> <a href="#">{{ 'matchHistory'|trans }}</a> </li> <li class="profile-ver-nav-element"> <a href="#">{{ 'statistics'|trans }}</a> </li> <li class="profile-ver-nav-element"> <a href="#">{{ 'charObj'|trans }}</a> </li> </ul> </div> {% endblock %} 

en.xlf:

 <?xml version="1.0" encoding="UTF-8"?> <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> <file source-language="en" datatype="plaintext" original="file.ext"> <body> <trans-unit id="1"> <source>registrationMessage</source> <target>Enroll and fight for glory on the battlefields.</target> </trans-unit> <trans-unit id="2"> <source>registrationSuccessMessage</source> <target>You will receive an email to finish your registration</target> </trans-unit> <trans-unit id="3"> <source>gameInfo</source> <target>Game information</target> </trans-unit> <trans-unit id="4"> <source>accountInfo</source> <target>Account information</target> </trans-unit> <trans-unit id="5"> <source>matchHistory</source> <target>Match history</target> </trans-unit> <trans-unit id="6"> <source>statistics</source> <target>Statistics</target> </trans-unit> <trans-unit id="7"> <source>charObj</source> <target>Characters and Objects</target> </trans-unit> </body> </file> </xliff> 

fr.xlf:

 <?xml version="1.0" encoding="UTF-8"?> <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> <file source-language="en" datatype="plaintext" original="file.ext"> <body> <trans-unit id="1"> <source>registrationMessage</source> <target>Inscrivez-vous et combattez pour la gloire sur les champs de bataille.</target> </trans-unit> <trans-unit id="2"> <source>registrationSuccessMessage</source> <target>Vous allez recevoir un email pour completer votre inscription</target> </trans-unit> <trans-unit id="3"> <source>gameInfo</source> <target>Informations en jeu</target> </trans-unit> <trans-unit id="4"> <source>accountInfo</source> <target>Informations du compte</target> </trans-unit> <trans-unit id="5"> <source>matchHistory</source> <target>Historique des parties</target> </trans-unit> <trans-unit id="6"> <source>statistics</source> <target>Statistiques</target> </trans-unit> <trans-unit id="7"> <source>charObj</source> <target>Personnages et Objets</target> </trans-unit> </body> </file> </xliff> 

EDIT 2:

So, after checking, I actually have version 2.4.0 of BETA1 from symfony

I am running wampserver with apache 2.4.4, php 5.4.16 and mysql 5.6.12

I hope you help me

Thank you for your help.

0
symfony
source share
2 answers

I don’t know why, but after restarting the computer (so with the Wampserver server) the problem disappeared. If you guys do not know why this is so, I would be glad to hear that.

+7
source share

I had a similar error and it was that simple.

Your problem may arise in the extension used in your dependencyInjection Bundle. In my case, I downloaded yml files using xmlFileLoader, for example:

 <?php namespace xxx\UserBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader; /** * This is the class that loads and manages your bundle configuration * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} */ class xxxUserExtension extends Extension { /** * {@inheritDoc} */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('user.yml'); $loader->load('forms.yml'); } } 

I downloaded yml files, so I had to use YmlFileLoader instead of XmlFileLoader.

Additional information here: http://wp.me/p4BhA9-3a

+1
source share

All Articles