AEM 6.2 connector to Magento 2



Hi Guys

I am working with AEM 6.2 and the connector to Magento2. I am getting an exception when I run the product importer through the touch UI or class UI:

com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of com.infield.magento.catalog.connector.models.MagentoProduct, problem: null

In the logs it shows the product json from Magento and I don't see any issues with the format of the json. Here is a sample of the json:

at [Source: {"items":[{"id":1,"sku":"24-WG085","name":"Sprite Yoga Strap 6 foot","attribute_set_id":4,"price":14,"status":1,"visibility":4,"type_id":"simple","created_at":"2017-09-29 20:35:12","updated_at":"2017-09-29 20:35:17","weight":1,"extension_attributes":[],"product_links":[{"sku":"24-WG085","link_type":"related","linked_product_sku":"24-WG086","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-WG085","link_type":"related","linked_product_sku":"24-WG087","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-WG085","link_type":"crosssell","linked_product_sku":"24-WG086","linked_product_type":"simple","position":null,"extension_attributes":[]},{"sku":"24-WG085","link_type":"crosssell","linked_product_sku":"24-WG087",.......

Has anyone else seen this problem and know how to resolve this issue?





Yes, I had to re-write the importer to handle nulls and empty spaces when getting products from Magento. There are nulls and empty spaces because in Magento there are parent products that do not have values filled in for all of the necessary attributes. The code in the importer will do a hard fail if it encounters this, throwing this above exception. Changing the code to handle the nulls or empty spaces will allow the importer to continue on and import the parents and their children. 

Also, there were a few key gotchas that were not documented anywhere.

1.) The connection string to the importer is: <sever_name>/index.php

- it will create the path to the Magento product catalog on its own through the service. Trying to add the full path to the catalog or <sever_name>/index.php/admin does not allow the identity provider to authenticate against the Magento instance and throws a poorly handled exception.

2.) Make sure that the Magento identity provider in your OSGI configs is just the server name, no other paths are needed.

3.) To get the images to be in the dam you will have to get SSH access to the actual images on the Magento server, down them locally,  and use the acs-commons tool to do a bulk asset importer into AEM.

  - the importer will run giving you a valid path to the dam on the product to the image but the image to the products will not be there as the importer will not port over the actual image. 

Hope this helps.




Hi..can you help me with this integration? Any document available which I can follow ? Is that some custom product importer which you wrote or something available out of the box ?