Selami Ozlu wrote:
Hi,
when i try to connect to IBM MQ manager, i get the following error
An unhandled exception of type 'System.NullReferenceException'
occurred in
Unknown Module.
Additional information: Object reference not set to an instance of an
object.
Here is my code:
Regards, Selami Ozlu selamiozlu
Try
If mChannel <"" Then
mqQMgr = New MQQueueManager(mManagerName, channelName,
connectionName)
ElseIf mManagerName <"" Then
mqQMgr = New MQQueueManager(mManagerName)
Else
mqQMgr = New MQQueueManager
End If
Catch ex As Exception
Throw New Exception("Manager failed: " & ex.Message)
End Try
First of all, the code as shown does not have any obvious references to
null values so there's no way for us to know what in particular could be
wrong, of if it is even this piece of code. Have you tried debugging to
see which line in the above piece of code that fails with the error, and
have you made sure that none of the variables in the code are null?
Second, I'd vaguer not that many people here have access to or is used
to dealing with the IBM MQ system, so you might need to go ask the
question on a newsgroup or discussion forum related to that product.
Lastly, the code as shown is VB.NET, not C#, and although I suspect your
question doesn't really have anything to do with the language, you might
also get more appropriate answers in a VB newsgroup.
Sorry that I can't be much of a help, but I suspect nobody can with the
provided information.
--
Lasse Vågsæther Karlsen
mailto:la***@vkarlsen.no
http://presentationmode.blogspot.com/