Home > Mobile >  Laravel Job error Job is incomplete class
Laravel Job error Job is incomplete class

Time:12-16

I'm getting an error I don't know how to fix so I wondering if I could get some help.

My function:

                dispatch(new \App\Jobs\createSqlJob($databaseName, $data['company_name']));

This is the error:

| 2022-12-13 21:36:38 | Exception: Job is incomplete class: {"__PHP_Incomplete_Class_Name":"App\\Jobs\\createSqlJob","99992","99992"} in /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php:116
Stack trace:
#0 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Queue/CallQueuedHandler.php(69): Illuminate\Queue\CallQueuedHandler->dispatchThroughMiddleware()
#1 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Queue/Jobs/Job.php(98): Illuminate\Queue\CallQueuedHandler->call()
#2 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(428): Illuminate\Queue\Jobs\Job->fire()
#3 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(378): Illuminate\Queue\Worker->process()
#4 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Queue/Worker.php(172): Illuminate\Queue\Worker->runJob()
#5 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(130): Illuminate\Queue\Worker->daemon()
#6 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Queue/Console/WorkCommand.php(114): Illuminate\Queue\Console\WorkCommand->runWorker()
#7 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): Illuminate\Queue\Console\WorkCommand->handle()
#8 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#9 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\Container\Util::unwrapIfClosure()
#10 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(37): Illuminate\Container\BoundMethod::callBoundMethod()
#11 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Container/Container.php(651): Illuminate\Container\BoundMethod::call()
#12 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Console/Command.php(136): Illuminate\Container\Container->call()
#13 /var/www/NTTJob/vendor/symfony/console/Command/Command.php(308): Illuminate\Console\Command->execute()
#14 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Console/Command.php(121): Symfony\Component\Console\Command\Command->run()
#15 /var/www/NTTJob/vendor/symfony/console/Application.php(1002): Illuminate\Console\Command->run()
#16 /var/www/NTTJob/vendor/symfony/console/Application.php(299): Symfony\Component\Console\Application->doRunCommand()
#17 /var/www/NTTJob/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#18 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Console/Application.php(102): Symfony\Component\Console\Application->run()
#19 /var/www/NTTJob/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(129): Illuminate\Console\Application->run()
#20 /var/www/NTTJob/artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#21 {main} |

This error occurs when I run dispatch to a job on server.

Where have I gone wrong?

i tried restart supervisor, but it failed

CodePudding user response:

In your job you are getting (DB NAME:string , COMPANY NAME:string)

($databaseName, $data['company_name'])

in error it says you are not giving a proper DB NAME

you are having numbers in it

,"99992","99992"

CodePudding user response:

Make sure you've restarted your queue worker after deployment

  • Related