Could not enlist orchestration Object reference not set to an instance of an object.

I encountered a strange problem with a deployment of a new orchestration version. I had to maintain the old version because of some long running dehydrated orchestrations. Biztalk returned an error when starting:

Could not enlist orchestration 'YourAssembly, Version=1.0.0.4, Culture=neutral, PublicKeyToken=a766565c0242a3f2'.
Could not enlist orchestration '
YourAssembly, Version=1.0.0.4, Culture=neutral, PublicKeyToken=a766565c0242a3f2'. Object reference not set to an instance of an object. (Microsoft.BizTalk.ExplorerOM)

Event Type: Error
Event Source: XLANG/s
Event Category: None
Event ID: 0
Date: 3/7/2013
Time: 2:53:24 PM
User: N/A
Computer: ACC
Description:
NullReferenceException exception occurred while the XLANG/s runtime enlisted a service.
Error message:Object reference not set to an instance of an object.
Call stack: at Microsoft.BizTalk.XLANGs.BTXEngine.BTXServiceStaticState.CreatePortInfoTable(OrchestrationMetadata orchMetadata, Hashtable portToLrp)
 at Microsoft.BizTalk.XLANGs.BTXEngine.BTXServiceStaticState.PersistState(String mgmtDBServer, String mgmtDBName, String MsgBoxGroupName, String ApplicationName, String serviceAssembly, String serviceTypeName, Guid[] PortIDs, Guid[] LrpIDs, Delegate satAssemblyCacheCallback, ITransaction transaction)
 at Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.GoLive(String configDBServer, String configDBName, String msgBoxGroupName, String applicationName, String servicePath, String serviceTypeName, Guid[] portIDs, Guid[] lrpIDs, Delegate satAssemblyCacheCallback, ITransaction transaction)

Exception type: BTXEnlistmentException
Additional error information:

Object reference not set to an instance of an object.

Exception type: NullReferenceException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: System.Collections.Generic.Dictionary`2[System.String,Microsoft.BizTalk.XLANGs.BTXEngine.BiztalkPort] CreatePortInfoTable(Microsoft.BizTalk.XLANGs.BTXEngine.OrchestrationMetadata, System.Collections.Hashtable)
The following is a stack trace that identifies the location where the exception occured

at Microsoft.BizTalk.XLANGs.BTXEngine.BTXServiceStaticState.CreatePortInfoTable(OrchestrationMetadata orchMetadata, Hashtable portToLrp)
 at Microsoft.BizTalk.XLANGs.BTXEngine.BTXServiceStaticState.PersistState(String mgmtDBServer, String mgmtDBName, String MsgBoxGroupName, String ApplicationName, String serviceAssembly, String serviceTypeName, Guid[] PortIDs, Guid[] LrpIDs, Delegate satAssemblyCacheCallback, ITransaction transaction)
 at Microsoft.BizTalk.XLANGs.BTXEngine.BTXService.GoLive(String configDBServer, String configDBName, String msgBoxGroupName, String applicationName, String servicePath, String serviceTypeName, Guid[] portIDs, Guid[] lrpIDs, Delegate satAssemblyCacheCallback, ITransaction transaction)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

After googling and trying everything(gac uninstall re-install  msi re-install reboot, restart host  re-installing all depended assembly’s) I started trying everything else.

Finally after rebuilding the old sources into the new version, the same error returned while enlisting the orchestration, when building against the previous it worked. The building the new sources, with the old version, no problem. The building the new sources with the new version number, and running them side by side…… fixed.

I think there was a problem in the management database with versions and assembly’s. So try playing around with version numbers an deployment if you encounter the same problem. Gives you a great evening of problem solving! 😀

One thought on “Could not enlist orchestration Object reference not set to an instance of an object.

Leave a Reply