none
Error : Exception occured when persistance to database occured RRS feed

  • Question

  • Microsoft.XLANGs.Core.PersistenceException: Exception occurred when persisting state to the database. --->
     Microsoft.BizTalk.XLANGs.BTXEngine.PersistenceItemException: 
     A batch item failed persistence Item-ID 7bc22651-9b69-4148-89c4-719d88cfbf41 OperationType MAIO_CommitBatch Status -1061151998 
     ErrorInfo The published message could not be routed because no subscribers were found. . 
     ---> Microsoft.BizTalk.XLANGs.BTXEngine.PublishMessageException: Failed to publish (send) a message in the batch. This is usually because there is no one expecting to receive this message.  The error was The published message could not be routed because no subscribers were found.  with status -1061151998.   --- End of inner exception stack trace ---   --- End of inner exception stack trace ---   at Microsoft.BizTalk.XLANGs.BTXEngine.BTXXlangStore.Commit()   at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate)   at Microsoft.XLANGs.Core.LongRunningTransaction.PendingCommit(Boolean ignore, XMessage msg)   at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, SubscriptionWrapper& subscriptionWrapper, Context cxt, Segment seg, ActivityFlags flags)   at <orch name>.segment2(StopConditions stopOn)   at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)

    4dbe4d93-b2d5-409d-9f83-7924d7dccab1

    I am getting above error, while sending the message to HTTP.

    Here am using request response send/receive port and am using single orch. 

    any valuable suggestion


    Vinoth

    Saturday, January 23, 2016 6:51 PM

Answers

  • Vinoth,

    This is due to the fact that there should be at least one subscriber for message published and received by your 2-way send location.

    You need to check for the subscriptions:

    How to check subscription

    1. Open the Biztalk Administration Console 
    2. Click on the Biztalk Group
    3. Click on the New Query tab
    4. Select Field Name: Search For, Operator: Equals, Value: Subscriptions
    5. Select Field Name: Subscription Type, Operator: Equals, Value: Activation Subscriptions
    6. Click Run Query
    7. Open the subscription for the required artifact(Orchestration or send port).


    Rachit Sikroria (Microsoft Azure MVP)

    • Marked as answer by Angie Xu Tuesday, February 2, 2016 1:38 AM
    Sunday, January 24, 2016 2:09 AM
    Moderator

All replies

  • The reason is right there in the stack:

    " The published message could not be routed because no subscribers were found. . "

    There is something about the outgoing message that does not match the intended destination.

    Saturday, January 23, 2016 10:10 PM
    Moderator
  • Vinoth,

    This is due to the fact that there should be at least one subscriber for message published and received by your 2-way send location.

    You need to check for the subscriptions:

    How to check subscription

    1. Open the Biztalk Administration Console 
    2. Click on the Biztalk Group
    3. Click on the New Query tab
    4. Select Field Name: Search For, Operator: Equals, Value: Subscriptions
    5. Select Field Name: Subscription Type, Operator: Equals, Value: Activation Subscriptions
    6. Click Run Query
    7. Open the subscription for the required artifact(Orchestration or send port).


    Rachit Sikroria (Microsoft Azure MVP)

    • Marked as answer by Angie Xu Tuesday, February 2, 2016 1:38 AM
    Sunday, January 24, 2016 2:09 AM
    Moderator
  • Hi Vinoth ,

    There may be two reasons for your exception .

    1) It was being caused due to a duplicate subscription in the Message Box. Have you checked whether there is any other Orchestration or send port listing to the message message .

    http://geekswithblogs.net/VishnuTiwariBlog/archive/2009/12/07/exception-occurred-when-persisting-state-to-the-database.aspx

    To check why you don't have the subscription :

    • Go in the Administration console, BizTalk Group Page and set a New query
    • Search for Subscriptions, in the result you can see the subscriptions and the expression of the subscription
    • Check you message in error, in the property of the message, check the context to see the different value of the property.
    • The value of the property in the message and in the expression of the subscription must match to work AND the property in the message must be promoted. Only promoted property can be used for routing

    Thanks

    Abhishek


    If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply

    Sunday, January 24, 2016 7:20 PM
  • Hi Vinoth - as others have mentioned, you have published a message to the MessageBox database but there are no artifacts that will pick up the message - there is no subscription that matches the context stamped on the message.

    To troubleshoot this, find the Routing Failure Report message that will be associated with this failed message.  This will list all the promoted context on the message that will be used for routing.

    Also check that your Send Port is in the "Started" state (is green) via the BizTalk admin console.

    Cheers,

    James.

    Sunday, January 24, 2016 7:25 PM