# Migration Magento 2.2 zu Shopware 6 - Internal Server Error beim premapping

**URL:** https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047
**Category:** Allgemein
**Created:** [20. August 2020 um 08:39 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047 "2020-08-20T08:39:43Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Max12](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Max12](https://forum.shopware.com/u/Max12)
#### Post date: [20. August 2020 um 08:39 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/1 "2020-08-20T08:39:43Z")

</div>

Hallo,

bei der Migration der “Kunden & Bestellungen” von Magento 2.2 zu Shopware 6.3.0.2 hängt der Prozess bei “Die Prüfung der Daten wird durchgeführt”. In der Browser-Konsole wird ein Internal Server Error der Route “/api/v2/\_action/migration/generate-premapping” ausgegeben. Im prod.log sind keine Fehler zu finden.

Die Migration der Newsletter-Empfänger hatte zuvor fehlerfrei funktioniert und ist vollständig durchgelaufen.

Was können wir hier tun?

Beste Grüße

---

<div class="post-metadata">

### Author: ![AndreHerking](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/andreherking/32/7839_2.png) [@AndreHerking](https://forum.shopware.com/u/AndreHerking)
#### Post date: [20. August 2020 um 08:48 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/2 "2020-08-20T08:48:29Z")

</div>

Hast du vielleicht einen Fehler im Server Log gefunden? Ich kann mir aber vorstellen, dass die Datenmenge zu groß ist und daher die Ressourcen über den Webserver nicht ausreichen.

&nbsp;

Probiere daher mal via CLI die Migration durchzuführen:

&nbsp;

[https://docs.shopware.com/de/migration-de/Migrationsprozess?category=migration-de/shopware5#migration-bei-grossen-datenmengen-ueber-die-konsole](https://docs.shopware.com/de/migration-de/Migrationsprozess?category=migration-de/shopware5#migration-bei-grossen-datenmengen-ueber-die-konsole)

Auch wenn da SW5 steht ist der Befehl der gleiche 🙂

---

<div class="post-metadata">

### Author: ![Max12](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Max12](https://forum.shopware.com/u/Max12)
#### Post date: [20. August 2020 um 09:02 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/3 "2020-08-20T09:02:17Z")

</div>

Hallo @AndreHerking‍,

vielen Dank für Deine Rückmeldung.

Ich habe nun versucht die Migration via CLI zu starten und folgende Fehler bekommen:

```
In AbstractMySQLDriver.php line 42:

  An exception occurred while executing 'SELECT attrOption.option_id, attrOptionValue.value FROM eav_attr
  ibute attr INNER JOIN tS1a_eav_attribute_option attrOption ON attrOption.attribute_id = attr.attribute_
  id INNER JOIN tS1a_eav_attribute_option_value attrOptionValue ON attrOption.option_id = attrOptionValue
  .option_id WHERE attr.attribute_code = 'gender' AND is_user_defined = false AND store_id = 0':

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mag_db.eav_attribute' doesn't exist

In PDOConnection.php line 80:

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mag_db.eav_attribute' doesn't exist

In PDOConnection.php line 75:

  SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mag_db.eav_attribute' doesn't exist
```

---

<div class="post-metadata">

### Author: ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)
#### Post date: [20. August 2020 um 10:17 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/4 "2020-08-20T10:17:37Z")

</div>

Hi Max,

komisch, sehe ich das richtig, dass du einen Tableprefix bei der Magento-DB nutzt?  
Welche Version des Magento-Profils nutzt du zur Zeit?

Gruß

Krispin

---

<div class="post-metadata">

### Author: ![Max12](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Max12](https://forum.shopware.com/u/Max12)
#### Post date: [20. August 2020 um 10:23 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/5 "2020-08-20T10:23:55Z")

</div>

Hi @Krispin‍,

genau - wir benutzen einen Tableprefix in der Magento-DB („tS1a\_“).

Wir benutzen aktuell die Version 1.5.0 des Magento-Profils.

Gruß

Max

---

<div class="post-metadata">

### Author: ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)
#### Post date: [20. August 2020 um 13:23 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/6 "2020-08-20T13:23:17Z")

</div>

Hi Max,

was mich stutzig macht ist, dass in der Query im From-Teil der Prefix nicht genutzt wird…  
Nur um es auszuschließen: An der Klasse “custom/plugins/SwagMigrationMagento/src/Profile/Magento19/Gateway/Local/Magento19LocalGateway.php” wurden keine manuellen Anpassungen gemacht richtig?

Gruß

Krispin

---

<div class="post-metadata">

### Author: ![Max12](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Max12](https://forum.shopware.com/u/Max12)
#### Post date: [20. August 2020 um 13:42 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/7 "2020-08-20T13:42:19Z")

</div>

Hi @Krispin‍,

nein - an der Klasse “custom/plugins/SwagMigrationMagento/src/Profile/Magento19/Gateway/Local/Magento19LocalGateway.php” wurden keine manuellen Anpassungen vorgenommen.

Gruß

Max

---

<div class="post-metadata">

### Author: ![Krispin](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/krispin/32/12849_2.png) [@Krispin](https://forum.shopware.com/u/Krispin)
#### Post date: [20. August 2020 um 13:57 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/8 "2020-08-20T13:57:43Z")

</div>

Hi Max,

ich sehe gerade, da ist anscheinend noch ein kleiner Fehler im Local-Gateway für Magento 2:&nbsp;[https://github.com/shopwareLabs/SwagMigrationMagento/blob/master/src/Profile/Magento2/Gateway/Local/Magento2LocalGateway.php#L303](https://github.com/shopwareLabs/SwagMigrationMagento/blob/master/src/Profile/Magento2/Gateway/Local/Magento2LocalGateway.php#L303)  
Hier müsste, wie bei den anderen Tabellen auch,&nbsp;der Prefix hinzugefügt werden. Du kannst das als Hotfix bei dir einbauen. Ich habe schonmal hierfür ein Ticket erstellt:&nbsp;[https://issues.shopware.com/issues/MIG-29](https://issues.shopware.com/issues/MIG-29). Der Bugfix wird in einer der nächsten Releases mit drin sein.

Gruß

Krispin

---

<div class="post-metadata">

### Author: ![Max12](https://avatars.discourse-cdn.com/v4/letter/m/73ab20/32.png) [@Max12](https://forum.shopware.com/u/Max12)
#### Post date: [20. August 2020 um 14:26 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/9 "2020-08-20T14:26:19Z")

</div>

Hi Krispin,

perfekt - vielen Dank für Deine schnelle Hilfe. Nachdem ich den Hotfix eingebaut habe konnte ich die Migration jetzt via CLI starten.

Gruß Max

---

<div class="post-metadata">

### Author: ![daveYuberlin](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@daveYuberlin](https://forum.shopware.com/u/daveYuberlin)
#### Post date: [8. Februar 2023 um 12:25 UTC](https://forum.shopware.com/t/migration-magento-2-2-zu-shopware-6-internal-server-error-beim-premapping/69047/10 "2023-02-08T12:25:28Z")

</div>

Ich habe genau das gleiche Problem wie [Max12] aus dem Anfangspost. Testmigration von Magento 2.2 auf die aktuelle Shopware 6 Version.

Bekomme den Fehler 500 (Internal Server Error) in /api/\_action/migration/generate-premapping

Fix von Krispin ist ja in meiner Version schon drin, außerdem verwendet meine Magento Datenbank keinen Prefix.

„Die Prüfung der Daten wird durchgeführt“ hängt ewig und kommt nicht weiter. Ohne Premapping kann ich leider auch keine Migration per CLI probieren.

Achtung: Nach Umstellung auf PHP 8.0 (vorher 8.1) geht es nun.
