Another old problem I haven’t gotten around to post .. better later than never.
About a year ago I did some work with MQseries and the MQ series adapter that runs against the MQseries client. I had everything installed locally on my x64 Vista, with MQseries QM 6.0 patched up to 126.96.36.199 giving it x64 support.
I wanted to do some Loadgen testing and feed some messages onto a queue. Nothing complicated.
When I ran the
Loadgen 2007 ran the MQseries test, told me that nothing had written put onto the queue, and burped up this in the eventlog:
Start() Section [MQSeriesRxQNonInOrd] encountered the following exception!System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at IBM.WMQ.MQServer.MQCONNX(String qMgrName, MQCNO& mqcno, Int32& pHconn, Int32& pCompCode, Int32& pReason)
at IBM.WMQ.MQServerConnector.MQCONNX(String qMgrName, MQConnectOptions& cno, Int32& hConn, Int32& compCode, Int32& reason)
at IBM.WMQ.MQQueueManager.Connect(String queueManagerName)
at MQSeriesTransport.MQSeriesTransport.Initialize(String sInitialize)
I could see that the System.BadImageFormatException had something to do with a DLL that werent getting loaded due to several possibilities.
With reflector I can see that the Loadgen MQseriesTransport.dll is calling the amdmdnet.dll, containing the interfaces for .NET
And the Corflags.exe shows me that amqmdnet.dll is a .NET v. 1.1 DLL which means it can’t be loaded by an x64 process…
That explains the error I’m getting. Loadgen and MQ series doesnt play nice on x64 with MQseries 6.0 …
Feeble attempts as a solution … not yet working
What if … calling the Loadgenconsole.exe from the 32 bit version of the command prompt?? That ought to work because I’m running a 32 bit process and calling a .NET 1.1 from a .NET 2.0 in a 32 bit process is supported.
Lets try …
I’m starting a 32 bit instance of the command prompt by doing this: %windir%\SysWoW64\cmd.exe
And I’m going to the taskmanager to check that I’m really getting a 32 bit process. I am .. check the bottom one:
But …. It still give me the exact same error … WHY WHY WHY?? If anyone has the answer .. let me know.
I’ll keep looking into this as I know I’ll need it someday. I’ll post the solution here if I find one … else email me if you have a more urgent need for a solution and I’ll look into it asap. I’ll need it myself some day …