.comment-link {margin-left:.6em;}

Ben Cops

Friday, February 17, 2006

Persistence Exception + Routing Failure

Often I'll get the following error:

Exception occurred when persisting state to the database.

Exception type: PersistenceException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void Commit()
Help Link:
Additional error information:

A batch item failed persistence Item-ID 72407d67-ec02-4c88-a404-b2af5df17b15 OperationType MAIO_CommitBatch Status -1061151998 ErrorInfo The published message could not be routed because no subscribers were found. Please use the Health and Activity Monitoring (HAT) tool to diagnose this situation.


HAT doesn't seem to show anything in error and its all a bit misleading.

This is usually because I have a direct messagebox send somewhere after where HAT shows the orchestration position. I'm getting the persistence error because the thing that's supposed to be subscribing to the (direct sent) message is an independent send port which hasn't had its filter set or set correctly (remember you are often setting BTS.MessageType to the schema's target namespace + "#" + the root node name). You have to set a filter on an independent send port - it won't just send everything!

Tuesday, February 14, 2006

You have selected an invalid pipeline component assembly

When adding a pipeline component to the toolbar, the IDE checks the component, and apparently runs through all its dependencies. If it can't resolve a dependency somewhere either through the GAC or in the same folder (normal probing rules) you get an error on attempting to add the component:

You have selected an invalid pipeline component assembly... <then some red herring about security on UNC paths>

You also get this error if you've not marked up your pipeline component properly - the component must have the following attribute on the class!

[ComponentCategory(CategoryTypes.CATID_PipelineComponent)]

*DOH*

Monday, February 13, 2006

MQ Adapter rolls back transaction in case of subscription failure

A new, new year resolution....and the MQS adapter...

if the “TransactionSupported” property of a MQ Series receive location is set to “Yes”, and the “Maximum Messages in Batch” property is set to a number > 1, the adapter will rollback transactions even in case of Subscription Failures

Wednesday, February 08, 2006

External assembly script functoid troubleshooting tips

A checklist in case its not going well for you:


  • Don't use static methods in the external assembly

  • If you want to use configuration file data from the assembly, and you're testing the map, put the configuration in devenv.config. Obviously at runtime this should go in btsntsvc.config

  • Add a reference to the external assembly in your map project

  • Add the assembly to the GAC & remember to refresh the GAC when you test map and deploy

  • Use validate map to see the strong name of the assembly you're actually referencing - updating the version number of the assembly is not handled well and often means you're looking for an old dll

  • If you've updated the assembly, and can see the changes in the mapper, but they are not in evidence when you test map, restart visual studio

  • Dates can come through with the UTC gotcha when being converted to datetime

  • XSD wants its dates in YYYY-MM-DD format

Tuesday, February 07, 2006

Allow early termination

This thread pointed me back to another Schema node extra - allow_early_termination="true". This allows me to have the last element in a positional set within a set of delimited rows be shorter than specified.
Handy for the 32A field on a SWIFT message which is positional for the date/currency/amount, with the amount "up to" 15 characters long.

SWIFT accelerator come back - all is forgiven!

[edit] if you import a schema within another, and use one of your nodes as a type in the parent, you need to remember to add this attribute on the parent too!