Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

@U025NCYDECF ```Zed.CRITICAL: Spryker\Zed\DataImport\Business\Exception\DataSetBrokerTransactionFa

Options
U02KNGVH7BP
U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet

@florian.scholz

Zed.CRITICAL: Spryker\Zed\DataImport\Business\Exception\DataSetBrokerTransactionFailedException - Class 'Pyz\Zed\Antelope\Dependency\AntelopeEvents' not found in "/data/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataSet/DataSetStepBrokerTransactionAware.php::59" {"exception":"[object] (Spryker\\Zed\\DataImport\\Business\\Exception\\DataSetBrokerTransactionFailedException(code: 0): Class 'Pyz\\Zed\\Antelope\\Dependency\\AntelopeEvents' not found at /data/vendor/spryker/data-import/src/Spryker/Zed/DataImport/Business/Model/DataSet/DataSetStepBrokerTransactionAware.php:59)

Comments

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Options

    can you double check the file Pyz\Zed\Antelope\Dependency\AntelopeEvents.php ?

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Options

    can you maybe paste the path + filename here?

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options

    src/Pyz/Zed/Antelope/Dependency/AntelopeEvents.php

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Options

    and in there you have

    namespace Pyz\Zed\Antelope\Dependency;
    
    interface AntelopeEvents
    

    right?

    if yes, can you please double check the content of src/Pyz/Zed/DataImport/Business/Model/Antelope/AntelopeWriterStep.php ?

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options

    for AntelopeEvents.php - yes

    double checked AntelopeWriterStep.php

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options
    <?php
    
    namespace Pyz\Zed\DataImport\Business\Model\Antelope;
    
    use Orm\Zed\Antelope\Persistence\PyzAntelopeQuery;
    use Spryker\Zed\DataImport\Business\Model\DataImportStep\DataImportStepInterface;
    use Spryker\Zed\DataImport\Business\Model\DataSet\DataSetInterface;
    use Pyz\Zed\Antelope\Dependency\AntelopeEvents;
    use Spryker\Zed\DataImport\Business\Model\DataImportStep\PublishAwareStep;
    
    class AntelopeWriterStep extends PublishAwareStep implements DataImportStepInterface
    {
        public const KEY_NAME = 'name';
        public const KEY_COLOR = 'color';
    
        /**
         * @param \Spryker\Zed\DataImport\Business\Model\DataSet\DataSetInterface $dataSet
         *
         * @throws \Spryker\Zed\DataImport\Business\Exception\EntityNotFoundException
         *
         * @return void
         */
        public function execute(DataSetInterface $dataSet)
        {
            $antelopeEntity = PyzAntelopeQuery::create()
                ->filterByName($dataSet[static::KEY_NAME])
                ->findOneOrCreate();
    
            $antelopeEntity->setColor($dataSet[static::KEY_COLOR]);
    
            if ($antelopeEntity->isNew() || $antelopeEntity->isModified()) {
                $antelopeEntity->save();
            }
    
            $this->addPublishEvents(AntelopeEvents::ENTITY_PYZ_ANTELOPE_CREATE, $antelopeEntity->getIdAntelope());
        }
    }
    
  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Options

    the exception happens on executing the data:import:antelope?

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options

    y

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Options

    if you remove the line

    $this->addPublishEvents(AntelopeEvents::ENTITY_PYZ_ANTELOPE_CREATE, $antelopeEntity->getIdAntelope());
    

    • is it still throwing the exception?

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options

    no

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Options

    Can you paste the content of your AntelopeEvents.php pls?

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options

    hold on

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options

    guess I found the issue

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options

    damn.. it’s working

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Options

    what was the problem?

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options

    AntelopeEvents.php had a space after the .php …

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Options

    😕 Would be cool if the IDE would show this better 🙈 but glad we could solve this

  • U02KNGVH7BP
    U02KNGVH7BP Posts: 15 🧑🏻‍🚀 - Cadet
    Options

    i found out by trying to look up the file on the console

  • michael.schmetter
    michael.schmetter Posts: 119 🧑🏻‍🚀 - Cadet
    Options

    @U02KNGVH7BP
    That also took me 2 hours of my lifetime.
    pyz_antelope_search.schema.xml had a trailing space in my PhpStorm, so no table was generated.
    @florian.scholz Maybe somehow you can notfiy your students next time to be extra careful, when copying class/filenames 😄

  • fsmeier
    fsmeier Senior Software Engineer & Developer Enablement Advocate Sprykee Posts: 1,016 ⚖️ - Guardians (admin)
    Options

    Yes, I agree with you. Maybe we can also upvote this here: https://youtrack.jetbrains.com/issue/IDEA-256426