0
Answered

Object reference not set to an instance of an object error during 'Test Connection'

Matthew Woolnough 7 years ago updated by anonymous 7 years ago 6

I have a Custom connector which is throwing an error during Agent 'test connection' & when I try to connect in Connector.  Connector is written by Richard Green.  Richard believes that the error in Agent is being surfaced by code in IdB, not the custom connector. 

I have turned the logging as high as possible, but it doesn't reveal enough information to assist in resolving the issue. 

Is it possible to get more detail in this error?


20170830,05:19:07,UNIFY Identity Broker,AgentEngine,Warning,"The test of agent Contacts failed with message System.NullReferenceException: Object reference not set to an instance of an object.
   at Unify.Product.IdentityBroker.DatabaseAgent.TestConnection()
   at Unify.Product.IdentityBroker.AgentEngine.Test(Guid agentId).",Normal



Answer

Answer
Answered

Hi Matt,

Please apply the following patch Unify.IdentityBroker.Connector.Direct.dll and re-attempt the test operation. It should show you the stack-trace of the original error. Note that this won't resolve the issue, only assist with diagnosis, so feel free to remove it once the issue is resolved.

Under review

I can't see how this would be possible, the only line that could throw a NRE is protected by a null check in the constructor...

What version of Identity Broker? I'll give you debug symbols (to get line numbers) and possibly some more exception handling.

It's the latest version. 5.1.0.2 is file version on Unify.Service.Connect.exe

Answer
Answered

Hi Matt,

Please apply the following patch Unify.IdentityBroker.Connector.Direct.dll and re-attempt the test operation. It should show you the stack-trace of the original error. Note that this won't resolve the issue, only assist with diagnosis, so feel free to remove it once the issue is resolved.

No error now after restarting the service with the new DLL. It just worked. Removed the DLL & it still works.

At some point something changed in the environment that needed a service restart to engage.

Thanks for the assistance


Thanks for the update, Matt. I'm not sure why a service restart would have helped, unless you had deployed changes to the connector but not restarted the service to load them in.