Author |
Message
|
lium |
Posted: Fri Jan 03, 2014 10:42 pm Post subject: not able to create load Oracle switch file |
|
|
Disciple
Joined: 17 Jul 2002 Posts: 184
|
My OS is windows 7 64bit, the MQ is 32 bit.
I downloaded the VC++ 10.0 express, and I tried to create teh load switch as following:
C:\IBM\WebSphere MQ\tools\c\Samples\xatm>nmake -f oraxaswit.mak oraswit.dll
Microsoft (R) Program Maintenance Utility Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
cl -c -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl -nologo -GS -D_X86_=1 -DWIN32 -
D_WIN32 -W3 -D_WINNT -D_WIN32_WINNT=0x0500 -DNTDDI_VERSION=0x05000000 -D_WIN32_I
E=0x0500 -DWINVER=0x0500 -D_MT -D_DLL -MDd oraswit.c
oraswit.c
lib -machine:i386 -def:oraswit.def oraswit.obj
Microsoft (R) Library Manager Version 12.00.21005.1
Copyright (C) Microsoft Corporation. All rights reserved.
Creating library oraswit.lib and object oraswit.exp
link /INCREMENTAL:NO /NOLOGO -entry:_DllMainCRTStartup@12 -dll
-base:0x1C000000 orasw
it.exp oraswit.obj -out:"C:\IBM\WebSphere
MQ\exits"\oraswit.dll kernel32.lib ws2_32.lib mswsock.lib
advapi32.lib "C:\app\product\11.2.0\dbhome_1\RDBMS\XA"\oraxa11.lib
oraswit.obj : error LNK2019: unresolved external symbol __imp__xaosw referenced
in function _MQStart
C:\IBM\WebSphere MQ\exits\oraswit.dll : fatal error LNK1120: 1 unresolved extern
als
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0
\VC\BIN\link.EXE"' : return code '0x460'
Stop.
C:\IBM\WebSphere MQ\tools\c\Samples\xatm>cl
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
Any tips would be greatly appreciated.
Thax |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Jan 04, 2014 7:16 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Did you search google?
What instructions are you following? _________________ 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 |
|
 |
lium |
Posted: Sat Jan 04, 2014 10:12 am Post subject: |
|
|
Disciple
Joined: 17 Jul 2002 Posts: 184
|
I solved this problem.
I downloaded the Oracle client 32 bit, and it worked.
however, This dll got problem when the queue manager starts with following errors:
1/4/2014 17:22:45 - Process(3116.1) User(MUSR_MQADMIN) Program(amqzxma0.exe)
Host(WIN-JFFTF45GEQM) Installation(Installation1)
VRMF(7.5.0.2) QMgr(BHQM)
AMQ6287: WebSphere MQ V7.5.0.2 (p750-002-130627).
EXPLANATION:
WebSphere MQ system information:
Host Info :- Windows Server 2008 R2 Server Datacenter Edition, Build
7601: SP1 (MQ Windows 32-bit)
Installation :- C:\IBM\WebSphere MQ (Installation1)
Version :- 7.5.0.2 (p750-002-130627)
ACTION:
None.
-------------------------------------------------------------------------------
1/4/2014 17:22:45 - Process(3116.1) User(MUSR_MQADMIN) Program(amqzxma0.exe)
Host(WIN-JFFTF45GEQM) Installation(Installation1)
VRMF(7.5.0.2) QMgr(BHQM)
AMQ6256: The system could not dynamically load the DLL 'C:\IBM\WebSphere
MQ\exits\oraswit.dll'.
EXPLANATION:
This message applies to Windows systems. The DLL 'C:\IBM\WebSphere
MQ\exits\oraswit.dll' failed to load as it is probably a 64-bit DLL, a 32-bit
DLL is required. Note that MQ tried to find a 32-bit DLL named
'C:\IBM\WebSphere MQ\exits32\oraswit.dll', but failed. The following message
gives details of the original failure.
ACTION:
Supply the name of a 32-bit DLL.
----- amqxufnn.c : 1582 -------------------------------------------------------
1/4/2014 17:22:45 - Process(3116.1) User(MUSR_MQADMIN) Program(amqzxma0.exe)
Host(WIN-JFFTF45GEQM) Installation(Installation1)
VRMF(7.5.0.2) QMgr(BHQM)
AMQ6175: The system could not dynamically load the library C:\IBM\WebSphere
MQ\exits\oraswit.dll. The system returned error message '<NULL>'.
EXPLANATION:
This message applies to Windows systems only. The dynamically loadable file
C:\IBM\WebSphere MQ\exits\oraswit.dll failed to load correctly due to an
internal error. The MQ error recording routine has been called.
ACTION:
Check that the file has not been corrupted then use the standard facilities
supplied with your system to record the problem identifier, and to save the
generated output files. Use either the WMQ Support site:
http://www.ibm.com/software/integration/wmq/support/, or IBM Support Assistant
(ISA): http://www.ibm.com/software/support/isa/, to see whether a solution is
already available. If you are unable to find a match, contact your IBM support
center. Do not discard these files until the problem has been resolved.
----- amqxufnn.c : 708 --------------------------------------------------------
1/4/2014 17:22:45 - Process(3116.1) User(MUSR_MQADMIN) Program(amqzxma0.exe)
Host(WIN-JFFTF45GEQM) Installation(Installation1)
VRMF(7.5.0.2) QMgr(BHQM)
AMQ7622: WebSphere MQ could not load the XA switch load file for resource
manager 'PRODEVALORA'.
EXPLANATION:
An error has occurred loading XA switch file oraswit.dll. If the error occurred
during startup then the queue manager will terminate. At all other times the
queue manager will continue without this resource manager meaning that it will
no longer be able to participate in global transactions. The queue manager will
also retry the load of the switch file at regular intervals so that the
resource manager will be able to participate again should the load problem be
resolved.
ACTION:
Look for a previous message outlining the reason for the load failure. Message
AMQ6175 is issued if the load failed because of a system error. If this is the
case then follow the guidance given in message AMQ6175 to resolve the problem.
In the absence of prior messages or FFST information related to this problem
check that the name of the switch load file is correct and that it is present
in a directory from which it can be dynamically loaded by the queue manager.
The easiest method of doing this is to define the switch load file as a
fully-qualified name. Note that if the queue manager is still running it will
need to be restarted in order that any changes made to its configuration data
can be picked up.
----- amqtrmca.c : 373 -------------------------------------------------------- |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Jan 04, 2014 10:18 am Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Where (what library) did your compile/bind store the oraswit.dll? _________________ 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 |
|
 |
lium |
Posted: Sat Jan 04, 2014 11:05 am Post subject: |
|
|
Disciple
Joined: 17 Jul 2002 Posts: 184
|
Tx for reply.
The following is my make file:
!include <ntwin32.mak>
MQ_DEFAULT_INSTALLATION_PATH=C:\IBM\WebSphere MQ
MQ_DEFAULT_DATA_PATH=C:\IBM\WebSphere MQ
#-------------------------------------------------------------------------------
# The PROCESSOR_ARCHITECTURE environment variable being set to AMD64 indicates
# that a 64-bit compiler is in use. If this is the case, we build to the 64-bit
# exits directory (exits64) as opposed to the 32-bit one (exits).
#
#-------------------------------------------------------------------------------
MQ_INSTALLATION_PATH=$(MQ_DEFAULT_INSTALLATION_PATH)
MQ_DATA_PATH=$(MQ_DEFAULT_DATA_PATH)
MQEXITDIR="$(MQ_DATA_PATH)\exits"
ORALIBPATH="C:\app\michael.liu\product\11.2.0\client_1\rdbms\XA"
CPU=i386
#CPU=AMD64
#-------------------------------------------------------------------------------
# Oracle XA switch load file
#-------------------------------------------------------------------------------
# The following line is for Oracle 11
ORALIBS=oraxa11.lib
ORALIBFLAGS=$(ORALIBPATH)\$(ORALIBS)
oraswit.lib oraswit.exp: $*.obj $*.def
$(implib) -machine:$(CPU) \
-def:$*.def $*.obj
$(MQEXITDIR)\oraswit.dll: $*.obj $*.def $*.exp
$(link) $(dlllflags) \
-base:0x1C000000 \
$*.exp $*.obj \
-out:$(MQEXITDIR)\oraswit.dll \
$(conlibsdll) $(ORALIBFLAGS)
if exist $(MQEXITDIR)\oraswit.dll.manifest \
mt.exe -manifest $(MQEXITDIR)\oraswit.dll.manifest \
-outputresource:$(MQEXITDIR)\oraswit.dll;#2
.c.obj:
$(cc) $(cflags) $(cvarsdll) $*.c
Also, I verifed the dll is 32 bit as following:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin>dumpbin /HEADERS "C:\
ibm\WebSphere MQ\exits\oraswit.dll" |more
Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file C:\ibm\WebSphere MQ\exits\oraswit.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
14C machine (x86)
4 number of sections
52C84294 time date stamp Sat Jan 04 17:19:16 2014
0 file pointer to symbol table
0 number of symbols
E0 size of optional header
2102 characteristics
Executable
32 bit word machine
DLL
OPTIONAL HEADER VALUES
10B magic # (PE32)
12.00 linker version
E00 size of code
E00 size of initialized data
0 size of uninitialized data
1380 entry point (1C001380)
1000 base of code
2000 base of data
1C000000 image base (1C000000 to 1C004FFF)
1000 section alignment
200 file alignment
6.00 operating system version
0.00 image version
6.00 subsystem version
0 Win32 version
5000 size of image
400 size of headers
0 checksum
2 subsystem (Windows GUI)
140 DLL characteristics
Dynamic base
NX compatible
100000 size of stack reserve
1000 size of stack commit
100000 size of heap reserve
1000 size of heap commit
0 loader flags
10 number of directories
2350 [ 46] RVA [size] of Export Directory
2398 [ 50] RVA [size] of Import Directory
0 [ 0] RVA [size] of Resource Directory
0 [ 0] RVA [size] of Exception Directory
0 [ 0] RVA [size] of Certificates Directory
4000 [ 164] RVA [size] of Base Relocation Directory
0 [ 0] RVA [size] of Debug Directory
0 [ 0] RVA [size] of Architecture Directory
0 [ 0] RVA [size] of Global Pointer Directory
0 [ 0] RVA [size] of Thread Storage Directory
2288 [ 40] RVA [size] of Load Configuration Directory
0 [ 0] RVA [size] of Bound Import Directory
2000 [ 7C] RVA [size] of Import Address Table Directory
0 [ 0] RVA [size] of Delay Import Directory
0 [ 0] RVA [size] of COM Descriptor Directory
0 [ 0] RVA [size] of Reserved Directory
SECTION HEADER #1
.text name
CDC virtual size
1000 virtual address (1C001000 to 1C001CDB)
E00 size of raw data
400 file pointer to raw data (00000400 to 000011FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
60000020 flags
Code
Execute Read
SECTION HEADER #2
.rdata name
69C virtual size
2000 virtual address (1C002000 to 1C00269B)
800 size of raw data
1200 file pointer to raw data (00001200 to 000019FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
40000040 flags
Initialized Data
Read Only
SECTION HEADER #3
.data name
354 virtual size
3000 virtual address (1C003000 to 1C003353)
200 size of raw data
1A00 file pointer to raw data (00001A00 to 00001BFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
C0000040 flags
Initialized Data
Read Write
SECTION HEADER #4
.reloc name
164 virtual size
4000 virtual address (1C004000 to 1C004163)
200 size of raw data
1C00 file pointer to raw data (00001C00 to 00001DFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
42000040 flags
Initialized Data
Discardable
Read Only
Summary
1000 .data
1000 .rdata
1000 .reloc
1000 .text |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jan 04, 2014 2:01 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
As specified in your error the directory where you put the switch file is wrong.
I have no idea, which system you are upgrading from.
However since V7.0 best practice has been to create the switchfile in BOTH 32 bit and 64 bit version.
You then need to place each version into it's respective directory:
<mqdata>\exits\<mqinstallationname>
<mqdata>\exits64\<mqinstallationname>
Of course each switchfile needs to be compiled with the correct (32 bit vs 64 bit) version of both os and MQ libraries...
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
lium |
Posted: Sat Jan 04, 2014 6:14 pm Post subject: |
|
|
Disciple
Joined: 17 Jul 2002 Posts: 184
|
The solution eventually turns out very funny.
I restarted the whole machine, and then it works.
However, I bumped into another error:
1/5/2014 01:54:25 - Process(1636.1) User(MUSR_MQADMIN) Program(amqzxma0.exe)
Host(WIN-JFFTF45GEQM) Installation(Installation1)
VRMF(7.5.0.2) QMgr(BHQM)
AMQ7605: The XA resource manager PRODEVALORA has returned an unexpected return
code -5, when called for xa_open.
EXPLANATION:
WebSphere MQ received an unexpected return code when calling XA resource
manager PRODEVALORA at its xa_open entry point. This indicates an internal
error, either within MQ or the resource manager.
ACTION:
Try to determine the source of the error. A trace of the failure could be used
to look at the XA flows between MQ and the resource manager. MQ has allocated
an RMId of 257 to this resource manager. This will be useful when isolating
the flows associated with the resource manager concerned. If the error occurs
on an xa_commit or xa_rollback request, the queue manager will not attempt to
redeliver the commit or rollback instruction for this transaction, until after
the queue manager has been restarted. The transaction indoubt is identified by
the following XID of X''. If you think that the error lies within the queue
manager, save any generated output files and use either the MQ Support site:
http://www.ibm.com/software/integration/wmq/support/, or IBM Support Assistant
(ISA): http://www.ibm.com/software/support/isa/, to see whether a solution is
already available. If you are unable to find a match, contact your IBM support
center. Do not discard any information describing the problem until after the
problem has been resolved.
The qm.ini has the following content:
XAResourceManager:
Name=PRODEVALORA
SwitchFile=oraswit.dll
XAOpenString=ORACLE_XA+HostName=localhost+PortNumber=1521+ACC=P/prodeval/password+sestm=100+threads=TRUE+DataSource=PRODEVAL+K=2+
ThreadOfControl=PROCESS
I am sure the user/password is correct.
Could any body give me any idea?
Thanks, |
|
Back to top |
|
 |
lium |
Posted: Sat Jan 04, 2014 7:16 pm Post subject: |
|
|
Disciple
Joined: 17 Jul 2002 Posts: 184
|
I improved the qm.ini to the following:
XAResourceManager:
Name=OracleXA
SwitchFile=oraswit
XAOpenString=ORACLE_XA
+HostName=localhost
+PortNumber=1521
+Sid=orcl
+ACC=P/prodeval/password
+sestm=100
+threads=TRUE
+DataSource=PRODEVAL
+K=2+
XACloseString=
ThreadOfControl=THREAD
However, still got the same error |
|
Back to top |
|
 |
lium |
Posted: Sat Jan 04, 2014 7:45 pm Post subject: |
|
|
Disciple
Joined: 17 Jul 2002 Posts: 184
|
Here is the FDC file AMQ2376.0.FDC
Quote: |
+-----------------------------------------------------------------------------+
| |
| WebSphere MQ First Failure Symptom Report |
| ========================================= |
| |
| Date/Time :- Sun January 05 2014 03:37:29 Coordinated Universal Ti |
| UTC Time :- 1388893049.595000 |
| UTC Time Offset :- 0 ((UNKNOWN)) |
| Host Name :- WIN-JFFTF45GEQM |
| Operating System :- Windows Server 2008 R2 Server Datacenter Edition, |
| Build 7601: SP1 |
| PIDS :- 5724H7220 |
| LVLS :- 7.5.0.2 |
| Product Long Name :- WebSphere MQ for Windows |
| Vendor :- IBM |
| Installation Path :- C:\IBM\WebSphere MQ |
| Installation Name :- Installation1 (1) |
| Probe Id :- TM046000 |
| Application Name :- MQM |
| Component :- tmiOpenResourceMgr |
| SCCS Info :- F:\build\slot1\p750_P\src\lib\lqm\amqtmrma.c, |
| Line Number :- 464 |
| Build Date :- Jun 28 2013 |
| Build Level :- p750-002-130627 |
| Build Type :- IKAP - (Production) |
| UserID :- MUSR_MQADMIN |
| Process Name :- C:\IBM\WebSphere MQ\bin\amqzxma0.exe |
| Addressing mode :- 32-bit |
| Process :- 00002376 |
| Thread :- 00000001 |
| QueueManager :- BHQM |
| UserApp :- FALSE |
| ConnId(1) IPCC :- 2 |
| ConnId(2) QM :- 2 |
| ConnId(3) QM-P :- 2 |
| ConnId(4) App :- 2 |
| Last HQC :- 2.11.11-4808 |
| Last HSHMEMB :- 2.11.11-29436 |
| Major Errorcode :- trcE_UNEXPECTED_RM_ERROR |
| Minor Errorcode :- OK |
| Probe Type :- MSGAMQ7605 |
| Probe Severity :- 2 |
| Probe Description :- AMQ7605: The XA resource manager OracleXA has returned |
| an unexpected return code -5, when called for xa_open. |
| FDCSequenceNumber :- 0 |
| Arith1 :- 4294967291 fffffffb |
| Arith2 :- 257 101 |
| Comment1 :- OracleXA |
| Comment2 :- xa_open |
| Comment3 :- |
| |
+-----------------------------------------------------------------------------+
|
Trace trivia deleted from post. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jan 05, 2014 12:14 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Please learn to use [ c o d e ] tags around the code/trace/dumps etc that you post. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
exerk |
Posted: Sun Jan 05, 2014 3:55 am Post subject: |
|
|
 Jedi Council
Joined: 02 Nov 2006 Posts: 6339
|
smdavies99 wrote: |
Please learn to use [ c o d e ] tags around the code/trace/dumps etc that you post. |
And also to not include the stack trace etc., which is only of use to IBM Support. _________________ It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys. |
|
Back to top |
|
 |
lium |
Posted: Sun Jan 05, 2014 6:45 am Post subject: |
|
|
Disciple
Joined: 17 Jul 2002 Posts: 184
|
I realize this might be the issue of oracle multiple instances coexistence issue.
My oracle server is installed by someone else on the same box as oracle client.
I found I could not set ORACLE_HOME. If I set this to oracle client home directory, the oracle server can not start correctly. If I don't set it, the queue manager will have xa_open problem. In otherwords, the qmgr can not talk to the oracle server correctly.
I found the solution:
set ORACLE_HOME as user environment variable rather than system variable. In this case, both client and server are working fine.
However, I still got the same problem. I realized setup the XA_OPEN string to the listener of oracle server which might not be correct.
However, I am new to oracle. The oracle client might be messed. I have manually removed it, and will start a cleanup installation.
One more question, the queue manager should talk to the oracle client listener , right? It must be up running before queue manager can talk to oracle server through it or the queue manager will talk to oracle server directly with oracle client library but without oracle client listener?
Thanks, |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jan 05, 2014 7:11 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
This --> http://docs.oracle.com/cd/E13218_01/wlp/docs81/sp2/db/5XA.html
talks about TNSNAME so I would guess that yes the TNSServer needs to be up and runnig before WMQ can start. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
lium |
Posted: Sun Jan 05, 2014 9:45 am Post subject: |
|
|
Disciple
Joined: 17 Jul 2002 Posts: 184
|
Well, the oracle client can also create TNSListener, I personally think it acts as proxy, and therefore it is not mandatory.
The queue manager will talk to oracle server database listener, and for some reason, it always get xa_open problem.
I don't know what is going on, the AMQERR01.LOG does not help a lot, also the FDC and TRC file don't help much. They are too big, and are oriented for lab person.
I decide to give up since not much clue. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jan 05, 2014 10:25 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
lium wrote: |
Well, the oracle client can also create TNSListener, I personally think it acts as proxy, and therefore it is not mandatory.
|
These days, I think that the TNS Listener is pretty well mandatory.
Even SQLPlus demands a newtork connection. Mind you most of my Oracle DBA (certified) experience stopped with 7.3.4 and have only used it sporadically since then as a user. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|