Search code examples
biztalkbiztalk-2016

After making changes to Schema, I am getting Exception occurred when persisting state to the database error


My BizTalk application is calling some Azure functions and receiving a response, but due to recent changes, those Azure functions are returning responses in the camel case, so I made changes to some schemas where I just changed the casing to camel case for the required nodes. But after this change, two orchestrations are not working and throwing the following error.

Uncaught exception (see the 'inner exception' below) has suspended an instance of service 'Bupa.GS.BZ.OBP.ProviderReceiver.FileValidationCompleteAndMixedReport(acdce2c2-3370-b103-30e6-a80725e86ce0)'. The service instance will remain suspended until administratively resumed or terminated. If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception. InstanceId: 1fd57762-c4bd-49a8-bd4f-ebdd57d37b9d Shape name: Send ShapeId: 43bb00d5-f4d7-4330-83eb-c3c500bf1d7b Exception thrown from: segment 1, progress 28 Inner exception: Exception occurred when persisting state to the database.

Exception type: PersistenceException Source: Microsoft.XLANGs.BizTalk.Engine Target Site: Void Commit() The following is a stack trace that identifies the location where the exception occured

at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit() at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolea*

I can see that the response is received and is being mapped to the schema.

Schema

But it is not moving to the next stage where I am using this same message and mapping it to another schema in orchestration. All I did was change the casing.

Orchestration image where I have highlighted where I am getting the error Orchestration image where I have highlighted where I am getting the error

Port Properties Port Properties

Checked all the schemas. All schemas are matching with the response I am getting from Azure functions.


Solution

  • I have solved it. It was a casing issue. One of the helper class was using xpath get node value, which was used for routing, but since I changed the casing in schema, the helper class was not able to find the node. After making the casing throughout the entire solution issue was resolved.