DBALException not supported by platform #6718

Open
opened 2026-01-22 15:37:30 +01:00 by admin · 3 comments
Owner

Originally created by @saninshakya on GitHub (May 13, 2021).

I am getting at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:39

[13.05.2021 11:36:56]   at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:39
[13.05.2021 11:36:56] Exception trace:
[13.05.2021 11:36:56] 
[13.05.2021 11:36:56]                                                                                
[13.05.2021 11:36:56]    is not supported by platform.                                               
[13.05.2021 11:36:56]   Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL'  
[13.05.2021 11:36:56]   [Doctrine\DBAL\Exception]                                                    
[13.05.2021 11:36:56]                                                                                
[13.05.2021 11:36:56] In DBALException.php line 39:
[13.05.2021 11:36:56] 
[13.05.2021 11:36:56] 
[13.05.2021 11:36:56] app:import:target [--option1] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<arg1>]
[13.05.2021 11:36:56] 
[13.05.2021 11:36:56]  Symfony\Component\Console\Application->run() at /www/bin/console:42
[13.05.2021 11:36:56]  Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /www/vendor/symfony/console/Application.php:149
[13.05.2021 11:36:56]  Symfony\Component\Console\Application->doRun() at /www/vendor/symfony/framework-bundle/Console/Application.php:83
[13.05.2021 11:36:56]  Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /www/vendor/symfony/console/Application.php:273
[13.05.2021 11:36:56]  Symfony\Component\Console\Application->doRunCommand() at /www/vendor/symfony/framework-bundle/Console/Application.php:97
[13.05.2021 11:36:56]  Symfony\Component\Console\Command\Command->run() at /www/vendor/symfony/console/Application.php:1027
[13.05.2021 11:36:56]  App\Command\ImporttargetDataCommand->execute() at /www/vendor/symfony/console/Command/Command.php:255
[13.05.2021 11:36:56]  App\Model\ControllerManager\ImporterManager->import() at /www/src/Command/ImporttargetDataCommand.php:54
[13.05.2021 11:36:56]  App\Model\ControllerManager\ImporterManager->runTask() at /www/src/Model/ControllerManager/ImporterManager.php:95
[13.05.2021 11:36:56]  ContainerSk7D2Tq\EntityManager_9a5be93->persist() at /www/src/Model/ControllerManager/ImporterManager.php:363
[13.05.2021 11:36:56]  Doctrine\ORM\EntityManager->persist() at /www/var/cache/prod/ContainerSk7D2Tq/srcApp_KernelProdContainer.php:4178
[13.05.2021 11:36:56]  Doctrine\ORM\UnitOfWork->persist() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:614
[13.05.2021 11:36:56]  Doctrine\ORM\UnitOfWork->doPersist() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1746
[13.05.2021 11:36:56]  Doctrine\ORM\UnitOfWork->persistNew() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1790
[13.05.2021 11:36:56]  Doctrine\ORM\Id\SequenceGenerator->generate() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:959
[13.05.2021 11:36:56]  Doctrine\DBAL\Platforms\AbstractPlatform->getSequenceNextValSQL() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Id/SequenceGenerator.php:77
[13.05.2021 11:36:56]  Doctrine\DBAL\DBALException::notSupported() at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php:2987

I have used following dependecies at composer.json file

"beberlei/doctrineextensions": "^1.3",
"doctrine/annotations": "^1.0",
"doctrine/doctrine-bundle": "*",
"doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "2.8.1",

Originally created by @saninshakya on GitHub (May 13, 2021). I am getting at `/www/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:39` ``` [13.05.2021 11:36:56] at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:39 [13.05.2021 11:36:56] Exception trace: [13.05.2021 11:36:56] [13.05.2021 11:36:56] [13.05.2021 11:36:56] is not supported by platform. [13.05.2021 11:36:56] Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL' [13.05.2021 11:36:56] [Doctrine\DBAL\Exception] [13.05.2021 11:36:56] [13.05.2021 11:36:56] In DBALException.php line 39: [13.05.2021 11:36:56] [13.05.2021 11:36:56] [13.05.2021 11:36:56] app:import:target [--option1] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command> [<arg1>] [13.05.2021 11:36:56] [13.05.2021 11:36:56] Symfony\Component\Console\Application->run() at /www/bin/console:42 [13.05.2021 11:36:56] Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /www/vendor/symfony/console/Application.php:149 [13.05.2021 11:36:56] Symfony\Component\Console\Application->doRun() at /www/vendor/symfony/framework-bundle/Console/Application.php:83 [13.05.2021 11:36:56] Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /www/vendor/symfony/console/Application.php:273 [13.05.2021 11:36:56] Symfony\Component\Console\Application->doRunCommand() at /www/vendor/symfony/framework-bundle/Console/Application.php:97 [13.05.2021 11:36:56] Symfony\Component\Console\Command\Command->run() at /www/vendor/symfony/console/Application.php:1027 [13.05.2021 11:36:56] App\Command\ImporttargetDataCommand->execute() at /www/vendor/symfony/console/Command/Command.php:255 [13.05.2021 11:36:56] App\Model\ControllerManager\ImporterManager->import() at /www/src/Command/ImporttargetDataCommand.php:54 [13.05.2021 11:36:56] App\Model\ControllerManager\ImporterManager->runTask() at /www/src/Model/ControllerManager/ImporterManager.php:95 [13.05.2021 11:36:56] ContainerSk7D2Tq\EntityManager_9a5be93->persist() at /www/src/Model/ControllerManager/ImporterManager.php:363 [13.05.2021 11:36:56] Doctrine\ORM\EntityManager->persist() at /www/var/cache/prod/ContainerSk7D2Tq/srcApp_KernelProdContainer.php:4178 [13.05.2021 11:36:56] Doctrine\ORM\UnitOfWork->persist() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:614 [13.05.2021 11:36:56] Doctrine\ORM\UnitOfWork->doPersist() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1746 [13.05.2021 11:36:56] Doctrine\ORM\UnitOfWork->persistNew() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:1790 [13.05.2021 11:36:56] Doctrine\ORM\Id\SequenceGenerator->generate() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:959 [13.05.2021 11:36:56] Doctrine\DBAL\Platforms\AbstractPlatform->getSequenceNextValSQL() at /www/vendor/doctrine/orm/lib/Doctrine/ORM/Id/SequenceGenerator.php:77 [13.05.2021 11:36:56] Doctrine\DBAL\DBALException::notSupported() at /www/vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php:2987 ``` I have used following dependecies at `composer.json` file ["beberlei/doctrineextensions": "^1.3", "doctrine/annotations": "^1.0", "doctrine/doctrine-bundle": "*", "doctrine/doctrine-migrations-bundle": "^3.0", "doctrine/orm": "2.8.1",](url)
Author
Owner

@beberlei commented on GitHub (May 13, 2021):

Please post the full stack trace of the exception, we cannot help without it

@beberlei commented on GitHub (May 13, 2021): Please post the full stack trace of the exception, we cannot help without it
Author
Owner

@saninshakya commented on GitHub (May 13, 2021):

Please post the full stack trace of the exception, we cannot help without it

@beberlei please check. I have added full trace in the question

@saninshakya commented on GitHub (May 13, 2021): > Please post the full stack trace of the exception, we cannot help without it @beberlei please check. I have added full trace in the question
Author
Owner

@laferte-tech commented on GitHub (Jun 26, 2021):

Hello, same problem for me, impossible to persist an object (update is still working) in my prod environment, it's working in dev... I'm using Docker for both.
The error is:

Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL' is not supported by platform.

Stack trace sample for an admin controller where i do a simple persist($object):

Doctrine\DBAL\Exception: Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL' is not supported by platform.
#14 /vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(39): Doctrine\DBAL\DBALException::notSupported
#13 /vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php(2987): Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL
#12 /vendor/doctrine/orm/lib/Doctrine/ORM/Id/SequenceGenerator.php(74): Doctrine\ORM\Id\SequenceGenerator::generate
#11 /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(983): Doctrine\ORM\UnitOfWork::persistNew
#10 /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1807): Doctrine\ORM\UnitOfWork::doPersist
#9 /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1764): Doctrine\ORM\UnitOfWork::persist
#8 /vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(629): Doctrine\ORM\EntityManager::persist
#7 /var/cache/prod/ContainerJUnrhMY/App_KernelProdContainer.php(12080): ContainerJUnrhMY\EntityManager_9a5be93::persist
#6 /src/Controller/AdminController.php(43): App\Controller\AdminController::registerWebHook
#5 /vendor/symfony/http-kernel/HttpKernel.php(157): Symfony\Component\HttpKernel\HttpKernel::handleRaw
#4 /vendor/symfony/http-kernel/HttpKernel.php(79): Symfony\Component\HttpKernel\HttpKernel::handle
#3 /vendor/symfony/http-kernel/Kernel.php(199): Symfony\Component\HttpKernel\Kernel::handle
#2 /vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(37): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner::run
#1 /vendor/autoload_runtime.php(35): require_once
#0 /public/index.php(5): null

I'm using the latests versions, PHP 8 and mysql 8.0.25. I didn't change anything in my entities, my ids are like this:

    /**
     * @ORM\Id
     * @ORM\GeneratedValue
     * @ORM\Column(type="integer")
     */
    private ?int $id = null;

i specified the server version in doctrine dbal to '8.0.25'
I'm totally stuck with this
Thanks for your help

@laferte-tech commented on GitHub (Jun 26, 2021): Hello, same problem for me, impossible to persist an object (update is still working) in my prod environment, it's working in dev... I'm using Docker for both. The error is: `Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL' is not supported by platform.` Stack trace sample for an admin controller where i do a simple persist($object): ``` Doctrine\DBAL\Exception: Operation 'Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL' is not supported by platform. #14 /vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(39): Doctrine\DBAL\DBALException::notSupported #13 /vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php(2987): Doctrine\DBAL\Platforms\AbstractPlatform::getSequenceNextValSQL #12 /vendor/doctrine/orm/lib/Doctrine/ORM/Id/SequenceGenerator.php(74): Doctrine\ORM\Id\SequenceGenerator::generate #11 /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(983): Doctrine\ORM\UnitOfWork::persistNew #10 /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1807): Doctrine\ORM\UnitOfWork::doPersist #9 /vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php(1764): Doctrine\ORM\UnitOfWork::persist #8 /vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php(629): Doctrine\ORM\EntityManager::persist #7 /var/cache/prod/ContainerJUnrhMY/App_KernelProdContainer.php(12080): ContainerJUnrhMY\EntityManager_9a5be93::persist #6 /src/Controller/AdminController.php(43): App\Controller\AdminController::registerWebHook #5 /vendor/symfony/http-kernel/HttpKernel.php(157): Symfony\Component\HttpKernel\HttpKernel::handleRaw #4 /vendor/symfony/http-kernel/HttpKernel.php(79): Symfony\Component\HttpKernel\HttpKernel::handle #3 /vendor/symfony/http-kernel/Kernel.php(199): Symfony\Component\HttpKernel\Kernel::handle #2 /vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php(37): Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner::run #1 /vendor/autoload_runtime.php(35): require_once #0 /public/index.php(5): null ``` I'm using the latests versions, PHP 8 and mysql 8.0.25. I didn't change anything in my entities, my ids are like this: ``` /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private ?int $id = null; ``` i specified the server version in doctrine dbal to '8.0.25' I'm totally stuck with this Thanks for your help
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6718