oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT OpportunityEO.lead_id, OpportunityEO.description, OpportunityEO.status, OpportunityEO.sales_stage_id, OpportunityEO.total_amount, OpportunityEO.currency_code, OpportunityEO.decision_date, OpportunityEO.win_probability, OpportunityEO.close_reason, OpportunityEO.sales_methodology_id, OpportunityEO.channel_code, DECODE(OpportunityEO.sales_methodology_id, NULL, 'N','Y') AS sales_meth_flag, OpportunityEO.customer_id, hp.party_name, hp.party_type, OpportunityEO.attribute1, OpportunityEO.attribute2, OpportunityEO.attribute3, OpportunityEO.attribute4, OpportunityEO.attribute5, OpportunityEO.attribute6, OpportunityEO.attribute7, OpportunityEO.attribute8, OpportunityEO.attribute9, OpportunityEO.attribute10, OpportunityEO.attribute11, OpportunityEO.attribute12, OpportunityEO.attribute13, OpportunityEO.attribute14, OpportunityEO.attribute15, OpportunityEO.attribute_category, OpportunityContactEO.contact_party_id as relationship_party_id, OpportunityEO.source_promotion_id, amsc.arc_source_code_for, decode(amsc.arc_source_code_for , 'CAMP', (SELECT campaign_name FROM AMS_CAMPAIGNS_ALL_TL WHERE campaign_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'EVEH', (SELECT event_header_name FROM AMS_EVENT_HEADERS_ALL_TL WHERE event_header_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'EONE', (SELECT event_offer_name FROM AMS_EVENT_OFFERS_ALL_TL WHERE event_offer_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'EVEO', (SELECT event_offer_name FROM AMS_EVENT_OFFERS_ALL_TL WHERE event_offer_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'CSCH', (SELECT schedule_name FROM ams_campaign_schedules_tl WHERE schedule_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'OFFR', ( SELECT description FROM qp_list_headers_tl WHERE list_header_id = amsc.source_code_for_id AND language = USERENV('LANG')),null) as source_name, amsc.source_code, (SELECT SUM(opp_forecast_amount) FROM as_sales_credits ascs WHERE ascs.lead_id = OpportunityEO.lead_id AND ascs.credit_type_id = :1 ) as forecast_amount, '' as empty_string, DECODE ( 1, (SELECT 1 FROM as_sales_lead_opportunity aslo WHERE aslo.opportunity_id = OpportunityEO.lead_id GROUP BY opportunity_id HAVING count(1) > 1 ), 'ASNOpptyDetSrcNm', NVL((SELECT 'ASNOpptyDetSrcNmLnk' FROM as_sales_lead_opportunity aslo, as_sales_leads asl WHERE asl.source_system = 'SALES_CAMPAIGN' AND asl.source_promotion_id IS NOT NULL AND aslo.sales_lead_id = asl.sales_lead_id AND aslo.opportunity_id = OpportunityEO.lead_id AND ROWNUM = 1), 'ASNOpptyDetSrcNm')) as source_name_upd_flag, amsc.source_code_for_id, OpportunityEO.object_version_number, OpportunityContactEO.object_version_number as contact_object_version_number, OpportunityContactEO.lead_contact_id, DECODE(OpportunityEO.sales_stage_id, NULL, 'N','Y') AS sales_stage_flag, OpportunityEO.address_id, null as address , OpportunityEO.prm_referral_code, OpportunityEO.lead_number, OpportunityEO.vehicle_response_code, hp.email_address as Cust_Email, null as Cust_Formatted_Phone, hp.primary_phone_contact_pt_id as primary_phone_contact_pt_id, hl.location_id, hp.primary_phone_country_code, hp.primary_phone_area_code, hp.primary_phone_number, hp.primary_phone_extension FROM as_leads_all OpportunityEO, hz_parties hp, as_lead_contacts_all OpportunityContactEO, ams_source_codes amsc, hz_party_sites hps, hz_locations hl, fnd_territories_tl ftt WHERE OpportunityEO.customer_id = hp.party_id AND OpportunityEO.lead_id = OpportunityContactEO.lead_id(+) AND OpportunityEO.customer_id = OpportunityContactEO.customer_id(+) AND OpportunityContactEO.primary_contact_flag(+) = 'Y' AND OpportunityEO.source_promotion_id = amsc.source_code_id (+) AND OpportunityEO.address_id = hps.party_site_id(+) AND OpportunityEO.customer_id = hps.party_id (+) AND hps.location_id = hl.location_id (+) AND hl.country = ftt.territory_code (+) AND ftt.language (+) = USERENV('LANG') AND OpportunityEO.lead_id = :2 atoracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)

Oracle Community | 887587 | 4 years ago
  1. 0

    JBO-27122: SQL error during statement preparation

    Oracle Community | 4 years ago | 887587
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT OpportunityEO.lead_id, OpportunityEO.description, OpportunityEO.status, OpportunityEO.sales_stage_id, OpportunityEO.total_amount, OpportunityEO.currency_code, OpportunityEO.decision_date, OpportunityEO.win_probability, OpportunityEO.close_reason, OpportunityEO.sales_methodology_id, OpportunityEO.channel_code, DECODE(OpportunityEO.sales_methodology_id, NULL, 'N','Y') AS sales_meth_flag, OpportunityEO.customer_id, hp.party_name, hp.party_type, OpportunityEO.attribute1, OpportunityEO.attribute2, OpportunityEO.attribute3, OpportunityEO.attribute4, OpportunityEO.attribute5, OpportunityEO.attribute6, OpportunityEO.attribute7, OpportunityEO.attribute8, OpportunityEO.attribute9, OpportunityEO.attribute10, OpportunityEO.attribute11, OpportunityEO.attribute12, OpportunityEO.attribute13, OpportunityEO.attribute14, OpportunityEO.attribute15, OpportunityEO.attribute_category, OpportunityContactEO.contact_party_id as relationship_party_id, OpportunityEO.source_promotion_id, amsc.arc_source_code_for, decode(amsc.arc_source_code_for , 'CAMP', (SELECT campaign_name FROM AMS_CAMPAIGNS_ALL_TL WHERE campaign_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'EVEH', (SELECT event_header_name FROM AMS_EVENT_HEADERS_ALL_TL WHERE event_header_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'EONE', (SELECT event_offer_name FROM AMS_EVENT_OFFERS_ALL_TL WHERE event_offer_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'EVEO', (SELECT event_offer_name FROM AMS_EVENT_OFFERS_ALL_TL WHERE event_offer_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'CSCH', (SELECT schedule_name FROM ams_campaign_schedules_tl WHERE schedule_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'OFFR', ( SELECT description FROM qp_list_headers_tl WHERE list_header_id = amsc.source_code_for_id AND language = USERENV('LANG')),null) as source_name, amsc.source_code, (SELECT SUM(opp_forecast_amount) FROM as_sales_credits ascs WHERE ascs.lead_id = OpportunityEO.lead_id AND ascs.credit_type_id = :1 ) as forecast_amount, '' as empty_string, DECODE ( 1, (SELECT 1 FROM as_sales_lead_opportunity aslo WHERE aslo.opportunity_id = OpportunityEO.lead_id GROUP BY opportunity_id HAVING count(1) > 1 ), 'ASNOpptyDetSrcNm', NVL((SELECT 'ASNOpptyDetSrcNmLnk' FROM as_sales_lead_opportunity aslo, as_sales_leads asl WHERE asl.source_system = 'SALES_CAMPAIGN' AND asl.source_promotion_id IS NOT NULL AND aslo.sales_lead_id = asl.sales_lead_id AND aslo.opportunity_id = OpportunityEO.lead_id AND ROWNUM = 1), 'ASNOpptyDetSrcNm')) as source_name_upd_flag, amsc.source_code_for_id, OpportunityEO.object_version_number, OpportunityContactEO.object_version_number as contact_object_version_number, OpportunityContactEO.lead_contact_id, DECODE(OpportunityEO.sales_stage_id, NULL, 'N','Y') AS sales_stage_flag, OpportunityEO.address_id, null as address , OpportunityEO.prm_referral_code, OpportunityEO.lead_number, OpportunityEO.vehicle_response_code, hp.email_address as Cust_Email, null as Cust_Formatted_Phone, hp.primary_phone_contact_pt_id as primary_phone_contact_pt_id, hl.location_id, hp.primary_phone_country_code, hp.primary_phone_area_code, hp.primary_phone_number, hp.primary_phone_extension FROM as_leads_all OpportunityEO, hz_parties hp, as_lead_contacts_all OpportunityContactEO, ams_source_codes amsc, hz_party_sites hps, hz_locations hl, fnd_territories_tl ftt WHERE OpportunityEO.customer_id = hp.party_id AND OpportunityEO.lead_id = OpportunityContactEO.lead_id(+) AND OpportunityEO.customer_id = OpportunityContactEO.customer_id(+) AND OpportunityContactEO.primary_contact_flag(+) = 'Y' AND OpportunityEO.source_promotion_id = amsc.source_code_id (+) AND OpportunityEO.address_id = hps.party_site_id(+) AND OpportunityEO.customer_id = hps.party_id (+) AND hps.location_id = hl.location_id (+) AND hl.country = ftt.territory_code (+) AND ftt.language (+) = USERENV('LANG') AND OpportunityEO.lead_id = :2 atoracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)
  2. 0

    Workflow erro

    Oracle Community | 8 years ago | 688974
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException<br>
  3. 0

    NullPointerException and cannot be cast when extended CO!

    Oracle Community | 7 years ago | 722468
    oracle.apps.fnd.framework.OAException: java.lang.ClassCastException: oracle.apps.fnd.framework.webui.beans.layout.OAQueryBean cannot be cast to oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    unable to launch jinitiator after ATG RUP7

    Oracle Community | 6 years ago | user15639
    oracle.apps.fnd.framework.OAException: java.lang.NumberFormatException: For input string: "null"
  6. 0

    Invalid column index: JBO-27122: SQL error during statement preparation

    Oracle Community | 2 years ago | 2725480
    oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT OpportunityEO.lead_id , OpportunityEO.last_update_date as LastUpdateDate, OpportunityEO.creation_date , OpportunityEO.lead_number, OpportunityEO.customer_id, NVL(OpportunityEO.TOTAL_AMOUNT,0) as TotalAmount, OpportunityEO.Decision_Date, OpportunityEO.win_probability , OpportunityEO.description as Description, OpportunityEO.Currency_Code, OpportunityEO.Source_Promotion_Id , OpportunityEO.OWNER_SALESFORCE_ID, OpportunityEO.TOTAL_REVENUE_OPP_FORECAST_AMT , null as VehicleResponseCode, ast.meaning as OpptyStatusName, null as CurrencyName, null as SalesStageName, hp.party_name as PartyName, null as CustomerCategory, null as PersonId, null as ContactName, null as PersonFirstName, null as PersonLastName, null as PersonMiddleName, null as Salutation, null as EmailAddress, null as JobTitle, null as PhoneCountryCode, null as PhoneAreaCode, null as PhoneNumber , null as PhoneExtension , null as PhoneLineType , to_number(null) as ContactPointId ,null as FormattedPhone, OpportunityEO.attribute1 as State , hp.attribute4 as City, (case WHEN length(OpportunityEO.attribute13) != 19 THEN null ELSE fnd_date.canonical_to_date(OpportunityEO.attribute13) END) as Country, (case WHEN length(OpportunityEO.attribute14) != 19 THEN null ELSE fnd_date.canonical_to_date(OpportunityEO.attribute14) END) as Province, null as PostalCode, to_number(null) as ContactLocationId,null as Address, null as SourceName, jrt.resource_name as ResourceName, null as SalesChannel, null as RelationShipId, null as PrimaryContactPartyId, null as CustState, null as CustCity, null as CustCountry, null as CustProvince, null as CustPostalCode, to_number(null) as CustomerLocationId, null as CustAddress, null as OpptyUpdatedBy, null as OpptyCreatedBy, null as MethodologyNm, null as CloseReason, null as AssignmentStatusNm, OpportunityEO.PRM_Referral_Code as ReferralCode , null as PrimaryPhoneCountryCode, null as PrimaryPhoneAreaCode, null as PrimaryPhoneNumber , null as PrimaryPhoneExtension , null as PrimaryPhoneLineType , to_number(null) as CustomerContactPointId ,null as CustFormattedPhone, null as CustEmailAddress, null as ConvAmt, null as ConvFrcstAmt, null as SourceCode FROM as_leads_all OpportunityEO ,( SELECT /*+ no_merge */ distinct aaa.lead_id FROM as_accesses_all aaa WHERE aaa.sales_lead_id IS NULL AND aaa.lead_id IS NOT NULL AND aaa.open_flag = 'Y' AND aaa.salesforce_id = :0) secu , as_statuses_tl ast , as_lead_contacts_all alca, hz_parties hcp ,fnd_territories_tl ftt ,hz_parties hp , jtf_rs_resource_extns_tl jrt WHERE OpportunityEO.lead_id = secu.lead_id AND OpportunityEO.status = ast.status_code AND ast.language = USERENV('LANG') AND OpportunityEO.lead_id = alca.lead_id AND OpportunityEO.customer_id = alca.customer_id AND alca.primary_contact_flag = 'Y' AND alca.contact_party_id = hcp.party_id(+) AND hcp.country = ftt.territory_code AND ftt.language = USERENV('LANG') AND OpportunityEO.customer_id = hp.party_id AND OpportunityEO.owner_salesforce_id = jrt.resource_id AND jrt.language = USERENV('LANG') ORDER BY LastUpdateDate DESC

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. oracle.apps.fnd.framework.OAException

      oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT OpportunityEO.lead_id, OpportunityEO.description, OpportunityEO.status, OpportunityEO.sales_stage_id, OpportunityEO.total_amount, OpportunityEO.currency_code, OpportunityEO.decision_date, OpportunityEO.win_probability, OpportunityEO.close_reason, OpportunityEO.sales_methodology_id, OpportunityEO.channel_code, DECODE(OpportunityEO.sales_methodology_id, NULL, 'N','Y') AS sales_meth_flag, OpportunityEO.customer_id, hp.party_name, hp.party_type, OpportunityEO.attribute1, OpportunityEO.attribute2, OpportunityEO.attribute3, OpportunityEO.attribute4, OpportunityEO.attribute5, OpportunityEO.attribute6, OpportunityEO.attribute7, OpportunityEO.attribute8, OpportunityEO.attribute9, OpportunityEO.attribute10, OpportunityEO.attribute11, OpportunityEO.attribute12, OpportunityEO.attribute13, OpportunityEO.attribute14, OpportunityEO.attribute15, OpportunityEO.attribute_category, OpportunityContactEO.contact_party_id as relationship_party_id, OpportunityEO.source_promotion_id, amsc.arc_source_code_for, decode(amsc.arc_source_code_for , 'CAMP', (SELECT campaign_name FROM AMS_CAMPAIGNS_ALL_TL WHERE campaign_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'EVEH', (SELECT event_header_name FROM AMS_EVENT_HEADERS_ALL_TL WHERE event_header_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'EONE', (SELECT event_offer_name FROM AMS_EVENT_OFFERS_ALL_TL WHERE event_offer_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'EVEO', (SELECT event_offer_name FROM AMS_EVENT_OFFERS_ALL_TL WHERE event_offer_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'CSCH', (SELECT schedule_name FROM ams_campaign_schedules_tl WHERE schedule_id = amsc.source_code_for_id AND language = USERENV('LANG')), 'OFFR', ( SELECT description FROM qp_list_headers_tl WHERE list_header_id = amsc.source_code_for_id AND language = USERENV('LANG')),null) as source_name, amsc.source_code, (SELECT SUM(opp_forecast_amount) FROM as_sales_credits ascs WHERE ascs.lead_id = OpportunityEO.lead_id AND ascs.credit_type_id = :1 ) as forecast_amount, '' as empty_string, DECODE ( 1, (SELECT 1 FROM as_sales_lead_opportunity aslo WHERE aslo.opportunity_id = OpportunityEO.lead_id GROUP BY opportunity_id HAVING count(1) > 1 ), 'ASNOpptyDetSrcNm', NVL((SELECT 'ASNOpptyDetSrcNmLnk' FROM as_sales_lead_opportunity aslo, as_sales_leads asl WHERE asl.source_system = 'SALES_CAMPAIGN' AND asl.source_promotion_id IS NOT NULL AND aslo.sales_lead_id = asl.sales_lead_id AND aslo.opportunity_id = OpportunityEO.lead_id AND ROWNUM = 1), 'ASNOpptyDetSrcNm')) as source_name_upd_flag, amsc.source_code_for_id, OpportunityEO.object_version_number, OpportunityContactEO.object_version_number as contact_object_version_number, OpportunityContactEO.lead_contact_id, DECODE(OpportunityEO.sales_stage_id, NULL, 'N','Y') AS sales_stage_flag, OpportunityEO.address_id, null as address , OpportunityEO.prm_referral_code, OpportunityEO.lead_number, OpportunityEO.vehicle_response_code, hp.email_address as Cust_Email, null as Cust_Formatted_Phone, hp.primary_phone_contact_pt_id as primary_phone_contact_pt_id, hl.location_id, hp.primary_phone_country_code, hp.primary_phone_area_code, hp.primary_phone_number, hp.primary_phone_extension FROM as_leads_all OpportunityEO, hz_parties hp, as_lead_contacts_all OpportunityContactEO, ams_source_codes amsc, hz_party_sites hps, hz_locations hl, fnd_territories_tl ftt WHERE OpportunityEO.customer_id = hp.party_id AND OpportunityEO.lead_id = OpportunityContactEO.lead_id(+) AND OpportunityEO.customer_id = OpportunityContactEO.customer_id(+) AND OpportunityContactEO.primary_contact_flag(+) = 'Y' AND OpportunityEO.source_promotion_id = amsc.source_code_id (+) AND OpportunityEO.address_id = hps.party_site_id(+) AND OpportunityEO.customer_id = hps.party_id (+) AND hps.location_id = hl.location_id (+) AND hl.country = ftt.territory_code (+) AND ftt.language (+) = USERENV('LANG') AND OpportunityEO.lead_id = :2 atoracle.apps.fnd.framework.OAException.wrapperException(OAException.java:896)

      at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest()
    2. oracle.apps.fnd
      OAWebBeanContainerHelper.processRequest
      1. oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:612)
      2. oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:251)
      3. oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processRequest(OAStackLayoutBean.java:350)
      4. oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:964)
      5. oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:931)
      6. oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:655)
      7. oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:251)
      8. oracle.apps.fnd.framework.webui.beans.message.OAMessageLayoutBean.processRequest(OAMessageLayoutBean.java:393)
      9. oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:964)
      10. oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:931)
      11. oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:655)
      12. oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:251)
      12 frames