Replies: 2 comments 1 reply
-
You might be using a DB driver that doesn't support transactions, you can disable transactions here https://github.com/SpartnerNL/Laravel-Excel/blob/3.1/config/excel.php#L280 |
Beta Was this translation helpful? Give feedback.
1 reply
-
Hello Here is my stacktraceError: Call to a member function beginTransaction() on null in /var/www/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php:176 Stack trace: #0 /var/www/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(142): Illuminate\Database\Connection->handleBeginTransactionException(Object(Error)) #1 /var/www/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(116): Illuminate\Database\Connection->createTransaction() #2 /var/www/vendor/laravel/framework/src/Illuminate/Database/Concerns/ManagesTransactions.php(24): Illuminate\Database\Connection->beginTransaction() #3 /var/www/vendor/maatwebsite/excel/src/Transactions/DbTransactionHandler.php(30): Illuminate\Database\Connection->transaction(Object(Closure)) #4 /var/www/vendor/maatwebsite/excel/src/Jobs/ReadChunk.php(175): Maatwebsite\Excel\Transactions\DbTransactionHandler->__invoke(Object(Closure)) #5 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Maatwebsite\Excel\Jobs\ReadChunk->handle(Object(Maatwebsite\Excel\Transactions\DbTransactionHandler)) #6 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #7 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure)) #8 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure)) #9 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL) #10 /var/www/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(128): Illuminate\Container\Container->call(Array) #11 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Bus\Dispatcher->Illuminate\Bus\{closure}(Object(Maatwebsite\Excel\Jobs\ReadChunk)) #12 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Maatwebsite\Excel\Jobs\ReadChunk)) #13 /var/www/vendor/laravel/framework/src/Illuminate/Bus/Dispatcher.php(132): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #14 /var/www/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(123): Illuminate\Bus\Dispatcher->dispatchNow(Object(Maatwebsite\Excel\Jobs\ReadChunk), false) #15 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\Queue\CallQueuedHandler->Illuminate\Queue\{closure}(Object(Maatwebsite\Excel\Jobs\ReadChunk)) #16 /var/www/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}(Object(Maatwebsite\Excel\Jobs\ReadChunk)) #17 /var/www/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(125): Illuminate\Pipeline\Pipeline->then(Object(Closure)) #18 /var/www/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(69): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware(Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Maatwebsite\Excel\Jobs\ReadChunk)) #19 /var/www/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call(Object(Illuminate\Queue\Jobs\DatabaseJob), Array) #20 /var/www/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(429): Illuminate\Queue\Jobs\Job->fire() #21 /var/www/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(379): Illuminate\Queue\Worker->process('database', Object(Illuminate\Queue\Jobs\DatabaseJob), Object(Illuminate\Queue\WorkerOptions)) #22 /var/www/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(173): Illuminate\Queue\Worker->runJob(Object(Illuminate\Queue\Jobs\DatabaseJob), 'database', Object(Illuminate\Queue\WorkerOptions)) #23 /var/www/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(150): Illuminate\Queue\Worker->daemon('database', 'default', Object(Illuminate\Queue\WorkerOptions)) #24 /var/www/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(134): Illuminate\Queue\Console\WorkCommand->runWorker('database', 'default') #25 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle() #26 /var/www/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #27 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure(Object(Closure)) #28 /var/www/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure)) #29 /var/www/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL) #30 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(139): Illuminate\Container\Container->call(Array) #31 /var/www/vendor/symfony/console/Command/Command.php(308): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #32 /var/www/vendor/laravel/framework/src/Illuminate/Console/Command.php(124): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #33 /var/www/vendor/symfony/console/Application.php(998): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #34 /var/www/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Queue\Console\WorkCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #35 /var/www/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #36 /var/www/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #37 /var/www/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #38 /var/www/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #39 {main} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Getting Call to a member function beginTransaction() on null error when importing CSV files using queues? Can any once help with this?
Beta Was this translation helpful? Give feedback.
All reactions