magento2 icon indicating copy to clipboard operation
magento2 copied to clipboard

sample data not install

Open Antonioele opened this issue 11 years ago • 14 comments

First installation deadlock at 96% Installing customers.. if I continue

[ERROR] exception 'Magento\Framework\Exception\State\InputMismatchException' with message 'Customer with the same email already exists in associated website.' in /var/www/magento2.dev/app/code/Magento/Customer/Model/AccountManagement.php:529 Stack trace: #0 /var/www/magento2.dev/app/code/Magento/Customer/Model/AccountManagement.php(489): Magento\Customer\Model\AccountManagement->createAccountWithPasswordHash(Object(Magento\Customer\Model\Data\Customer), 'f3f4e28c7d06c41...', '') #1 /var/www/magento2.dev/dev/tools/Magento/Tools/SampleData/Module/Customer/Setup/Customer.php(145): Magento\Customer\Model\AccountManagement->createAccount(Object(Magento\Customer\Model\Data\Customer), 'yayitsroni!') #2 /var/www/magento2.dev/dev/tools/Magento/Tools/SampleData/Module/Customer/Setup.php(35): Magento\Tools\SampleData\Module\Customer\Setup\Customer->run() #3 /var/www/magento2.dev/dev/tools/Magento/Tools/SampleData/Installer.php(81): Magento\Tools\SampleData\Module\Customer\Setup->run() #4 /var/www/magento2.dev/setup/module/Magento/Setup/src/Model/SampleData.php(75): Magento\Tools\SampleData\Installer->run(Object(Magento\User\Model\User)) #5 /var/www/magento2.dev/setup/module/Magento/Setup/src/Model/Installer.php(896): Magento\Setup\Model\SampleData->install(Object(Magento\Framework\ObjectManager\ObjectManager), Object(Magento\Setup\Model\WebLogger), 'admin') #6 [internal function]: Magento\Setup\Model\Installer->installSampleData(Array) #7 /var/www/magento2.dev/setup/module/Magento/Setup/src/Model/Installer.php(297): call_user_func_array(Array, Array) #8 /var/www/magento2.dev/setup/module/Magento/Setup/src/Controller/Install.php(80): Magento\Setup\Model\Installer->install(Array) #9 /var/www/magento2.dev/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractActionController.php(83): Magento\Setup\Controller\Install->startAction() #10 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent)) #11 /var/www/magento2.dev/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #12 /var/www/magento2.dev/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #13 /var/www/magento2.dev/vendor/zendframework/zend-mvc/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #14 /var/www/magento2.dev/vendor/zendframework/zend-mvc/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response)) #15 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent)) #16 /var/www/magento2.dev/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent)) #17 /var/www/magento2.dev/vendor/zendframework/zend-eventmanager/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #18 /var/www/magento2.dev/vendor/zendframework/zend-mvc/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure)) #19 /var/www/magento2.dev/setup/index.php(25): Zend\Mvc\Application->run() #20 {main}

Antonioele avatar Jan 24 '15 11:01 Antonioele

the second installation say exception 'Magento\Framework\Exception\State\InputMismatchException' with message 'Customer with the same email already exists in associated website.' in /var/www/magento2.dev/app/code/Magento/Customer/Model/AccountManagement.php:529., but email is email administrator.

Antonioele avatar Jan 24 '15 11:01 Antonioele

@Antonioele installing sample data does take a while. Please be patient. Also, ensure xdebug's nesting level is set to 200. Regarding your second error, this is expected since the previous install did insert values in the database. If you want to use the same email, you will have to clear your database and then install again. There is a command line tool to do this. php -f setup/index.php uninstall from Magento's root folder. More information here.

mazhalai avatar Jan 24 '15 17:01 mazhalai

Hi, I have this issue while installing Magento 2 with sample data:

Installing sample data: [ERROR] exception 'Magento\Framework\Exception' with message 'Source class Magento\Core\Model\Resource\Theme\Collection doesn't exist.' in /users/andreasacca/Sites/magento2/lib/internal/Magento/Framework/Code/Generator.php:103

andreasacca avatar Feb 01 '15 15:02 andreasacca

