Uploaded image for project: 'AdMaxLocal'
  1. AdMaxLocal
  2. AML-4014

distribution service can't process merchants with users

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Mercury
    • Fix Version/s: Mercury
    • Component/s: API
    • Labels:
      None
    • Environment:
    • Sprint:
      Sprint 17, Sprint 18

      Description

      To reproduce:

      Create a merchant with an email. Create an order an deploy. Or, instead of creating the order make the following request:

      http://{hostname}/distribution/rest/distributionSettings/merchant/{merchant_uuid}/{bidmgr_distribution_id i.e. 3 (Google) or 147 (Bing)}
      
      Example:
      http://aml-dev3-front1/distribution/rest/distributionSettings/merchant/8e45e80e-bf27-4112-87e3-1ccab0a126b2/bidmgrDistribution/3
      

      log from catalina.out

      2016-01-28 21:49:10,860-145101526 [http-8080-34] ERROR org.apache.cxf.jaxrs.utils.JAXRSUtils  - Problem with reading the data, class com.thesearchagency.services.merchant.Merchant, ContentType: application/j
      son;charset=UTF-8;type=tsa-merchant;version=2.9.0-cxf-SNAPSHOT.
      2016-01-28 21:49:10,861-145101527 [http-8080-34] WARN  org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper  - javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
              at com.thesearchagency.services.distribution.DistributionService.getBidmgrDistributionSettingsForMerchant(DistributionService.java:98)
              at com.thesearchagency.sapi.services.distribution.DistributionSettingsRS.getDistributionSettingsForResellerAndBidmgrDistribution(DistributionSettingsRS.java:55)
              at sun.reflect.GeneratedMethodAccessor590.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:622)
              at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181)
              at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97)
              at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:200)
              at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:99)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:96)
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
              at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
              at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
              at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:234)
              at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:208)
              at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
              at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:180)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:293)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:217)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:268)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
              at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:201)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.authentication.www.DigestAuthenticationFilter.doFilter(DigestAuthenticationFilter.java:115)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:155)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
              at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
              at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
              at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
              at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:343)
              at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
              at java.lang.Thread.run(Thread.java:701)
      Caused by: javax.ws.rs.client.ResponseProcessingException: Problem with reading the data, class com.thesearchagency.services.merchant.Merchant, ContentType: application/json;charset=UTF-8;type=tsa-merchant;version=2.9.0-cxf-SNAPSHOT.
              at org.apache.cxf.jaxrs.impl.ResponseImpl.reportMessageHandlerProblem(ResponseImpl.java:438)
              at org.apache.cxf.jaxrs.impl.ResponseImpl.doReadEntity(ResponseImpl.java:378)
              at org.apache.cxf.jaxrs.client.AbstractClient.readBody(AbstractClient.java:521)
              at org.apache.cxf.jaxrs.client.WebClient.handleResponse(WebClient.java:1168)
              at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1156)
              at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1094)
              at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:894)
              at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:865)
              at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:428)
              at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:611)
              at com.thesearchagency.services.distribution.client.remote.DistributionServiceSAPIClient.getResellerIdForMerchant(DistributionServiceSAPIClient.java:43)
              at com.thesearchagency.services.distribution.DistributionService.getBidmgrDistributionSettingsForMerchant(DistributionService.java:93)
              ... 65 more
      Caused by: org.codehaus.jackson.map.JsonMappingException: Can not construct instance of com.thesearchagency.security.IUser, problem: abstract types can only be instantiated with additional type information
       at [Source: sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@5eec237d; line: 1, column: 685] (through reference chain: com.thesearchagency.services.merchant.Merchant["contact"])
              at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163)
              at org.codehaus.jackson.map.deser.StdDeserializationContext.instantiationException(StdDeserializationContext.java:233)
              at org.codehaus.jackson.map.deser.AbstractDeserializer.deserialize(AbstractDeserializer.java:97)
              at org.codehaus.jackson.map.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:299)
              at org.codehaus.jackson.map.deser.SettableBeanProperty$MethodProperty.deserializeAndSet(SettableBeanProperty.java:414)
              at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:697)
              at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
              at org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2695)
              at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1308)
              at org.codehaus.jackson.jaxrs.JacksonJsonProvider.readFrom(JacksonJsonProvider.java:419)
              at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBodyReader(JAXRSUtils.java:1343)
              at org.apache.cxf.jaxrs.impl.ResponseImpl.doReadEntity(ResponseImpl.java:369)
              ... 75 more
      

      Broken merchant:

      {
        "id": "a0f07d69-f616-4110-a821-d23c1d3dbbcd",
        "name": null,
        "displayName": "aml-3498-10",
        "description": null,
        "realm": "com.thesearchagency/33146f19-22f8-4b98-96f7-6cb4f0da283b/a0f07d69-f616-4110-a821-d23c1d3dbbcd",
        "active": true,
        "createdDate": "2016-01-28T20:44:41.000+0000",
        "lastModifiedDate": "2016-01-28T20:44:41.000+0000",
        "createdBy": "9c60c5d7-4a25-4a6e-800e-bde312623a0f",
        "createdByName": "Madhanmohan Pulipati",
        "contactName": "aml-3498-10",
        "lastModifiedBy": "9c60c5d7-4a25-4a6e-800e-bde312623a0f",
        "lastModifiedByName": "Madhanmohan Pulipati",
        "customerId": "aml-3498-10",
        "contactEmail": "aml-3498-10@admaxlocal.com",
        "contactPhoneNumber": "1112223333",
        "phoneNumber": "1112223333",
        "comments": "",
        "contact": {
          "language": "en",
          "properties": {},
          "id": "d13037b4-36e1-4af0-a5d8-d00a379f4d6c",
          "displayName": "aml-3498-10",
          "email": "aml-3498-10@admaxlocal.com",
          "description": "Merchant user for aml-3498-10",
          "realm": "com.thesearchagency/33146f19-22f8-4b98-96f7-6cb4f0da283b/a0f07d69-f616-4110-a821-d23c1d3dbbcd",
          "createdBy": "9c60c5d7-4a25-4a6e-800e-bde312623a0f",
          "lastModifiedBy": "9c60c5d7-4a25-4a6e-800e-bde312623a0f",
          "homePhone": null,
          "mobilePhone": null,
          "lastModifiedDate": "2016-01-28",
          "organization": null,
          "createdDate": "2016-01-28",
          "active": false,
          "firstName": null,
          "lastName": null,
          "workPhone": "1112223333",
          "countryCode": "US",
          "timezone": "America/New_York",
          "gender": "M",
          "birthday": null,
          "lastLoginDate": "1970-01-01",
          "workPhoneExtension": null
        },
        "url": null,
        "groupId": "8b61a155-f75c-4130-9b29-b932ba77ed73",
        "userId": "d13037b4-36e1-4af0-a5d8-d00a379f4d6c",
        "resellerId": "33146f19-22f8-4b98-96f7-6cb4f0da283b",
        "properties": {
          "countryCode": "US",
          "currencyCode": "USD",
          "language": "en",
          "locale": "en_US"
        }
      }
      

      Working merchant:

      {
        "id": "ddda0547-2480-4b29-bdd7-14bd1ef43a4b",
        "name": null,
        "displayName": "ross-test-1",
        "description": null,
        "realm": "com.thesearchagency/33146f19-22f8-4b98-96f7-6cb4f0da283b/ddda0547-2480-4b29-bdd7-14bd1ef43a4b",
        "active": true,
        "createdDate": "2016-01-28T15:15:28.000+0000",
        "lastModifiedDate": "2016-01-28T15:15:28.000+0000",
        "createdBy": "9c60c5d7-4a25-4a6e-800e-bde312623a0f",
        "createdByName": "Madhanmohan Pulipati",
        "contactName": null,
        "lastModifiedBy": "9c60c5d7-4a25-4a6e-800e-bde312623a0f",
        "lastModifiedByName": "Madhanmohan Pulipati",
        "customerId": "ross-test-1",
        "contactEmail": null,
        "contactPhoneNumber": "",
        "phoneNumber": "",
        "comments": "",
        "contact": null,
        "url": null,
        "groupId": "50bc5abd-73e9-45dc-b081-c7b317d6170b",
        "userId": null,
        "resellerId": "33146f19-22f8-4b98-96f7-6cb4f0da283b",
        "properties": {
          "countryCode": "US",
          "currencyCode": "USD",
          "language": "en",
          "locale": "en_US"
        }
      }
      

      REST request to distribution service:
      GET http://aml-qa5-front1:8080/distribution/rest//distributionSettings/merchant/

      {merchantId}/bidmgrDistribution/{bidmgrId}

      Where {bidmgrId}= 3 or 147

      Works with this values:{merchantId}

      = ddda0547-2480-4b29-bdd7-14bd1ef43a4b

      Breaks with this value:

      {merchantId}

      = a0f07d69-f616-4110-a821-d23c1d3dbbcd

        Attachments

          Activity

            People

            • Assignee:
              varshini.padmanabhan Varshini Padmanabhan (Inactive)
              Reporter:
              therouxj Jeff Theroux
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: