title: Symfony\Component\HttpKernel\Exception\NotFoundHttpException: object not found
body: <p>i'm working on symfony2 project and i get this exception. anybody have an idea on what is causing it ?
  Uncaught exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' with message 'Gmjob\ExaminationBundle\Entity\Examination object not found.' in /data/apache/www/emploipublic-sf/vendor/sensio/framework-extra bundle/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php:55\nStack</p>
  
  <pre><code>public function apply(Request $request, ConfigurationInterface $configuration)
  {
      $name    = $configuration-&gt;getName();
      $class   = $configuration-&gt;getClass();
      $options = $this-&gt;getOptions($configuration);
  
      // find by identifier?
      if (false === $object = $this-&gt;find($class, $request, $options, $name)) {
          // find by criteria
          if (false === $object = $this-&gt;findOneBy($class, $request, $options)) {
              if ($configuration-&gt;isOptional()) {
                  $object = null;
              } else {
                  throw new \LogicException('Unable to guess how to get a Doctrine instance from the request information.');
              }
          }
      }
  
      if (null === $object &amp;&amp; false === $configuration-&gt;isOptional()) {
          throw new NotFoundHttpException(sprintf('%s object not found.', $class)); // this is line 55
      }
  
      $request-&gt;attributes-&gt;set($name, $object);
  
      return true;
  }
  </code></pre>
  
  <p>here is the stack trace of the exception thrown :</p>
  
  <p>[Tue Sep 09 16:56:03 2014] [error] [client 217.89.107.38] PHP Fatal error: Uncaught exception 'Symfony\Component\HttpKernel\Exception\NotFoundHttpException' with message 'Gmjob\ExaminationBundle\Entity\Examination object not found.' in /data/apache/www/emploipublic-sf/vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php:55\nStack trace:\n</p>
  
  <p>#0 /data/apache/www/emploipublic-sf/vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/ParamConverterManager.php(92): Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter->apply(Object(Symfony\Component\HttpFoundation\Request), Object(Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter))\n</p>
  
  <p>#1 /data/apache/www/emploipublic-sf/vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/ParamConverterManager.php(48): Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\ParamConverterManager->applyConverter(Object(Symfony\Component\HttpFoundation\Request), Object(Sens in /data/apache/www/emploipublic-sf/vendor/sensio/framework-extra-bundle/Sensio/Bundle/FrameworkExtraBundle/Request/ParamConverter/DoctrineParamConverter.php on line 55</p>