cancel
Showing results for 
Search instead for 
Did you mean: 

Add product error

Add product error

There is an error when trying to add products:

a:4:{i:0;s:101:"Class Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\ConfigurableFactory does not exist";i:1;s:6770:"#0 /var/www/vendor/magento/framework/Code/Generator/Autoloader.php(35): Magento\Framework\Code\Generator-$
#1 [internal function]: Magento\Framework\Code\Generator\Autoloader->load('Magento\\Configu...')
#2 [internal function]: spl_autoload_call('Magento\\Configu...')
#3 /var/www/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Configu...')
#4 /var/www/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Configu...')
#5 /var/www/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(71): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Configu...')
#6 /var/www/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Configu...')
#7 /var/www/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(126): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Configu...')
#8 /var/www/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(53): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array, 'Magento\\Configu...', NULL, 'configurableTyp...', 'Magento\\Configu..$
#9 /var/www/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(82): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->_resolveArguments('Magento\\Configu...', Array, Array)
#10 /var/www/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Configu...')
#11 /var/www/vendor/magento/framework/Interception/PluginList/PluginList.php(232): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Configu...')
#12 /var/www/vendor/magento/framework/Interception/Interceptor.php(140): Magento\Framework\Interception\PluginList\PluginList->getPlugin('Magento\\Catalog...', 'configurable')
#13 /var/www/var/generation/Magento/Catalog/Controller/Adminhtml/Product/Builder/Interceptor.php(26): Magento\Catalog\Controller\Adminhtml\Product\Builder\Interceptor->___callPlugins('build', Array, Array)
#14 /var/www/vendor/magento/module-catalog/Controller/Adminhtml/Product/NewAction.php(62): Magento\Catalog\Controller\Adminhtml\Product\Builder\Interceptor->build(Object(Magento\Framework\App\Request\Http))
#15 /var/www/var/generation/Magento/Catalog/Controller/Adminhtml/Product/NewAction/Interceptor.php(24): Magento\Catalog\Controller\Adminhtml\Product\NewAction->execute()
#16 /var/www/vendor/magento/framework/App/Action/Action.php(102): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->execute()
#17 /var/www/vendor/magento/module-backend/App/AbstractAction.php(226): Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#18 /var/www/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Backend\App\AbstractAction->dispatch(Object(Magento\Framework\App\Request\Http))
#19 /var/www/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->___callParent('dispatch', Array)
#20 /var/www/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor)$
#21 /var/www/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(143): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#22 /var/www/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor), Object(Closure), Object$
#23 /var/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Catalog...', 'dispatch', Object(Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor$
#24 /var/www/vendor/magento/module-backend/App/Action/Plugin/MassactionKey.php(33): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#25 /var/www/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Backend\App\Action\Plugin\MassactionKey->aroundDispatch(Object(Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor), Object(Closure), Object$
#26 /var/www/var/generation/Magento/Catalog/Controller/Adminhtml/Product/NewAction/Interceptor.php(39): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->___callPlugins('dispatch', Array, Array)
#27 /var/www/vendor/magento/framework/App/FrontController.php(55): Magento\Catalog\Controller\Adminhtml\Product\NewAction\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#28 /var/www/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#29 /var/www/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#30 /var/www/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'instal$
#31 /var/www/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#32 /var/www/vendor/magento/framework/Interception/Interceptor.php(142): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framew$
#33 /var/www/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#34 /var/www/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#35 /var/www/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#36 /var/www/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#37 {main}";s:3:"url";s:121:"/admin/catalog/product/new/set/4/type/simple/key/d56e9bed5dc84dbefbd81d00f0668c4c1964325309ba2d735f3db2f33155e81c/";s:11:"script_name";s:10:"/index.php";}

Pls help

2 REPLIES 2

Re: Add product error

Re: Add product error

Magento 2 generates Factory classes inside var/generation directory. So,
if there is folder permission issue or folder owner issue with that
directory then the factory class cannot be generated and you get factory
not exists error.

 

When you clear var/generation directory and set appropriate permission to
it then this error should be solved.

 

Also please make sure to verify that, upgrade is working without any
issues.