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

Salesforce accounts connector fails

    Details

      Description

      2020-12-11 17:28:51.257 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][ThemeHotDeployListener:108] 1 theme for admin-theme is available for use
      2020-12-11 17:28:51.467 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][ThemeHotDeployListener:108] 1 theme for classic-theme is available for use
      2020-12-11 17:28:53.517 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][ThemeHotDeployListener:108] 1 theme for minium-theme is available for use
      2020-12-11 17:28:53.756 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][HookHotDeployListener:496] Hook for social-bookmarks-hook is available for use
      2020-12-11 17:28:53.904 INFO  [com.liferay.portal.osgi.web.wab.extender.internal.WabFactory-BundleTrackerOpener][ThemeHotDeployListener:108] 1 theme for speedwell-theme is available for use
      Starting account import, last import: 2020-12-11T19:24:15Z
      DEBUG [main] (LiferayClient.java:215) - Created new Liferay Client for http://localhost:8080
      DEBUG [main] (LiferayClient.java:225) - Target: http://localhost:8080/
      Exception in component tSalesforceConnection_1 (accounts)
      java.lang.RuntimeException: IllegalArgumentException: Illegal auth endpoint 
      	at etl_salesforce_connector.accounts_0_1.accounts.tSalesforceConnection_1Process(accounts.java:1380)
      	at etl_salesforce_connector.accounts_0_1.accounts.tLiferayConnection_1Process(accounts.java:1173)
      	at etl_salesforce_connector.accounts_0_1.accounts.tJava_1Process(accounts.java:870)
      	at etl_salesforce_connector.accounts_0_1.accounts.tPrejob_1Process(accounts.java:651)
      	at etl_salesforce_connector.accounts_0_1.accounts.runJobInTOS(accounts.java:7909)
      	at etl_salesforce_connector.accounts_0_1.accounts.main(accounts.java:7704)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.dispatch.talend.web.internal.process.TalendProcessCallable.call(TalendProcessCallable.java:67)
      	at com.liferay.petra.process.local.LocalProcessLauncher.main(LocalProcessLauncher.java:135)
      DEBUG [main] (LiferayClient.java:215) - Created new Liferay Client for http://localhost:8080
      DEBUG [main] (LiferayClient.java:225) - Target: http://localhost:8080/
      Exception in component tSalesforceInput_1 (accounts)
      java.lang.RuntimeException: IOException: Referenced component: tSalesforceConnection_1 not connected
      	at etl_salesforce_connector.accounts_0_1.accounts.tSalesforceInput_1Process(accounts.java:3524)
      	at etl_salesforce_connector.accounts_0_1.accounts.runJobInTOS(accounts.java:7923)
      	at etl_salesforce_connector.accounts_0_1.accounts.main(accounts.java:7704)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.liferay.dispatch.talend.web.internal.process.TalendProcessCallable.call(TalendProcessCallable.java:67)
      	at com.liferay.petra.process.local.LocalProcessLauncher.main(LocalProcessLauncher.java:135)
      

      If last run date is set there is series of problems - TalendDate.addDate fails and complains on format.
      If I change format it generates this issues which are caused because LastModifiedDate does not exist at Salesforce side:

      Starting job accounts at 20:51 15/12/2020.
      
      [statistics] connecting to socket on port 3714
      [statistics] connected
      Starting account import, last import: 2019-12-01 10:06:42
      Exception in component tSalesforceInput_1 (accounts)
      java.io.IOException: [InvalidFieldFault [ApiQueryFault [ApiFault  exceptionCode='INVALID_FIELD'
       exceptionMessage='
      JigsawCompanyId from Account where LastModifiedDate > '2019-12-01 10:06:42'
                                         ^
      ERROR at Row:1:Column:657
      value of filter criterion for field 'LastModifiedDate' must be of type dateTime and should not be enclosed in quotes'
       extendedErrorDetails='{[0]}'
      ]
       row='1'
       column='657'
      ]
      ]
      
      	at org.talend.components.salesforce.runtime.SalesforceInputReader.start(SalesforceInputReader.java:118)
      	at org.talend.codegen.flowvariables.runtime.FlowVariablesReader.start(FlowVariablesReader.java:73)
      	at etl_salesforce_connector.accounts_0_1.accounts.tSalesforceInput_1Process(accounts.java:3656)
      	at etl_salesforce_connector.accounts_0_1.accounts.runJobInTOS(accounts.java:7767)
      	at etl_salesforce_connector.accounts_0_1.accounts.main(accounts.java:7503)
      Caused by: [InvalidFieldFault [ApiQueryFault [ApiFault  exceptionCode='INVALID_FIELD'
       exceptionMessage='
      JigsawCompanyId from Account where LastModifiedDate > '2019-12-01 10:06:42'
                                         ^
      ERROR at Row:1:Column:657
      value of filter criterion for field 'LastModifiedDate' must be of type dateTime and should not be enclosed in quotes'
       extendedErrorDetails='{[0]}'
      ]
       row='1'
       column='657'
      ]
      ]
      
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
      	at java.lang.Class.newInstance(Class.java:442)
      	at com.sforce.ws.bind.TypeMapper.readSingle(TypeMapper.java:673)
      	at com.sforce.ws.bind.TypeMapper.readObject(TypeMapper.java:556)
      	at com.sforce.ws.transport.SoapConnection.parseDetail(SoapConnection.java:236)
      	at com.sforce.ws.transport.SoapConnection.createException(SoapConnection.java:210)
      	at com.sforce.ws.transport.SoapConnection.receive(SoapConnection.java:156)
      	at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:99)
      	at com.sforce.soap.partner.PartnerConnection.query(PartnerConnection.java:1197)
      	at org.talend.components.salesforce.runtime.SalesforceInputReader.executeSalesforceQuery(SalesforceInputReader.java:163)
      	at org.talend.components.salesforce.runtime.SalesforceInputReader.start(SalesforceInputReader.java:105)
      	... 4 more
      [statistics] disconnected
      
      Job accounts ended at 20:51 15/12/2020. [exit code=1]
      
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              igor.beslic Igor Beslic
              Reporter:
              igor.beslic Igor Beslic
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  Master
                  7.3.X