You can execute bash command for quick fix

find ./dev/tools/Magento/Tools/SampleData/ -type f -exec sed -i 's/Magento\\Store\\Model\\StoreManagerInterface/Magento\\Framework\\Store\\StoreManagerInterface/' {} \;

find ./dev/tools/Magento/Tools/SampleData/ -type f -exec sed -i 's/Magento\\Core\\Model\\Resource\\Theme\\Collection/Magento\\Theme\\Model\\Resource\\Theme\\Collection/' {} \;

or use last version of sample data

Sanuch avatar Feb 01 '15 17:02 Sanuch

Hi @Sanuch, thank you for the answer. I used last version of Sample Data. I tried to launch the command throught terminal (mac) without success.

I'm into my magento2 folder, and I launched your command but I got this error: invalid command code .

Then I tried this

find dev/tools/Magento/Tools/SampleData/ -type f -exec sed -i 's/Magento\\Store\\Model\\StoreManagerInterface/Magento\\Framework\\Store\\StoreManagerInterface/' {} \;

but this error occur: sed: 1: "dev/tools/Magento/Tools ...": extra characters at the end of d command

Thanks

andreasacca avatar Feb 04 '15 10:02 andreasacca

@andreasacca, Magento 2(beta6) with Sample Data(beta6) were installed successfully

Sanuch avatar Feb 04 '15 10:02 Sanuch

@Antonioele Do you still have this problem?

joanhe avatar Feb 04 '15 18:02 joanhe

@joanhe I am facing the same issue. None of the solutions above worked for me. Then i tried to install Magento from scratch. It installed some data then throw this exception. "ReflectionException Class Magento\Core\Model\Resource\Theme\CollectionFactory does not exist" I could not find the required Class on that path. Thanks.

ihabzeedia avatar Feb 04 '15 22:02 ihabzeedia

@ihabzeedia I don't see Magento\Core\Model\Resource\Theme\CollectionFactory has been used in Magento 2 code base. Do you have any module that you created in your code base?

joanhe avatar Feb 05 '15 20:02 joanhe

Same problem got. "exception 'Magento\Framework\Exception\State\InputMismatchException' with message 'Customer with the same email already exists in associated website.'"

Fix done by edit file - dev/tools/Magento/Tools/SampleData/Module/Customer/Setup/Customer.php

find function run and comment all inside it, looks like its trying to create new customer, but the customer were created by first time of run, and its gives the error on same emails.

yaro-tr avatar Feb 08 '15 17:02 yaro-tr

@joanhe No I did not create any file. Its just calling a class that does not exist.

ihabzeedia avatar Feb 09 '15 15:02 ihabzeedia

What version of php are you running? I recall a suspected problem with a particular patch version of php possibly having troubles with plugins, code generation etc.

alankent avatar Feb 09 '15 16:02 alankent

Hi, I tried right now with MAGETWO-31080: M2 GitHub Update (version 0.42.0-beta7)

EDIT: I opened a new issue here

installation stops at 93%with sample data:

Installing sample data: [ERROR] exception 'Magento\Framework\Exception' with message 'Source class Magento\Core\Model\Resource\Theme\Collection doesn't exist.' in /users/andreasacca/Sites/magento2-beta7/lib/internal/Magento/Framework/Code/Generator.php:103 Stack trace:

...

Next exception 'ReflectionException' with message 'Class Magento\Core\Model\Resource\Theme\CollectionFactory does not exist' in /users/andreasacca/Sites/magento2-beta7/lib/internal/Magento/Framework/Code/Reader/ClassReader.php:29 Stack trace: ...

Next exception 'ReflectionException' with message 'Class Magento\Core\Model\Resource\Theme\CollectionFactory does not exist' in /users/andreasacca/Sites/magento2-beta7/lib/internal/Magento/Framework/Code/Reader/ClassReader.php:37 Stack trace:

EDIT: I opened a new issue here

andreasacca avatar Feb 09 '15 16:02 andreasacca

Closed. Contributor @Antonioele did not confirm, that the issue still exists for him. The new ticket for the same problem was created by @andreasacca.

vpelipenko avatar Mar 17 '15 16:03 vpelipenko