ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » The type initializer for 'IBM.WMQ.MQQueueManager' threw an e

Post new topic  Reply to topic
 The type initializer for 'IBM.WMQ.MQQueueManager' threw an e « View previous topic :: View next topic » 
Author Message
Anwar123
PostPosted: Thu Jul 19, 2012 10:11 pm    Post subject: The type initializer for 'IBM.WMQ.MQQueueManager' threw an e Reply with quote

Newbie

Joined: 19 Jul 2012
Posts: 3

Hi

I am builbing a .Net windows services on Windows 2003. I am using amqmdnet.dll for Creating Object of MQQueuemanager. My code is

Code:
public CitigatewayMQConnection(string queueManagerName, Hashtable properties)
            : base()
        {
            try
            {
                m_qmgr = new MQQueueManager(queueManagerName, properties);               
                m_queueTable = new Dictionary<string, CitigatewayMQQueue>();
            }
            catch (MQException ex)
            {
                CreateLog("ex.CompCode=" + ex.CompCode + " ex.ReasonCode=" + ex.ReasonCode + " ex.Data=" + ex.Data + " ex.HelpLink=" + ex.HelpLink + " ex.InnerException=" + ex.InnerException + " ex.Reason" + ex.Reason, EventLogEntryType.Error);
            }
            catch (Exception ex)
            {
                CreateLog("ConnectMQManager::Source::" + ex.Source + "::Message::" + ex.Message, EventLogEntryType.Error);               
            }                       
        }


Every time I am getting the following exception

Code:
ConnectMQManager::Source::amqmdnet::Message::The type initializer for 'IBM.WMQ.MQQueueManager' threw an exception.


Following Version of MQ
Name: WebSphere MQ
Version: 7.0.1.2
CMVC level: p701-102-100504
BuildType: IKAP - (Production)
Platform: WebSphere MQ for Windows
Mode: 32-bit
O/S: Windows Server 2003, Build 3790: SP2


AMQ8351: WebSphere MQ Java environment has not been configured correctly.


AMQ8351: WebSphere MQ Java environment has not been configured correctly.


AMQ8351: WebSphere MQ Java environment has not been configured correctly.

Name: IBM WebSphere MQ custom channel for Windows Communication Foundatio
n
Version: 7.0.1.0
CMVC Level: wn701-L090925
Build Type: Production


Name: IBM Message Service Client for .NET (XMS .NET)
Version: 2.0.0.2
CMVC Level: nn200-L100429
Build Type: Production

Kindly help, Thanks in advance
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Jul 20, 2012 4:44 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

It seems clear that there's a configuration error.

As you've not bothered to post any details on how you've configured the environment or indeed what property values you're using to create the queue manager object it's impossible to say what the problem might be.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
Anwar123
PostPosted: Mon Jul 23, 2012 7:17 pm    Post subject: Reply with quote

Newbie

Joined: 19 Jul 2012
Posts: 3

Yes, After changing the environment variable, It sarted working, now I have one more issue, whenever I begin the transaction, it throw an exception, MQRC_ENVIRONMENT_ERROR.MQRC_ENVIRONMENT_ERROR
BeginTransaction Exception CompletionCode:2 ReasonCode=2012 |MQRC_ENVIRONMENT_ERROR
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Jul 23, 2012 8:59 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

you want to upgrade. V 7.0.1.2 won't cut it.
Try V 7.0.1.8

Also you might have been using the wrong type of connection...
Make sure you use an unmanaged connection...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Anwar123
PostPosted: Tue Jul 24, 2012 4:11 am    Post subject: Reply with quote

Newbie

Joined: 19 Jul 2012
Posts: 3

How Can I determine the type of connection I am just using amqmdnet.dll
and creating the MQ object.

MQMangerConProp.Add(MQC.HOST_NAME_PROPERTY, MQManagerProp.MQHostName);
MQMangerConProp.Add(MQC.CHANNEL_PROPERTY, MQManagerProp.MQChannelName);
MQMangerConProp.Add(MQC.PORT_PROPERTY, MQManagerProp.MQPortNumber);
}

CGMQConnect = new CitigatewayMQConnection(MQManagerProp.MQName, MQMangerConProp);

And please can you explain what do you mean by unmanaged connection...

Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Jul 24, 2012 4:30 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

Anwar123 wrote:
How Can I determine the type of connection I am just using amqmdnet.dll
and creating the MQ object.


Which means the dll will (in the absense of one being specified by you) determine by inference which connection type to use, by means laid out in the documentation.

Anwar123 wrote:
And please can you explain what do you mean by unmanaged connection...


The WMQ .NET supports 3 different connection types. Perhaps you should research them further before trying to use the interface by randomly grabbing methods from the dll?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Jul 24, 2012 4:35 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

IMS, there is an IBM WMQ manual with .net in the title.
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » The type initializer for 'IBM.WMQ.MQQueueManager' threw an e
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.