IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Symfony PHP Discussion :

Erreur sur la partie affichage du message "'Mon premier message'" [2.x]


Sujet :

Symfony PHP

  1. #1
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut Erreur sur la partie affichage du message "'Mon premier message'"
    Bonjour à tous
    Il y a bien longtemps que j'ai cherché à avoir une connaissance solide de Symfony. J'ai déja essayé les projets Jobeet, Ferme du web sans succès parce que ce n'est pas assez clair pour moi, soit c'est en environnement linux que les commandes doivent être appliqué ou bien les commandes pour windows ne sont pas assez détaillés, bref pour mon niveau de débutant je n'ai pas pu trouver mon compte, j'ai finis par abandonner.
    En ce qui concerne ce tuto, en voulant appliquer la partie relative à "Mon premier message" je reçois un message d'erreur, donc je ne suis pas loin aussi d'abandonner et pourtant je veux bien comprendre ce Framework.

    Aidez-moi s'il vous plait à y voir clair.

  2. #2
    Responsable Qt & Livres


    Avatar de dourouc05
    Homme Profil pro
    Ingénieur de recherche
    Inscrit en
    Août 2008
    Messages
    26 617
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur de recherche
    Secteur : Enseignement

    Informations forums :
    Inscription : Août 2008
    Messages : 26 617
    Points : 188 587
    Points
    188 587
    Par défaut


    Sans le message d'erreur, on ne peut rien faire .
    Vous souhaitez participer aux rubriques Qt (tutoriels, FAQ, traductions) ou HPC ? Contactez-moi par MP.

    Créer des applications graphiques en Python avec PyQt5
    Créer des applications avec Qt 5.

    Pas de question d'ordre technique par MP !

  3. #3
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut Erreur Affichage "Mon premier message"
    Le message d'erreur se trouve en pièce jointe.

    Merci
    Fichiers attachés Fichiers attachés

  4. #4
    Membre actif

    Homme Profil pro
    Inscrit en
    Janvier 2009
    Messages
    91
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Belgique

    Informations professionnelles :
    Secteur : Service public

    Informations forums :
    Inscription : Janvier 2009
    Messages : 91
    Points : 223
    Points
    223
    Par défaut
    Le message d'erreur est on ne peut plus clair :

    On ne peut pas employer de tabulations dans les fichiers YAML !

    Donc tout avec la barre d'espace!

  5. #5
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut Erreur "Mon premier Message"
    J'ai essayé de corriger les indentations avec la barre d'espacement dans les fichiers .yml, mais il y a toujours des erreurs.

    Merci
    Fichiers attachés Fichiers attachés

  6. #6
    Responsable Qt & Livres


    Avatar de dourouc05
    Homme Profil pro
    Ingénieur de recherche
    Inscrit en
    Août 2008
    Messages
    26 617
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Val de Marne (Île de France)

    Informations professionnelles :
    Activité : Ingénieur de recherche
    Secteur : Enseignement

    Informations forums :
    Inscription : Août 2008
    Messages : 26 617
    Points : 188 587
    Points
    188 587
    Par défaut
    Fais un copier-coller de l'erreur ici, on ne va pas ouvrir Word (pour autant qu'on l'ait) pour ça. (N'oublie pas les balises CODE).
    Vous souhaitez participer aux rubriques Qt (tutoriels, FAQ, traductions) ou HPC ? Contactez-moi par MP.

    Créer des applications graphiques en Python avec PyQt5
    Créer des applications avec Qt 5.

    Pas de question d'ordre technique par MP !

  7. #7
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut Erreur "Mon premier message"
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    Exception detected!
    Cannot import resource "'@MyappFimothequeBundle/Resources/config/routing.yml'" from "'C:\\wamp\\www\\Symfony2\\app/config\\routing.yml'".
    500 Internal Server Error - FileLoaderImportException
    1 linked Exception:
     
        * InvalidArgumentException »
     
    [2/2] FileLoaderImportException: Cannot import resource "'@MyappFimothequeBundle/Resources/config/routing.yml'" from "'C:\\wamp\\www\\Symfony2\\app/config\\routing.yml'".  -+
     
       1. in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Config\Loader\FileLoader.php at line 74  -+
            71.                     throw $e;
            72.                 }
            73.
            74.                 throw new FileLoaderImportException($resource, $sourceResource, null, $e);
            75.             }
            76.         }
            77.     }
       2. at FileLoader ->import ('@MyappFimothequeBundle/Resources/config/routing.yml', null, false, 'C:\wamp\www\Symfony2\app/config\routing.yml')
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Loader\YamlFileLoader.php at line 67  -+
            64.                 $type = isset($config['type']) ? $config['type'] : null;
            65.                 $prefix = isset($config['prefix']) ? $config['prefix'] : null;
            66.                 $this->setCurrentDir(dirname($path));
            67.                 $collection->addCollection($this->import($config['resource'], $type, false, $file), $prefix);
            68.             } elseif (isset($config['pattern'])) {
            69.                 $this->parseRoute($collection, $name, $config, $path);
            70.             } else {
       3. at YamlFileLoader ->load ('C:\wamp\www\Symfony2\app/config\routing.yml')
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Config\Loader\FileLoader.php at line 66  -+
            63.                 $resource = $this->locator->locate($resource, $this->currentDir);
            64.             }
            65.
            66.             return $loader->load($resource);
            67.         } catch (\Exception $e) {
            68.             if (!$ignoreErrors) {
            69.                 // prevent embedded imports from nesting multiple exceptions
       4. at FileLoader ->import ('routing.yml', null, false, 'C:\wamp\www\Symfony2\app/config/routing_dev.yml')
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Loader\YamlFileLoader.php at line 67  -+
            64.                 $type = isset($config['type']) ? $config['type'] : null;
            65.                 $prefix = isset($config['prefix']) ? $config['prefix'] : null;
            66.                 $this->setCurrentDir(dirname($path));
            67.                 $collection->addCollection($this->import($config['resource'], $type, false, $file), $prefix);
            68.             } elseif (isset($config['pattern'])) {
            69.                 $this->parseRoute($collection, $name, $config, $path);
            70.             } else {
       5. at YamlFileLoader ->load ('C:\wamp\www\Symfony2\app/config/routing_dev.yml', null)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Config\Loader\DelegatingLoader.php at line 50  -+
            47.             throw new \InvalidArgumentException(sprintf('Unable to load the "%s" resource.', is_string($resource) ? $resource : (is_object($resource) ? get_class($resource) : 'RESOURCE')));
            48.         }
            49.
            50.         return $loader->load($resource, $type);
            51.     }
            52.
            53.     /**
       6. at DelegatingLoader ->load ('C:\wamp\www\Symfony2\app/config/routing_dev.yml', null)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader.php at line 57  -+
            54.      */
            55.     public function load($resource, $type = null)
            56.     {
            57.         $collection = parent::load($resource, $type);
            58.
            59.         foreach ($collection->all() as $name => $route) {
            60.             if ($controller = $route->getDefault('_controller')) {
       7. at DelegatingLoader ->load ('C:\wamp\www\Symfony2\app/config/routing_dev.yml', null)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Routing\LazyLoader.php at line 50  -+
            47.      */
            48.     public function load($resource, $type = null)
            49.     {
            50.         return $this->container->get($this->service)->load($resource, $type);
            51.     }
            52.
            53.     /**
       8. at LazyLoader ->load ('C:\wamp\www\Symfony2\app/config/routing_dev.yml', null)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Router.php at line 96  -+
            93.     public function getRouteCollection()
            94.     {
            95.         if (null === $this->collection) {
            96.             $this->collection = $this->loader->load($this->resource, $this->options['resource_type']);
            97.         }
            98.
            99.         return $this->collection;
       9. at Router ->getRouteCollection ()
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Router.php at line 171  -+
           168.         $class = $this->options['matcher_cache_class'];
           169.         $cache = new ConfigCache($this->options['cache_dir'].'/'.$class.'.php', $this->options['debug']);
           170.         if (!$cache->isFresh($class)) {
           171.             $dumper = new $this->options['matcher_dumper_class']($this->getRouteCollection());
           172.
           173.             $options = array(
           174.                 'class'      => $class,
      10. at Router ->getMatcher ()
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Router.php at line 111  -+
           108.     {
           109.         $this->context = $context;
           110.
           111.         $this->getMatcher()->setContext($context);
           112.         $this->getGenerator()->setContext($context);
           113.     }
     114.
      11. at Router ->setContext (object(RequestContext))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\RequestListener.php at line 93  -+
            90.                 $context->setParameter('_locale', $session->getLocale());
            91.             }
            92.
            93.             $this->router->setContext($context);
            94.         }
            95.
            96.         if ($request->attributes->has('_controller')) {
      12. at RequestListener ->initializeRequestAttributes (object(Request), true)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\RequestListener.php at line 55  -+
            52.
            53.         $this->initializeSession($request, $master);
            54.
            55.         $this->initializeRequestAttributes($request, $master);
            56.     }
            57.
            58.     protected function initializeSession(Request $request, $master)
      13. at RequestListener ->onCoreRequest (object(GetResponseEvent))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php at line 179  -+
           176.         if ($listener instanceof \Closure) {
           177.             $listener->__invoke($event);
           178.         } else {
           179.             $listener->$eventName($event);
           180.         }
           181.     }
     182.
      14. at EventDispatcher ->triggerListener (object(RequestListener), 'onCoreRequest', object(GetResponseEvent))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher.php at line 73  -+
            70.      */
            71.     protected function triggerListener($listener, $eventName, Event $event)
            72.     {
            73.         parent::triggerListener($listener, $eventName, $event);
            74.
            75.         if (null !== $this->logger) {
            76.             $this->logger->debug(sprintf('Notified event "%s" to listener "%s".', $eventName, get_class($listener)));
      15. at TraceableEventDispatcher ->triggerListener (object(RequestListener), 'onCoreRequest', object(GetResponseEvent))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php at line 62  -+
            59.         }
            60.
            61.         foreach ($this->getListeners($eventName) as $listener) {
            62.             $this->triggerListener($listener, $eventName, $event);
            63.
            64.             if ($event->isPropagationStopped()) {
            65.                 break;
      16. at EventDispatcher ->dispatch ('onCoreRequest', object(GetResponseEvent))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher.php at line 101  -+
            98.             }
            99.         }
           100.
           101.         parent::dispatch($eventName, $event);
           102.     }
           103. }
     104.
      17. at ContainerAwareEventDispatcher ->dispatch ('onCoreRequest', object(GetResponseEvent))
          in C:\wamp\www\Symfony2\app\bootstrap.php.cache at line 431  -+
           428.     private function handleRaw(Request $request, $type = self::MASTER_REQUEST)
           429.     {
           430.                 $event = new GetResponseEvent($this, $request, $type);
           431.         $this->dispatcher->dispatch(Events::onCoreRequest, $event);
           432.         if ($event->hasResponse()) {
           433.             return $this->filterResponse($event->getResponse(), $request, $type);
           434.         }
      18. at HttpKernel ->handleRaw (object(Request), '1')
          in C:\wamp\www\Symfony2\app\bootstrap.php.cache at line 420  -+
           417.     public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
           418.     {
           419.         try {
           420.             return $this->handleRaw($request, $type);
           421.         } catch (\Exception $e) {
           422.             if (false === $catch) {
           423.                 throw $e;
      19. at HttpKernel ->handle (object(Request), '1', true)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\HttpKernel.php at line 35  -+
            32.         $this->container->set('request', $request, 'request');
            33.
            34.         try {
            35.             $response = parent::handle($request, $type, $catch);
            36.         } catch (\Exception $e) {
            37.             $this->container->leaveScope('request');
      38.
      20. at HttpKernel ->handle (object(Request), '1', true)
          in C:\wamp\www\Symfony2\app\bootstrap.php.cache at line 613  -+
           610.         if (false === $this->booted) {
           611.             $this->boot();
           612.         }
           613.         return $this->getHttpKernel()->handle($request, $type, $catch);
           614.     }
           615.     protected function getHttpKernel()
           616.     {
      21. at Kernel ->handle (object(Request))
          in C:\wamp\www\Symfony2\web\app_dev.php at line 20  -+
            17.
            18. $kernel = new AppKernel('dev', true);
            19. $kernel->loadClassCache();
            20. $kernel->handle(Request::createFromGlobals())->send();
      21.
     
    [1/2] InvalidArgumentException: Bundle "MyappFimothequeBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your AppKernel.php file?  -

  8. #8
    Expert éminent sénior

    Profil pro
    Inscrit en
    Juin 2002
    Messages
    6 152
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2002
    Messages : 6 152
    Points : 17 778
    Points
    17 778
    Par défaut
    L'erreur est pourtant explicite : Sf ne trouve pas la ressource indiquée.

    @MyappFimothequeBundle/Resources/config/routing.yml
    A priori, coquille : FilmothequeBundle.

  9. #9
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut Erreur "Mon premier Message"
    Je tourne toujours en rond malgré la pertinence de vos remarques, on dirait que à tout moment il y a un hic, peut être que je vais reprendre la génération du projet???

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    Symfony
    Search on Symfony website OK
    Exception detected!
    Cannot import resource "'@MyappFilmothequeBundle/Resources/config/routing.yml'" from "'C:\\wamp\\www\\Symfony2\\app/config\\routing.yml'".
    500 Internal Server Error - FileLoaderImportException
    1 linked Exception:
     
        * InvalidArgumentException »
     
    [2/2] FileLoaderImportException: Cannot import resource "'@MyappFilmothequeBundle/Resources/config/routing.yml'" from "'C:\\wamp\\www\\Symfony2\\app/config\\routing.yml'".  -+
     
       1. in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Config\Loader\FileLoader.php at line 74  -+
            71.                     throw $e;
            72.                 }
            73.
            74.                 throw new FileLoaderImportException($resource, $sourceResource, null, $e);
            75.             }
            76.         }
            77.     }
       2. at FileLoader ->import ('@MyappFilmothequeBundle/Resources/config/routing.yml', null, false, 'C:\wamp\www\Symfony2\app/config\routing.yml')
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Loader\YamlFileLoader.php at line 67  -+
            64.                 $type = isset($config['type']) ? $config['type'] : null;
            65.                 $prefix = isset($config['prefix']) ? $config['prefix'] : null;
            66.                 $this->setCurrentDir(dirname($path));
            67.                 $collection->addCollection($this->import($config['resource'], $type, false, $file), $prefix);
            68.             } elseif (isset($config['pattern'])) {
            69.                 $this->parseRoute($collection, $name, $config, $path);
            70.             } else {
       3. at YamlFileLoader ->load ('C:\wamp\www\Symfony2\app/config\routing.yml')
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Config\Loader\FileLoader.php at line 66  -+
            63.                 $resource = $this->locator->locate($resource, $this->currentDir);
            64.             }
            65.
            66.             return $loader->load($resource);
            67.         } catch (\Exception $e) {
            68.             if (!$ignoreErrors) {
            69.                 // prevent embedded imports from nesting multiple exceptions
       4. at FileLoader ->import ('routing.yml', null, false, 'C:\wamp\www\Symfony2\app/config/routing_dev.yml')
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Loader\YamlFileLoader.php at line 67  -+
            64.                 $type = isset($config['type']) ? $config['type'] : null;
            65.                 $prefix = isset($config['prefix']) ? $config['prefix'] : null;
            66.                 $this->setCurrentDir(dirname($path));
            67.                 $collection->addCollection($this->import($config['resource'], $type, false, $file), $prefix);
            68.             } elseif (isset($config['pattern'])) {
            69.                 $this->parseRoute($collection, $name, $config, $path);
            70.             } else {
       5. at YamlFileLoader ->load ('C:\wamp\www\Symfony2\app/config/routing_dev.yml', null)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Config\Loader\DelegatingLoader.php at line 50  -+
            47.             throw new \InvalidArgumentException(sprintf('Unable to load the "%s" resource.', is_string($resource) ? $resource : (is_object($resource) ? get_class($resource) : 'RESOURCE')));
            48.         }
            49.
            50.         return $loader->load($resource, $type);
            51.     }
            52.
            53.     /**
       6. at DelegatingLoader ->load ('C:\wamp\www\Symfony2\app/config/routing_dev.yml', null)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader.php at line 57  -+
            54.      */
            55.     public function load($resource, $type = null)
            56.     {
            57.         $collection = parent::load($resource, $type);
            58.
            59.         foreach ($collection->all() as $name => $route) {
            60.             if ($controller = $route->getDefault('_controller')) {
       7. at DelegatingLoader ->load ('C:\wamp\www\Symfony2\app/config/routing_dev.yml', null)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Routing\LazyLoader.php at line 50  -+
            47.      */
            48.     public function load($resource, $type = null)
            49.     {
            50.         return $this->container->get($this->service)->load($resource, $type);
            51.     }
            52.
            53.     /**
       8. at LazyLoader ->load ('C:\wamp\www\Symfony2\app/config/routing_dev.yml', null)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Router.php at line 96  -+
            93.     public function getRouteCollection()
            94.     {
            95.         if (null === $this->collection) {
            96.             $this->collection = $this->loader->load($this->resource, $this->options['resource_type']);
            97.         }
            98.
            99.         return $this->collection;
       9. at Router ->getRouteCollection ()
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Router.php at line 171  -+
           168.         $class = $this->options['matcher_cache_class'];
           169.         $cache = new ConfigCache($this->options['cache_dir'].'/'.$class.'.php', $this->options['debug']);
           170.         if (!$cache->isFresh($class)) {
           171.             $dumper = new $this->options['matcher_dumper_class']($this->getRouteCollection());
           172.
           173.             $options = array(
           174.                 'class'      => $class,
      10. at Router ->getMatcher ()
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\Routing\Router.php at line 111  -+
           108.     {
           109.         $this->context = $context;
           110.
           111.         $this->getMatcher()->setContext($context);
           112.         $this->getGenerator()->setContext($context);
           113.     }
     114.
      11. at Router ->setContext (object(RequestContext))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\RequestListener.php at line 93  -+
            90.                 $context->setParameter('_locale', $session->getLocale());
            91.             }
            92.
            93.             $this->router->setContext($context);
            94.         }
            95.
            96.         if ($request->attributes->has('_controller')) {
      12. at RequestListener ->initializeRequestAttributes (object(Request), true)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\RequestListener.php at line 55  -+
            52.
            53.         $this->initializeSession($request, $master);
            54.
            55.         $this->initializeRequestAttributes($request, $master);
            56.     }
            57.
            58.     protected function initializeSession(Request $request, $master)
      13. at RequestListener ->onCoreRequest (object(GetResponseEvent))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php at line 179  -+
           176.         if ($listener instanceof \Closure) {
           177.             $listener->__invoke($event);
           178.         } else {
           179.             $listener->$eventName($event);
           180.         }
           181.     }
     182.
      14. at EventDispatcher ->triggerListener (object(RequestListener), 'onCoreRequest', object(GetResponseEvent))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\Debug\TraceableEventDispatcher.php at line 73  -+
            70.      */
            71.     protected function triggerListener($listener, $eventName, Event $event)
            72.     {
            73.         parent::triggerListener($listener, $eventName, $event);
            74.
            75.         if (null !== $this->logger) {
            76.             $this->logger->debug(sprintf('Notified event "%s" to listener "%s".', $eventName, get_class($listener)));
      15. at TraceableEventDispatcher ->triggerListener (object(RequestListener), 'onCoreRequest', object(GetResponseEvent))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Component\EventDispatcher\EventDispatcher.php at line 62  -+
            59.         }
            60.
            61.         foreach ($this->getListeners($eventName) as $listener) {
            62.             $this->triggerListener($listener, $eventName, $event);
            63.
            64.             if ($event->isPropagationStopped()) {
            65.                 break;
      16. at EventDispatcher ->dispatch ('onCoreRequest', object(GetResponseEvent))
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\ContainerAwareEventDispatcher.php at line 101  -+
            98.             }
            99.         }
           100.
           101.         parent::dispatch($eventName, $event);
           102.     }
           103. }
     104.
      17. at ContainerAwareEventDispatcher ->dispatch ('onCoreRequest', object(GetResponseEvent))
          in C:\wamp\www\Symfony2\app\bootstrap.php.cache at line 431  -+
           428.     private function handleRaw(Request $request, $type = self::MASTER_REQUEST)
           429.     {
           430.                 $event = new GetResponseEvent($this, $request, $type);
           431.         $this->dispatcher->dispatch(Events::onCoreRequest, $event);
           432.         if ($event->hasResponse()) {
           433.             return $this->filterResponse($event->getResponse(), $request, $type);
           434.         }
      18. at HttpKernel ->handleRaw (object(Request), '1')
          in C:\wamp\www\Symfony2\app\bootstrap.php.cache at line 420  -+
           417.     public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
           418.     {
           419.         try {
           420.             return $this->handleRaw($request, $type);
           421.         } catch (\Exception $e) {
           422.             if (false === $catch) {
           423.                 throw $e;
      19. at HttpKernel ->handle (object(Request), '1', true)
          in C:\wamp\www\Symfony2\vendor\symfony\src\Symfony\Bundle\FrameworkBundle\HttpKernel.php at line 35  -+
            32.         $this->container->set('request', $request, 'request');
            33.
            34.         try {
            35.             $response = parent::handle($request, $type, $catch);
            36.         } catch (\Exception $e) {
            37.             $this->container->leaveScope('request');
      38.
      20. at HttpKernel ->handle (object(Request), '1', true)
          in C:\wamp\www\Symfony2\app\bootstrap.php.cache at line 613  -+
           610.         if (false === $this->booted) {
           611.             $this->boot();
           612.         }
           613.         return $this->getHttpKernel()->handle($request, $type, $catch);
           614.     }
           615.     protected function getHttpKernel()
           616.     {
      21. at Kernel ->handle (object(Request))
          in C:\wamp\www\Symfony2\web\app_dev.php at line 20  -+
            17.
            18. $kernel = new AppKernel('dev', true);
            19. $kernel->loadClassCache();
            20. $kernel->handle(Request::createFromGlobals())->send();
      21.
     
    [1/2] InvalidArgumentException: Bundle "MyappFilmothequeBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your AppKernel.php file?  -

  10. #10
    Membre actif

    Homme Profil pro
    Inscrit en
    Janvier 2009
    Messages
    91
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Belgique

    Informations professionnelles :
    Secteur : Service public

    Informations forums :
    Inscription : Janvier 2009
    Messages : 91
    Points : 223
    Points
    223
    Par défaut
    As-tu bien ajouté le namespace "Myapp" dans /app/autoload.php ?

    As-tu bien activé ton bundle dans app/AppKernel.php ?

    Si oui, pourrais-tu nous mettre les code de ces deux fichiers.

  11. #11
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut Fichier appautoload
    <?php

    use Symfony\Component\ClassLoader\UniversalClassLoader;

    $loader = new UniversalClassLoader();
    $loader->registerNamespaces(array(
    'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
    'Sensio' => __DIR__.'/../vendor/bundles',
    'JMS' => __DIR__.'/../vendor/bundles',
    'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
    'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib',
    'Doctrine' => __DIR__.'/../vendor/doctrine/lib',
    'Monolog' => __DIR__.'/../vendor/monolog/src',
    'Assetic' => __DIR__.'/../vendor/assetic/src',
    'Acme' => __DIR__.'/../src',
    'MyApp' => __DIR__.'/../src',
    ));
    $loader->registerPrefixes(array(
    'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib',
    'Twig_' => __DIR__.'/../vendor/twig/lib',
    'Swift_' => __DIR__.'/../vendor/swiftmailer/lib/classes',
    ));
    $loader->register();
    $loader->registerPrefixFallback(array(
    __DIR__.'/../vendor/symfony/src/Symfony/Component/Locale/Resources/stubs',
    ));

  12. #12
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut appkernel.php
    <?php

    use Symfony\Component\HttpKernel\Kernel;
    use Symfony\Component\Config\Loader\LoaderInterface;

    class AppKernel extends Kernel
    {
    public function registerBundles()
    {
    $bundles = array(
    new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
    new Symfony\Bundle\SecurityBundle\SecurityBundle(),
    new Symfony\Bundle\TwigBundle\TwigBundle(),
    new Symfony\Bundle\MonologBundle\MonologBundle(),
    new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
    new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
    new Symfony\Bundle\AsseticBundle\AsseticBundle(),
    new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
    new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
    new Acme\DemoBundle\AcmeDemoBundle(),
    new MyApp\FilmothequeBundle\MyAppFilmothequeBundle(),
    );

    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
    $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
    $bundles[] = new Symfony\Bundle\WebConfiguratorBundle\SymfonyWebConfiguratorBundle();
    }

    return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
    $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
    }

  13. #13
    Membre actif

    Homme Profil pro
    Inscrit en
    Janvier 2009
    Messages
    91
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Belgique

    Informations professionnelles :
    Secteur : Service public

    Informations forums :
    Inscription : Janvier 2009
    Messages : 91
    Points : 223
    Points
    223
    Par défaut
    Dans ton fichier AppKernel, ton bundle contient deux majuscules de trop:

    new MyApp\FilmothequeBundle\MyAppFilmothequeBundle(),




    Maintenant, si ton dossier contient vraiment une majuscule, c'est tous les autres noms qui doivent prendre une majuscule

  14. #14
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut
    Toujours la même erreur malgré la rectification des majuscules

    ( ! ) Fatal error: Class 'Myapp\FilmothequeBundle\MyappFilmothequeBundle' not found in C:\wamp\www\Symfony2\app\AppKernel.php on line 21
    Call Stack
    # Time Memory Function Location
    1 0.0003 362792 {main}( ) ..\app_dev.php:0
    2 0.0020 529784 Symfony\Component\HttpKernel\Kernel->loadClassCache( ) ..\app_dev.php:19
    3 0.0021 529880 Symfony\Component\HttpKernel\Kernel->boot( ) ..\bootstrap.php.cache:711
    4 0.0021 529880 Symfony\Component\HttpKernel\Kernel->initializeBundles( ) ..\bootstrap.php.cache:591
    5 0.0021 530240 AppKernel->registerBundles( ) ..\bootstrap.php.cache:738

  15. #15
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut appKernel rectifié
    <?php

    use Symfony\Component\HttpKernel\Kernel;
    use Symfony\Component\Config\Loader\LoaderInterface;

    class AppKernel extends Kernel
    {
    public function registerBundles()
    {
    $bundles = array(
    new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
    new Symfony\Bundle\SecurityBundle\SecurityBundle(),
    new Symfony\Bundle\TwigBundle\TwigBundle(),
    new Symfony\Bundle\MonologBundle\MonologBundle(),
    new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
    new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
    new Symfony\Bundle\AsseticBundle\AsseticBundle(),
    new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
    new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
    new Acme\DemoBundle\AcmeDemoBundle(),
    new Myapp\FilmothequeBundle\MyappFilmothequeBundle(),
    );

    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
    $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
    $bundles[] = new Symfony\Bundle\WebConfiguratorBundle\SymfonyWebConfiguratorBundle();
    }

    return $bundles;
    }

    public function registerContainerConfiguration(LoaderInterface $loader)
    {
    $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml');
    }
    }

  16. #16
    Membre actif

    Homme Profil pro
    Inscrit en
    Janvier 2009
    Messages
    91
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Belgique

    Informations professionnelles :
    Secteur : Service public

    Informations forums :
    Inscription : Janvier 2009
    Messages : 91
    Points : 223
    Points
    223
    Par défaut
    Ben oui, toujours le même message aussi donc tu n'es pas resté cohérent dans tes namespaces.

    Quel est le contenu du fichier src/Myapp/FilmothequeBundle/MyappFilmothequeBundle.php ?

  17. #17
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut Contenu du fichier C:\wamp\www\Symfony2\src\MyApp\FilmothequeBundle\MyappFilmotheque
    <?php

    namespace MyApp\FilmothequeBundle;

    use Symfony\Component\HttpKernel\Bundle\Bundle;

    class MyAppFilmothequeBundle extends Bundle
    {
    }

  18. #18
    Membre actif

    Homme Profil pro
    Inscrit en
    Janvier 2009
    Messages
    91
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Belgique

    Informations professionnelles :
    Secteur : Service public

    Informations forums :
    Inscription : Janvier 2009
    Messages : 91
    Points : 223
    Points
    223
    Par défaut
    Bon ben c'est triste que tu ne le voies pas toi-même, ici il y a un A majuscule à MyApp donc il faut un A majuscule partout !

  19. #19
    Nouveau Candidat au Club
    Inscrit en
    Mai 2005
    Messages
    18
    Détails du profil
    Informations forums :
    Inscription : Mai 2005
    Messages : 18
    Points : 0
    Points
    0
    Par défaut Problème Résolu
    Merci, Mille fois
    Comme tu as fouetté mon orgueil en me disans que c'est triste que je ne vois pas moi même alors, j'ai cherché à résoudre la dernière erreur moi même.

    Maintenat c'est OK.
    Merci pour votre aide.
    Vous m'encouragez à continuer.
    Si je rencontre de nouvelles difficultés, je serai encore sur le forum.

    Merci

  20. #20
    Membre actif

    Homme Profil pro
    Inscrit en
    Janvier 2009
    Messages
    91
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : Belgique

    Informations professionnelles :
    Secteur : Service public

    Informations forums :
    Inscription : Janvier 2009
    Messages : 91
    Points : 223
    Points
    223
    Par défaut
    Sur les forums, le seuil orgueil que tu peux avoir c'est celui d'avoir cherché et d'analyser son code avant poster

    Bon courage pour la suite...

+ Répondre à la discussion
Cette discussion est résolue.
Page 1 sur 2 12 DernièreDernière

Discussions similaires

  1. Réponses: 4
    Dernier message: 24/02/2010, 06h37
  2. Affichage des messages d'erreur sur mon serveur
    Par philippe57460 dans le forum Langage
    Réponses: 4
    Dernier message: 25/06/2008, 08h23
  3. Affichage message d'erreur sur cellule protégé
    Par djm69 dans le forum Macros et VBA Excel
    Réponses: 2
    Dernier message: 28/01/2008, 12h08
  4. Affichage message d'erreur sur la page courante
    Par mflorisson dans le forum Struts 2
    Réponses: 1
    Dernier message: 18/12/2007, 03h24

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo