Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-5591

Bug in tLifererayOutput component with headless-commerce-admin-pricing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Master
    • Fix Version/s: Master
    • Component/s: Data Integration
    • Labels:
      None

      Description

      Hi, we found a bug in tLifererayOutput component when working with openAPI MODULE PATH
      /headless-commerce-admin-pricing/v1.0
      and the operations path
      "/priceEntries/by-externalReferenceCode/{externalReferenceCode}"
      operation Update

      When we specify the parameter hasTierPrice:
      we receive the following exception:

      Exception in component tLiferayOutput_2 (import_prices)
      java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tJava_12Process(import_prices.java:11168)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tJava_6Process(import_prices.java:7965)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tRunJob_7Process(import_prices.java:7813)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tJava_5Process(import_prices.java:5748)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tRunJob_5Process(import_prices.java:5587)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tFileInputXML_1Process(import_prices.java:4400)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tFileList_1Process(import_prices.java:2843)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tJava_2Process(import_prices.java:2475)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.runJobInTOS(import_prices.java:18740)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.main(import_prices.java:17335)
      

       

      When we don't specify the parameter hasTierPrice we receive the following exception from the price parameter:

      Exception in component tLiferayOutput_2 (import_prices)
      java.lang.NumberFormatException
       at java.math.BigDecimal.<init>(BigDecimal.java:494)
       at java.math.BigDecimal.<init>(BigDecimal.java:383)
       at java.math.BigDecimal.<init>(BigDecimal.java:806)
       at org.talend.codegen.enforcer.OutgoingSchemaEnforcer.transformValue(OutgoingSchemaEnforcer.java:236)
       at org.talend.codegen.enforcer.OutgoingSchemaEnforcer.get(OutgoingSchemaEnforcer.java:190)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tJava_12Process(import_prices.java:11111)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tJava_6Process(import_prices.java:7965)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tRunJob_7Process(import_prices.java:7813)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tJava_5Process(import_prices.java:5748)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tRunJob_5Process(import_prices.java:5587)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tFileInputXML_1Process(import_prices.java:4400)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tFileList_1Process(import_prices.java:2843)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.tJava_2Process(import_prices.java:2475)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.runJobInTOS(import_prices.java:18678)
       at lfrgs_liferay_sap_connector.import_prices_0_1.import_prices.main(import_prices.java:17273)
      

      if we populate the same parameters with the same values with the operation path:
      "/priceLists/{id}/priceEntries"
      operation: Insert
      the component works correctly, no exception is throw.

        Attachments

        1. Cattura.JPG
          Cattura.JPG
          90 kB
        2. commerce-5591-001.png
          commerce-5591-001.png
          350 kB
        3. commerce-5591-002.png
          commerce-5591-002.png
          358 kB
        4. commerce-5591-003.png
          commerce-5591-003.png
          399 kB
        5. commerce-5591-004.png
          commerce-5591-004.png
          77 kB
        6. commerce-5591-005.png
          commerce-5591-005.png
          608 kB
        7. commerce-5591-006.png
          commerce-5591-006.png
          480 kB

          Issue Links

            Activity

              People

              Assignee:
              igor.beslic Igor Beslic
              Reporter:
              giovanni.ciganotto Giovanni Ciganotto
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  Master