BM MQ error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Selami Ozlu

    #1

    BM MQ error

    Hi,
    when i try to connect to IBM MQ manager, i get the following error

    An unhandled exception of type 'System.NullRef erenceException '
    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("Mana ger failed: " & ex.Message)
    End Try
  • =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?=

    #2
    Re: BM MQ error

    Selami Ozlu wrote:
    Hi,
    when i try to connect to IBM MQ manager, i get the following error
    >
    An unhandled exception of type 'System.NullRef erenceException '
    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("Mana ger 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:lasse@vk arlsen.no
    Blogger is a blog publishing tool from Google for easily sharing your thoughts with the world. Blogger makes it simple to post text, photos and video onto your personal or team blog.

    Comment

    • Selami Ozlu

      #3
      Re: BM MQ error

      On Dec 7, 5:41 pm, Lasse Vågsæther Karlsen <la...@vkarlsen .nowrote:
      Selami Ozlu wrote:
      Hi,
      when i try to connect to IBM MQ manager, i get the following error
      >
      An unhandled exception of type 'System.NullRef erenceException '
      occurred in
      Unknown Module.
      >
      Additional information: Object reference not set to an instance of an
      object.
      >
      Here is my code:
      Regards, Selami Ozluselamiozlu
      >
      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("Mana ger 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...@vk arlsen.nohttp://presentationmod e.blogspot.com/- Hide quotedtext -
      >
      - Show quoted text -
      Hi Lasse,
      the line that seems it causes the problem:
      mqQMgr = New MQQueueManager( mManagerName, channelName, connectionName)

      yes, i know it is not C# problem althouhg i use bv and C# together.

      Thank you
      Selami Ozlu selamiozlu

      Comment

      Working...