Magento2 – 500 Error After Install: Class Magento\Framework\App\ResourceConnection\Proxy Does Not Exist

command lineinstallationmagento2

I installed Magento2 successfully through the commandline, but when i try to access the website, i get a Server Error 500.

The server runs on Ubuntu 14.04

I have no idea what is wrong, or what i am doing wrong.
I used a script to install Magento2 so i expect it to be correct

PHP Errors:

[Wed Mar 02 17:03:18.718890 2016] [:error] [pid 2292] [client 192.168.56.1:62335] PHP Fatal error: Uncaught exception 'ReflectionException' with message 'Class Magento\Framework\App\ResourceConnection\Proxy does not exist' in /var/www/html/vendor/magento/framework/Code/Reader/ClassReader.php:19\nStack trace:\n#0 /var/www/html/vendor/magento/framework/Code/Reader/ClassReader.php(19): ReflectionClass->__construct('Magento\\Framewo…')\n#1 /var/www/html/vendor/magento/framework/ObjectManager/Definition/Runtime.php(44): Magento\Framework\Code\Reader\ClassReader->getConstructor('Magento\\Framewo…')\n#2 /var/www/html/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(71): Magento\Framework\ObjectManager\Definition\Runtime->getParameters('Magento\\Framewo…')\n#3 /var/www/html/vendor/magento/framework/ObjectManager/ObjectManager.php(71): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create('Magento\\Framewo…')\n#4 /var/www/html/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(236): Magento\Framework\ObjectManager\ObjectManager->get('Magento\\Framewo…')\n#5 /var/ww in /var/www/html/vendor/magento/framework/Code/Reader/ClassReader.php on line 19

and this multiple times

[Wed Mar 02 17:03:18.718739 2016] [:error] [pid 2292] [client 192.168.56.1:62335] PHP Warning: include(): Failed opening '/var/www/html/var/generation/Magento/Framework/App/ResourceConnection/Proxy.php' for inclusion (include_path='/var/www/html/var/generation:/var/www/html/lib/internal:/var/www/html/var/generation:/var/www/html/lib/internal:/var/www/html/vendor/phpseclib/phpseclib/phpseclib:/var/www/html/vendor/magento/zendframework1/library:/var/www/html/vendor/phpunit/php-file-iterator:/var/www/html/vendor/phpunit/phpunit:/var/www/html/vendor/symfony/yaml:.:/usr/share/php:/usr/share/pear') in /var/www/html/vendor/magento/framework/Code/Generator/Io.php on line 158

and

[Wed Mar 02 17:03:18.718377 2016] [:error] [pid 2292] [client 192.168.56.1:62335] PHP Warning: include(): Failed opening '/var/www/html/var/generation/Magento//Framework/App/ResourceConnection/Proxy.php' for inclusion (include_path='/var/www/html/var/generation:/var/www/html/lib/internal:/var/www/html/var/generation:/var/www/html/lib/internal:/var/www/html/vendor/phpseclib/phpseclib/phpseclib:/var/www/html/vendor/magento/zendframework1/library:/var/www/html/vendor/phpunit/php-file-iterator:/var/www/html/vendor/phpunit/phpunit:/var/www/html/vendor/symfony/yaml:.:/usr/share/php:/usr/share/pear') in /var/www/html/vendor/composer/ClassLoader.php on line 412

Also, this is the core_config_data from the magento database

enter image description here

Any idea what i could try?

Best Answer

chown -R www-data:www-data /var/www/magento2/ 
chmod 777 -R var
chmod 777 -R generated
chmod 777 -R app/etc
rm -rf var/cache/* var/page_cache/* var/generation/*

and

php bin/magento setup:di:compile;
Related Topic