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

produce-error-report.groovy script doesn't generate the file - throws exception!

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: Mountain Dew
    • Fix Version/s: Mercury
    • Component/s: Other / Misc.
    • Labels:
      None
    • Environment:

      Description

      The groovy script "produce-error-report.groovy" doesn't generate the file - throws exception!

      [amlops@aml-qa5-monman1 groovy]$ groovy produce-error-report.groovy -d 3 -uspike -ptar63t -h aml-qa5-mysql1 -l 3306 -o tmp -e qa5
      DEBUG - Provided Options:
      -d: 3
      -uspike: -ptar63t
      -h: aml-qa5-mysql1
      -l: 3306
      -o: tmp
      -e: qa5
      DEBUG - tmp
      DEBUG - executing sql:
      select distinct r.name as `Reseller`,
      substring_index(searchEngineUsers.description, '_', 1) as `MerchantID`,
      – b_areas.description as `BA`,
      (select description from mms_common.businessAreas where id = reverse(substring_index(reverse(substring_index(gce_campaign.name, '', 2)), '', 1))) as `BA`,
      – b_locs.description as `BL`,
      (select description from mms_common.businessLocations where id = substring_index(reverse(substring_index(reverse(gce_campaign.name), '', 2)), '', 1)) as `BL`,
      – merchant_orders.order_id as `OrderID`,
      gce_campaign.name as `CampaignName`,
      gce_adGroup.name as `AdGroupName`,
      gce_textAd.headline as `Headline`,
      gce_textAd.description1 as `Description1`,
      gce_textAd.description2 as `Description2`,
      gce_textAd.displayURL as `DisplayURL`,
      gce_textAd.destinationURL as `DestinationURL`,
      gce_textAdError.errorCode as `ErrorCode`,
      gce_textAdError.errorText as `ErrorText`,
      .
      .
      .
      Jun 9, 2015 2:25:57 PM groovy.sql.Sql$AbstractQueryCommand execute
      WARNING: Failed to execute:
      select distinct r.name as `Reseller`,
      substring_index(searchEngineUsers.description, '_', 1) as `MerchantID`,
      – b_areas.description as `BA`,
      (select description from mms_common.businessAreas where id = reverse(substring_index(reverse(substring_index(gce_campaign.name, '', 2)), '', 1))) as `BA`,
      – b_locs.description as `BL`,
      (select description from mms_common.businessLocations where id = substring_index(reverse(substring_index(reverse(gce_campaign.name), '', 2)), '', 1)) as `BL`,
      – merchant_orders.order_id as `OrderID`,
      gce_campaign.name as `CampaignName`,
      gce_adGroup.name as `AdGroupName`,
      gce_textAd.headline as `Headline`,
      gce_textAd.description1 as `Description1`,
      gce_textAd.description2 as `Description2`,
      gce_textAd.displayURL as `DisplayURL`,
      gce_textAd.destinationURL as `DestinationURL`,
      gce_textAdError.errorCode as `ErrorCode`,
      gce_textAdError.errorText as `ErrorText`,
      gce_textAdError.reason as `Reason`,
      gce_textAdError.policyName as `PolicyName`,
      gce_textAdError.`field` as `Field`,
      gce_textAdError.`trigger` as `Trigger`,
      gce_textAdError.isExemptable as `IsExemptable`,
      order_ads.customized as `IsCustomized`
      from content_editor_google.gce_campaign
      – join (select * from mms_common.businessAreas) as b_areas on b_areas.id = reverse(substring_index(reverse(substring_index(gce_campaign.name, '', 2)), '', 1))
      – join (select * from mms_common.businessLocations) as b_locs on b_locs.id = substring_index(reverse(substring_index(reverse(gce_campaign.name), '', 2)), '', 1)
      join tsacommon.searchEngineUsers on searchEngineUserID=searchEngineUsers.id
      join smb.merchants m on m.id = substring_index(searchEngineUsers.description, '_', 1)
      join (select merc.id as merchant_id, c.id as order_id
      from smb.content c
      join (select * from smb.content_metadata md where md.key = 'state' and md.value not in ('paused', 'error', 'quote', 'archived')) md on md.content_id = c.id
      join (select md.value as id, c.parent_id as content_id from smb.content_metadata md join smb.content c on c.id = md.content_id where c.type = 'merchantDisplay' and md.key = 'identifier') merc on merc.content_id = c.id
      where c.type = 'order') as merchant_orders on merchant_orders.merchant_id = m.id
      join smb.resellers r on r.id = m.reseller_id
      join (select distinct order_id,
      (select value from content_metadata where content_id = ad_id and `key` = 'headline') as `headline`,
      (select value from content_metadata where content_id = ad_id and `key` = 'firstLine') as `firstline`,
      (select value from content_metadata where content_id = ad_id and `key` = 'secondLine') as `secondline`,
      (select value from content_metadata where content_id = ad_id and `key` = 'enabled') as `enabled`,
      is_customized as `customized`
      from content_metadata md
      join (
      select c.id as ad_id, order_id, case when children.id is not null then true else false end as is_customized
      from content as c
      left join content as children on children.parent_id = c.id and children.type = 'textAd'
      join (
      select id as adl_id, order_id
      from content
      join (
      select id as cp_id, order_id
      from content
      join (
      select id as cpl_id, order_id
      from content
      join (select id as order_id from content where type = 'order') as orders on parent_id = orders.order_id
      and name = 'campaignTargets'
      ) as campaignTargetList on parent_id = campaignTargetList.cpl_id
      ) as campaignTargets on parent_id = campaignTargets.cp_id
      where name = 'campaignAds'
      ) as campaignAdList on c.parent_id = campaignAdList.adl_id
      ) as campaignAds on content_id = ad_id) as order_ads on order_ads.order_id = merchant_orders.order_id
      join content_editor_google.gce_adGroup on gce_campaign.id=campaignID
      join content_editor_google.gce_textAd on adGroupID=gce_adGroup.id
      join content_editor_google.gce_textAdError on textAdID=gce_textAd.id
      join clients.externalCampaign on gceCampaignID = gce_campaign.id
      join clients.externalCampaignParent on externalCampaignParent.id=externalCampaignParentID
      where gce_campaign.status != 'Deleted'
      and gce_adGroup.status != 'Deleted'
      and gce_textAd.status != 'Disabled'
      and gce_textAdError.errorText = 'Editorial Rejection'
      because: Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='
      Caught: java.sql.SQLException: Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='
      java.sql.SQLException: Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2536)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
      at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1383)
      at produce-error-report.run(produce-error-report.groovy:181)

      Note: This is reproduced on Rushmore environment also

        Attachments

          Activity

            People

            • Assignee:
              gurpreet.singh Gurpreet Singh
              Reporter:
              atul.sanagar Atul Sanagar (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: