Exceptions

[Semantical Error] line 0, col 94 near 'f WHERE f.SujetsFormations': Error: 'f' is already defined.

  • Exceptions 2
  • Logs
  • Stack Traces 2

Doctrine\ORM\Query\ QueryException

  1.      *
  2.      * @return QueryException
  3.      */
  4.     public static function semanticalError($message$previous null)
  5.     {
  6.         return new self('[Semantical Error] ' $message0$previous);
  7.     }
  8.     /** @return QueryException */
  9.     public static function invalidLockMode()
  10.     {
  1.         $tokenStr substr($dql$token->position$length);
  2.         // Building informative message
  3.         $message 'line 0, col ' $tokenPos " near '" $tokenStr "': Error: " $message;
  4.         throw QueryException::semanticalError($messageQueryException::dqlError($this->query->getDQL()));
  5.     }
  6.     /**
  7.      * Peeks beyond the matched closing parenthesis and returns the first token after that one.
  8.      *
  1.         $exists             = isset($this->queryComponents[$aliasIdentVariable]);
  2.         if ($exists) {
  3.             $this->semanticalError(
  4.                 sprintf("'%s' is already defined."$aliasIdentVariable),
  5.                 $this->lexer->token
  6.             );
  7.         }
  8.         return $aliasIdentVariable;
  9.     }
in vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php -> AliasIdentificationVariable (line 1815)
  1.             $this->match(Lexer::T_AS);
  2.         }
  3.         assert($this->lexer->lookahead !== null);
  4.         $aliasIdentificationVariable $this->AliasIdentificationVariable();
  5.         $indexBy                     $this->lexer->isNextToken(Lexer::T_INDEX) ? $this->IndexBy() : null;
  6.         $identificationVariable $joinAssociationPathExpression->identificationVariable;
  7.         $field                  $joinAssociationPathExpression->associationField;
in vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php -> JoinAssociationDeclaration (line 1740)
  1.         $this->match(Lexer::T_JOIN);
  2.         $next $this->lexer->glimpse();
  3.         assert($next !== null);
  4.         $joinDeclaration $next->type === Lexer::T_DOT $this->JoinAssociationDeclaration() : $this->RangeVariableDeclaration();
  5.         $adhocConditions $this->lexer->isNextToken(Lexer::T_WITH);
  6.         $join            = new AST\Join($joinType$joinDeclaration);
  7.         // Describe non-root join declaration
  8.         if ($joinDeclaration instanceof AST\RangeVariableDeclaration) {
  1.         while (
  2.             $this->lexer->isNextToken(Lexer::T_LEFT) ||
  3.             $this->lexer->isNextToken(Lexer::T_INNER) ||
  4.             $this->lexer->isNextToken(Lexer::T_JOIN)
  5.         ) {
  6.             $joins[] = $this->Join();
  7.         }
  8.         return new AST\IdentificationVariableDeclaration(
  9.             $rangeVariableDeclaration,
  10.             $indexBy,
in vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php -> IdentificationVariableDeclaration (line 1351)
  1.     public function FromClause()
  2.     {
  3.         $this->match(Lexer::T_FROM);
  4.         $identificationVariableDeclarations   = [];
  5.         $identificationVariableDeclarations[] = $this->IdentificationVariableDeclaration();
  6.         while ($this->lexer->isNextToken(Lexer::T_COMMA)) {
  7.             $this->match(Lexer::T_COMMA);
  8.             $identificationVariableDeclarations[] = $this->IdentificationVariableDeclaration();
  1.      *
  2.      * @return AST\SelectStatement
  3.      */
  4.     public function SelectStatement()
  5.     {
  6.         $selectStatement = new AST\SelectStatement($this->SelectClause(), $this->FromClause());
  7.         $selectStatement->whereClause   $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;
  8.         $selectStatement->groupByClause $this->lexer->isNextToken(Lexer::T_GROUP) ? $this->GroupByClause() : null;
  9.         $selectStatement->havingClause  $this->lexer->isNextToken(Lexer::T_HAVING) ? $this->HavingClause() : null;
  10.         $selectStatement->orderByClause $this->lexer->isNextToken(Lexer::T_ORDER) ? $this->OrderByClause() : null;
  1.         $this->lexer->moveNext();
  2.         switch ($this->lexer->lookahead->type ?? null) {
  3.             case Lexer::T_SELECT:
  4.                 $statement $this->SelectStatement();
  5.                 break;
  6.             case Lexer::T_UPDATE:
  7.                 $statement $this->UpdateStatement();
  8.                 break;
  1.      * @return AST\SelectStatement|AST\UpdateStatement|AST\DeleteStatement
  2.      */
  3.     public function getAST()
  4.     {
  5.         // Parse & build AST
  6.         $AST $this->QueryLanguage();
  7.         // Process any deferred validations of some nodes in the AST.
  8.         // This also allows post-processing of the AST for modification purposes.
  9.         $this->processDeferredIdentificationVariables();
  1.      *
  2.      * @return ParserResult
  3.      */
  4.     public function parse()
  5.     {
  6.         $AST $this->getAST();
  7.         $customWalkers $this->query->getHint(Query::HINT_CUSTOM_TREE_WALKERS);
  8.         if ($customWalkers !== false) {
  9.             $this->customTreeWalkers $customWalkers;
  10.         }
  1.         }
  2.         // Cache miss.
  3.         $parser = new Parser($this);
  4.         $this->parserResult $parser->parse();
  5.         $queryCache->save($cacheItem->set($this->parserResult)->expiresAfter($this->queryCacheTTL));
  6.         return $this->parserResult;
  7.     }
  1.     /**
  2.      * {@inheritDoc}
  3.      */
  4.     protected function _doExecute()
  5.     {
  6.         $executor $this->parse()->getSqlExecutor();
  7.         if ($this->_queryCacheProfile) {
  8.             $executor->setQueryCacheProfile($this->_queryCacheProfile);
  9.         } else {
  10.             $executor->removeQueryCacheProfile();
  1.             $setCacheEntry = static function ($data) use ($cache$result$cacheItem$realCacheKey): void {
  2.                 $cache->save($cacheItem->set($result + [$realCacheKey => $data]));
  3.             };
  4.         }
  5.         $stmt $this->_doExecute();
  6.         if (is_numeric($stmt)) {
  7.             $setCacheEntry($stmt);
  8.             return $stmt;
in vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php -> executeIgnoreQueryCache (line 1166)
  1.     {
  2.         if ($this->cacheable && $this->isCacheEnabled()) {
  3.             return $this->executeUsingQueryCache($parameters$hydrationMode);
  4.         }
  5.         return $this->executeIgnoreQueryCache($parameters$hydrationMode);
  6.     }
  7.     /**
  8.      * Execute query ignoring second level cache.
  9.      *
  1.      *
  2.      * @return mixed
  3.      */
  4.     public function getResult($hydrationMode self::HYDRATE_OBJECT)
  5.     {
  6.         return $this->execute(null$hydrationMode);
  7.     }
  8.     /**
  9.      * Gets the array of results for the query.
  10.      *
AbstractQuery->getResult() in src/Repository/SessionsFormationsRepository.php (line 62)
  1.         if (!empty($criteria['Lieu'])) {
  2.             $qb->andWhere('j.Lieu = :lieu')
  3.                ->setParameter('lieu'$criteria['Lieu']);
  4.         }
  5.     
  6.         return $qb->getQuery()->getResult();
  7.     }
  8.     public function remove(SessionsFormations $entitybool $flush false): void
  9.     {
SessionsFormationsRepository->findByCriteria() in src/Controller/DefaultController.php (line 1309)
  1.             if ($request->query->get('ref')) {
  2.                 $sessionsCriteria['TitreFr'] = $request->query->get('ref');
  3.             }
  4.             $sessionsformations $sessionsFormationsRepository->findByCriteria($sessionsCriteria);
  5.             
  6.         
in vendor/symfony/http-kernel/HttpKernel.php -> planningFormation (line 163)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 35)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/var/www/vhosts/deamonerp.fr/httpdocs/cpi2/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. if($_SERVER['REMOTE_ADDR'] == '90.63.222.84')
  5. {
  6.     return function (array $context) {
  7.         return new Kernel($context['APP_DEV'], (bool) $context['APP_DEBUG']);
  8.     };

Doctrine\ORM\Query\ QueryException

SELECT j FROM App\Entity\SessionsFormations j LEFT JOIN j.Formations f LEFT JOIN j.Formations f WHERE f.SujetsFormations = :sujetsFormations AND j.TypesFormations = :typesFormations AND f.TitreFr = :titreFr AND j.Lieu = :lieu

  1.      *
  2.      * @return QueryException
  3.      */
  4.     public static function dqlError($dql)
  5.     {
  6.         return new self($dql);
  7.     }
  8.     /**
  9.      * @param string         $message
  10.      * @param Exception|null $previous
  1.         $tokenStr substr($dql$token->position$length);
  2.         // Building informative message
  3.         $message 'line 0, col ' $tokenPos " near '" $tokenStr "': Error: " $message;
  4.         throw QueryException::semanticalError($messageQueryException::dqlError($this->query->getDQL()));
  5.     }
  6.     /**
  7.      * Peeks beyond the matched closing parenthesis and returns the first token after that one.
  8.      *
  1.         $exists             = isset($this->queryComponents[$aliasIdentVariable]);
  2.         if ($exists) {
  3.             $this->semanticalError(
  4.                 sprintf("'%s' is already defined."$aliasIdentVariable),
  5.                 $this->lexer->token
  6.             );
  7.         }
  8.         return $aliasIdentVariable;
  9.     }
in vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php -> AliasIdentificationVariable (line 1815)
  1.             $this->match(Lexer::T_AS);
  2.         }
  3.         assert($this->lexer->lookahead !== null);
  4.         $aliasIdentificationVariable $this->AliasIdentificationVariable();
  5.         $indexBy                     $this->lexer->isNextToken(Lexer::T_INDEX) ? $this->IndexBy() : null;
  6.         $identificationVariable $joinAssociationPathExpression->identificationVariable;
  7.         $field                  $joinAssociationPathExpression->associationField;
in vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php -> JoinAssociationDeclaration (line 1740)
  1.         $this->match(Lexer::T_JOIN);
  2.         $next $this->lexer->glimpse();
  3.         assert($next !== null);
  4.         $joinDeclaration $next->type === Lexer::T_DOT $this->JoinAssociationDeclaration() : $this->RangeVariableDeclaration();
  5.         $adhocConditions $this->lexer->isNextToken(Lexer::T_WITH);
  6.         $join            = new AST\Join($joinType$joinDeclaration);
  7.         // Describe non-root join declaration
  8.         if ($joinDeclaration instanceof AST\RangeVariableDeclaration) {
  1.         while (
  2.             $this->lexer->isNextToken(Lexer::T_LEFT) ||
  3.             $this->lexer->isNextToken(Lexer::T_INNER) ||
  4.             $this->lexer->isNextToken(Lexer::T_JOIN)
  5.         ) {
  6.             $joins[] = $this->Join();
  7.         }
  8.         return new AST\IdentificationVariableDeclaration(
  9.             $rangeVariableDeclaration,
  10.             $indexBy,
in vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php -> IdentificationVariableDeclaration (line 1351)
  1.     public function FromClause()
  2.     {
  3.         $this->match(Lexer::T_FROM);
  4.         $identificationVariableDeclarations   = [];
  5.         $identificationVariableDeclarations[] = $this->IdentificationVariableDeclaration();
  6.         while ($this->lexer->isNextToken(Lexer::T_COMMA)) {
  7.             $this->match(Lexer::T_COMMA);
  8.             $identificationVariableDeclarations[] = $this->IdentificationVariableDeclaration();
  1.      *
  2.      * @return AST\SelectStatement
  3.      */
  4.     public function SelectStatement()
  5.     {
  6.         $selectStatement = new AST\SelectStatement($this->SelectClause(), $this->FromClause());
  7.         $selectStatement->whereClause   $this->lexer->isNextToken(Lexer::T_WHERE) ? $this->WhereClause() : null;
  8.         $selectStatement->groupByClause $this->lexer->isNextToken(Lexer::T_GROUP) ? $this->GroupByClause() : null;
  9.         $selectStatement->havingClause  $this->lexer->isNextToken(Lexer::T_HAVING) ? $this->HavingClause() : null;
  10.         $selectStatement->orderByClause $this->lexer->isNextToken(Lexer::T_ORDER) ? $this->OrderByClause() : null;
  1.         $this->lexer->moveNext();
  2.         switch ($this->lexer->lookahead->type ?? null) {
  3.             case Lexer::T_SELECT:
  4.                 $statement $this->SelectStatement();
  5.                 break;
  6.             case Lexer::T_UPDATE:
  7.                 $statement $this->UpdateStatement();
  8.                 break;
  1.      * @return AST\SelectStatement|AST\UpdateStatement|AST\DeleteStatement
  2.      */
  3.     public function getAST()
  4.     {
  5.         // Parse & build AST
  6.         $AST $this->QueryLanguage();
  7.         // Process any deferred validations of some nodes in the AST.
  8.         // This also allows post-processing of the AST for modification purposes.
  9.         $this->processDeferredIdentificationVariables();
  1.      *
  2.      * @return ParserResult
  3.      */
  4.     public function parse()
  5.     {
  6.         $AST $this->getAST();
  7.         $customWalkers $this->query->getHint(Query::HINT_CUSTOM_TREE_WALKERS);
  8.         if ($customWalkers !== false) {
  9.             $this->customTreeWalkers $customWalkers;
  10.         }
  1.         }
  2.         // Cache miss.
  3.         $parser = new Parser($this);
  4.         $this->parserResult $parser->parse();
  5.         $queryCache->save($cacheItem->set($this->parserResult)->expiresAfter($this->queryCacheTTL));
  6.         return $this->parserResult;
  7.     }
  1.     /**
  2.      * {@inheritDoc}
  3.      */
  4.     protected function _doExecute()
  5.     {
  6.         $executor $this->parse()->getSqlExecutor();
  7.         if ($this->_queryCacheProfile) {
  8.             $executor->setQueryCacheProfile($this->_queryCacheProfile);
  9.         } else {
  10.             $executor->removeQueryCacheProfile();
  1.             $setCacheEntry = static function ($data) use ($cache$result$cacheItem$realCacheKey): void {
  2.                 $cache->save($cacheItem->set($result + [$realCacheKey => $data]));
  3.             };
  4.         }
  5.         $stmt $this->_doExecute();
  6.         if (is_numeric($stmt)) {
  7.             $setCacheEntry($stmt);
  8.             return $stmt;
in vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php -> executeIgnoreQueryCache (line 1166)
  1.     {
  2.         if ($this->cacheable && $this->isCacheEnabled()) {
  3.             return $this->executeUsingQueryCache($parameters$hydrationMode);
  4.         }
  5.         return $this->executeIgnoreQueryCache($parameters$hydrationMode);
  6.     }
  7.     /**
  8.      * Execute query ignoring second level cache.
  9.      *
  1.      *
  2.      * @return mixed
  3.      */
  4.     public function getResult($hydrationMode self::HYDRATE_OBJECT)
  5.     {
  6.         return $this->execute(null$hydrationMode);
  7.     }
  8.     /**
  9.      * Gets the array of results for the query.
  10.      *
AbstractQuery->getResult() in src/Repository/SessionsFormationsRepository.php (line 62)
  1.         if (!empty($criteria['Lieu'])) {
  2.             $qb->andWhere('j.Lieu = :lieu')
  3.                ->setParameter('lieu'$criteria['Lieu']);
  4.         }
  5.     
  6.         return $qb->getQuery()->getResult();
  7.     }
  8.     public function remove(SessionsFormations $entitybool $flush false): void
  9.     {
SessionsFormationsRepository->findByCriteria() in src/Controller/DefaultController.php (line 1309)
  1.             if ($request->query->get('ref')) {
  2.                 $sessionsCriteria['TitreFr'] = $request->query->get('ref');
  3.             }
  4.             $sessionsformations $sessionsFormationsRepository->findByCriteria($sessionsCriteria);
  5.             
  6.         
in vendor/symfony/http-kernel/HttpKernel.php -> planningFormation (line 163)
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 35)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/var/www/vhosts/deamonerp.fr/httpdocs/cpi2/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. if($_SERVER['REMOTE_ADDR'] == '90.63.222.84')
  5. {
  6.     return function (array $context) {
  7.         return new Kernel($context['APP_DEV'], (bool) $context['APP_DEBUG']);
  8.     };