web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Retail Async Client Error - "Commerce Data Exchange Async Client" - System.InvalidOperationException

(0) ShareShare
ReportReport
Posted on by

Hi all,

I am configuring the Retail components (Async Client, Async Server, Real-Time service and Retail Server) on my development environment and I am facing the following Async Client CommerceDataExchangeAsyncClientService issue. 

ApplySessionFileToClientDatabase encountered ProcessSourceRequestHeaderExceptionMicrosoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.ProcessSourceRequestHeaderException: ProcessTargetRequestHeader failed due to an InvalidOperationException.
connectionString: Data Source=XXXXX;Initial Catalog=RETAILCHANNELDB;Integrated Security=True;Connect Timeout=60;Application Name="Commerce Data Exchange Async Client" ---> System.InvalidOperationException: The given value of type String from the data source cannot be converted to type datetime of the specified target column. ---> System.FormatException: Failed to convert parameter value from a String to a DateTime. ---> System.FormatException: String was not recognized as a valid DateTime.
at System.DateTime.Parse(String s, IFormatProvider provider)
at System.Convert.ToDateTime(String value, IFormatProvider provider)
at System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider)
at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType, Boolean& coercedToDataFeed, Boolean& typeChanged, Boolean allowStreaming)
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType, Boolean& coercedToDataFeed, Boolean& typeChanged, Boolean allowStreaming)
at System.Data.SqlClient.SqlBulkCopy.ConvertValue(Object value, _SqlMetaData metadata, Boolean isNull, Boolean& isSqlType, Boolean& coercedToDataFeed)
--- End of inner exception stack trace ---
at System.Data.SqlClient.SqlBulkCopy.ConvertValue(Object value, _SqlMetaData metadata, Boolean isNull, Boolean& isSqlType, Boolean& coercedToDataFeed)
at System.Data.SqlClient.SqlBulkCopy.ReadWriteColumnValueAsync(Int32 col)
at System.Data.SqlClient.SqlBulkCopy.CopyColumnsAsync(Int32 col, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.CopyRowsAsync(Int32 rowsSoFar, Int32 totalRows, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsyncContinued(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.CopyBatchesAsync(BulkCopySimpleResultSet internalResults, String updateBulkCommandText, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestContinuedAsync(BulkCopySimpleResultSet internalResults, CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalRestAsync(CancellationToken cts, TaskCompletionSource`1 source)
at System.Data.SqlClient.SqlBulkCopy.WriteToServerInternalAsync(CancellationToken ctoken)
at System.Data.SqlClient.SqlBulkCopy.WriteRowSourceToServerAsync(Int32 columnCount, CancellationToken ctoken)
at System.Data.SqlClient.SqlBulkCopy.WriteToServer(IDataReader reader)
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlWriteRequestRunner.BulkCopyData(SqlConnection connection, SqlTransaction transaction)
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlWriteRequestRunner.Run(SqlConnection connection, SqlTransaction transaction)
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessWriteRequest(SqlConnection connection, SqlTransaction transaction)
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessTargetRequestHeader(ISCTargetRequestHeader targetRequestHeader)
--- End of inner exception stack trace ---
at Microsoft.Dynamics.Retail.StoreConnect.Request.SQLHandler.SCSqlTargetRequestHandler.ProcessTargetRequestHeader(ISCTargetRequestHeader targetRequestHeader)
at Microsoft.Dynamics.Retail.SynchClient.Core.DownloadAgent.ApplySessionFileToClientDatabase(SessionManager sessionMgr, String fileName)

Can someone please let me know what can be the issue?

Thanks in advance,

Kevin

*This post is locked for comments

I have the same question (0)
  • Rodolfo Recalde Profile Picture
    on at

    Hi K A,

    A.  Check Async Client installation. Using Async Client Configuration Utility

    Links:

    https://community.dynamics.com/ax/f/33/t/200711

    https://community.dynamics.com/cfs-file/__key/communityserver-discussions-components-files/33/AsyncClientConfigurationUtility_5F00_DAX_5F00_Recalde.png

    B. Check date/time format in windows and user/services users.

    Links:

    http://www.sysprobs.com/change-date-format-windows-7-ddmmyyyy

    https://social.technet.microsoft.com/Forums/office/en-US/ba808b50-b2b8-4589-a5db-cf9a0d2fcb17/change-the-date-format-to-ddmmyyyy-in-windows-server-2008-r2-for-all-users?forum=winservergen

    Date_5F00_Format_5F00_DAX_5F00_Recalde.png

    C. Check date time format and collation  in SQL Server DBs (Channel DB, message  DB and AX DB)

    Links:

    https://blogs.msdn.microsoft.com/sqlserverfaq/2009/11/13/how-to-change-date-format-after-installing-sql-server/

    http://stackoverflow.com/questions/331002/change-default-date-time-format-on-a-single-database-in-sql-server

    I Hope this Helps,

    Regards,

    Rodolfo Recalde.

  • Community Member Profile Picture
    on at

    Hi Rodolfo,

    First of all thanks for your suggestions.

    Unfortunately I am still facing this ambiguous issue. I cannot understand why its failing since once I sync the data, all the sub jobs in the Download Session form are being marked as 'Applied' (Please refer to screenshot fig1).

    DownloadSessions_2D00_Applied.PNG

    Fig 1: Shows the Async Client Configuration Tool - Test Connection result.

     

    DownloadSessions_2D00_Applied.PNG

    Fig 2: Shows the Download Session form which clearly shows that the jobs are being synced to the Retail Channel database with there status marked as 'Applied'.

    RetailAsyncServSite_2D00_Bindings.PNG

    Fig 3: Shows the RetailAsyncServSite Bindings

     RetailChannelDatabase_2D00_AsyncClientInfo.PNG

    Fig 4: Shows the Channel Database 'asyncclient' credential information.

    As you can see from the above screenshots, the same async client credentials are inserted in the 'Async Client Configuration Tool'.

    Do you have any more suggestions?

    Any suggestions would be greatly appreciated!

  • Rodolfo Recalde Profile Picture
    on at

    Hi Kevin,

    Apparently everything is correct. Unusual situation. Particularly the status "applied" in the download session.

    Please check these procedures:

    A. Verify Event Viewer to try to get more details.

    B. Try Sync Metadata 

     AX >  Retail > Setup >Parameters > Retail Scheduler Parameters > click Sync Metadata button

     Note: Before Sycn Metada double check the password configured in channed database form;

    C. Verify/Install  SSL certificatein Async Client Machine.

    D. Verify "Server Name" in Async  Client Configuration Tool. Maybe is a DNS issue. Try put IP our something like that "servername.yourcompany.com..."

    E. Verify if the data of your store were applied to the Channel DB. Perhaps this error is related to a job in particular. Run all jobs individually and check if any falls into error.

    I Hope this Helps!

    Regards,

    Rodolfo Recalde.

  • Verified answer
    Community Member Profile Picture
    on at

    Hi Rodolfo,

    I've fixed it and thought to share the solution.

    The issue was being caused because the Retail Sub-jobs fields were not matching the AX Schema. In order to fix the issue, I have created an AX job which loops through all the Retail Sub-jobs and executes the 'Match fields' functionality per each table.

    Once all the fields in the Retail Sub-jobs are matched, sync the data and restart the 'CommerceDataExchangeAsyncClient" service. It should work!

    Hope it helps!

  • feelyd Profile Picture
    260 on at

    This is something which is causing me issues at the moment.

    Do you have a copy of that AX job ? 

    Thanks

    Declan

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans