Error Loading MapperService Class From Namespace
clarkedb opened this issue · 6 comments
Successfully installed and created a configuration. However, after an item is saved and published in Pimcore, Magento successfully receives notice of the changed product by Pimcore Object ID, but then there is a Symfony error on the Pimcore side when Magento makes the request to get the remaining product information.
Attempted to load class 'MapperService' from namespace 'Divante\MagentoIntegrationBundle\Service'. Did you forget a 'use' statement for 'Divante\ObjectMapperBundle\Service\MapperService'?
Setup Information
- pimcore-magento2-bridge: 1.0.2
- Pimcore 5.6.5
Call To Pimcore Server
Logger.INFO:
====REQUEST====
POST http://PIMCORE_IP/webservice/rest/product/update-status HTTP/1.1
Authorization: Bearer AUTHORIZATION_TOKEN
Content-Type: application/x-www-form-urlencoded
Accept: application/x-www-form-urlencoded
QUERY: instanceUrl=http://MAGENTO_IP_ADDRESS&apikey=API_KEY&storeViewId=1
POST: message=product with ID 2314 successfully added to queue&status=SUCCESS&id=2314
Response from Pimcore Server
Logger.INFO:
{
"success": false,
"msg": "Attempted to load class \u0022MapperService\u0022 from namespace \u0022Divante\\MagentoIntegrationBundle\\Service\u0022. Did you forget a \u0022use\u0022 statement for \u0022Divante\\ObjectMapperBundle\\Service\\MapperService\u0022?",
"trace": [
{
"file": "\/var\/www\/html\/pimcore\/var\/cache\/dev\/ContainerVwbatcn\/appDevDebugProjectContainer.php",
"line": 2325,
"function": "require"
},
{
"file": "\/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/DependencyInjection\/Container.php",
"line": 304,
"function": "load",
"class": "ContainerVwbatcn\\appDevDebugProjectContainer",
"type": "-\u003E",
"args": [
"getProductStatusServiceService.php"
]
},
{
"file": "\/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Bundle\/FrameworkBundle\/Controller\/ControllerTrait.php",
"line": 67,
"function": "get",
"class": "Symfony\\Component\\DependencyInjection\\Container",
"type": "-\u003E",
"args": [
"Divante\\MagentoIntegrationBundle\\Service\\Product\\ProductStatusService"
]
},
{
"file": "\/var\/www\/html\/pimcore\/vendor\/divante-ltd\/pimcore-magento2-bridge\/src\/Divante\/MagentoIntegrationBundle\/Controller\/Rest\/ProductController.php",
"line": 141,
"function": "get",
"class": "Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller",
"type": "-\u003E",
"args": [
"Divante\\MagentoIntegrationBundle\\Service\\Product\\ProductStatusService"
]
},
{
"file": "\/var\/www\/html\/pimcore\/vendor\/divante-ltd\/pimcore-magento2-bridge\/src\/Divante\/MagentoIntegrationBundle\/Controller\/Rest\/ProductController.php",
"line": 132,
"function": "getProductStatusService",
"class": "Divante\\MagentoIntegrationBundle\\Controller\\Rest\\ProductController",
"type": "-\u003E",
"args": []
},
{
"file": "\/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php",
"line": 151,
"function": "updateStatusAction",
"class": "Divante\\MagentoIntegrationBundle\\Controller\\Rest\\ProductController",
"type": "-\u003E",
"args": [
{
"id": 2313,
"status": "SUCCESS",
"message": "product with ID 2313 successfully added to queue",
"instaceUrl": "http:\/\/192.168.1.141",
"storeViewId": 1
}
]
},
{
"file": "\/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php",
"line": 68,
"function": "handleRaw",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "-\u003E",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
1
]
},
{
"file": "\/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Kernel.php",
"line": 200,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "-\u003E",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
1,
true
]
},
{
"file": "\/var\/www\/html\/pimcore\/web\/app.php",
"line": 42,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\Kernel",
"type": "-\u003E",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
}
],
"traceString": "#0 \/var\/www\/html\/pimcore\/var\/cache\/dev\/ContainerVwbatcn\/appDevDebugProjectContainer.php(2325): require() #1 \/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/DependencyInjection\/Container.php(304): ContainerVwbatcn\\appDevDebugProjectContainer-\u003Eload(\u0027getProductStatu...\u0027) #2 \/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Bundle\/FrameworkBundle\/Controller\/ControllerTrait.php(67): Symfony\\Component\\DependencyInjection\\Container-\u003Eget(\u0027Divante\\\\Magento...\u0027) #3 \/var\/www\/html\/pimcore\/vendor\/divante-ltd\/pimcore-magento2-bridge\/src\/Divante\/MagentoIntegrationBundle\/Controller\/Rest\/ProductController.php(141): Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller-\u003Eget(\u0027Divante\\\\Magento...\u0027) #4 \/var\/www\/html\/pimcore\/vendor\/divante-ltd\/pimcore-magento2-bridge\/src\/Divante\/MagentoIntegrationBundle\/Controller\/Rest\/ProductController.php(132): Divante\\MagentoIntegrationBundle\\Controller\\Rest\\ProductController-\u003EgetProductStatusService() #5 \/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php(151): Divante\\MagentoIntegrationBundle\\Controller\\Rest\\ProductController-\u003EupdateStatusAction(Object(Divante\\MagentoIntegrationBundle\\Model\\Request\\UpdateStatus)) #6 \/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/HttpKernel.php(68): Symfony\\Component\\HttpKernel\\HttpKernel-\u003EhandleRaw(Object(Symfony\\Component\\HttpFoundation\\Request), 1) #7 \/var\/www\/html\/pimcore\/vendor\/symfony\/symfony\/src\/Symfony\/Component\/HttpKernel\/Kernel.php(200): Symfony\\Component\\HttpKernel\\HttpKernel-\u003Ehandle(Object(Symfony\\Component\\HttpFoundation\\Request), 1, true) #8 \/var\/www\/html\/pimcore\/web\/app.php(42): Symfony\\Component\\HttpKernel\\Kernel-\u003Ehandle(Object(Symfony\\Component\\HttpFoundation\\Request)) #9 {main}"
}
It has been resolved in the newest release 1.1.0. Please test it and let me now if it works for you
@prugala , I tried to check it on the new release 1.1.1, but it has a dependency on coreshop bundles at the dev master level which is unstable and appears to have a bug related to the install.
So a coreshop bug on the dev level is keeping me from being able to verify that the MapperService issue has been resolved in 1.1.1.
Does 1.1.1 truly require coreshop dev? That seems dangerously unstable.
@clarkedb With the newest version, we have decided to remove the coreshop dependency
This is resolved in 1.1.2.