Magento 2.3 Error – Cannot Instantiate GetReservationsQuantityInterface

errorinterfacemagento2magento2.3

I just installed the latest magento 2 (Magento-CE-2.3.2) and imported a database from another working magento 2 store with Magento 2.3.1.

But if I try to load a product in the frontend, then I get a 500 error and the message

[Wed Jul 17 10:34:29.291844 2019] [php7:error] [pid 10517] [client
192.168.40.161:59517] PHP Fatal error: Uncaught Error: Cannot instantiate interface
Magento\InventoryReservationsApi\Model\GetReservationsQuantityInterface
in
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50\nStack
trace:\n#0
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/ObjectManager.php(70):
Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Invento…')\n#1
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160):
Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Invento…')\n#2
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246):
Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(Array,
'Magento\\Invento…', NULL, 'getReservations…',
'Magento\\Invento…')\n#3
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34):
Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArguments
in
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php
on line 50, referer:
http://entwicklung.hausfux.m2/produkte/insektenschutz/fenster/spannrahmen.html

What am I supposed to do? Im new to magento 2.

Update:

I followed the instructions from Muhammad Hasham's answer and also executed bin/magento setup:upgrade, now I get another error.

[Wed Jul 17 11:29:03.970607 2019] [php7:error] [pid 10608] [client
192.168.40.161:63754] PHP Fatal error: Uncaught ReflectionException: Class Magento\Framework\App\ResourceConnection\Proxy does not
exist in
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/Code/Reader/ClassReader.php:19\nStack
trace:\n#0
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/Code/Reader/ClassReader.php(19):
ReflectionClass->__construct('Magento\\Framewo…')\n#1
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Definition/Runtime.php(49): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo…')\n#2
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(48):
Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo…')\n#3
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/ObjectManager.php(70):
Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo…')\n#4
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160):
Magento\Framework\ObjectManager\ in
/srv/www/vhosts/hausfux_m2/vendor/magento/framework/Code/Reader/ClassReader.php
on line 19, referer:
http://entwicklung.hausfux.m2/produkte/insektenschutz/fenster/spannrahmen.html

Best Answer

If you use redis, run:

redis-cli flushall

or you'll need to run the following commands:

  • Clear generated
  • Clear var/cache
  • Enable Magento modules: php bin/magento module:enable --all
  • Compile DI php bin/magento setup:di:compile

I hope this will help

Related Topic