Author |
Message
|
prince_mq |
Posted: Fri Nov 10, 2006 1:47 am Post subject: CHAD exit not getting loaded |
|
|
Voyager
Joined: 10 Aug 2006 Posts: 76
|
Hi,
I have configured a channel autodefiniton exit on cluster sender. When I am trying to start the cluster sender, i am getting the following error.
11/10/06 09:29:22
AMQ6188: The system could not dynamically load the shared library
'/var/mqm/exits//chadexit' due to a problem with the library. The error
message was 'The system call does not exist on this system. (MQStart)'. The
queue manager will continue without this library.
EXPLANATION:
This message applies to AIX systems. The shared library
'/var/mqm/exits//chadexit' failed to load correctly due to a problem with
the library.
ACTION:
Check that the library exists and is in the correct place with the correct file
permissions etc. and has not been corrupted. Check that the entry point
'MQStart' has been exported from the library.
----- amqxufnx.c : 703 --------------------------------------------------------
11/10/06 09:29:22
AMQ9535: User exit not valid.
EXPLANATION:
Channel program 'xxx' ended because user exit
'chadexit(MY_MQ_CHANNEL_AUTO_DEF_EXIT)' is not valid.
ACTION:
Ensure that the user exit is specified correctly in the channel definition, and
that the user exit program is correct and available.
----- amqrexta.c : 4424 -------------------------------------------------------
11/10/06 09:29:22
AMQ9999: Channel program ended abnormally.
EXPLANATION:
Channel program 'xxx' ended abnormally.
ACTION:
Look at previous error messages for channel program 'xxx' in the
error files to determine the cause of the failure.
Can any one please let me know the error in this case. |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Nov 10, 2006 2:14 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Hi
Please go to respective directory var/mqm/exits//chadexit and send us the ls -l chadexit and let us see the permission setting of it.
Let us know the details
Thanks and Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
Nigelg |
Posted: Fri Nov 10, 2006 4:09 am Post subject: |
|
|
Grand Master
Joined: 02 Aug 2004 Posts: 1046
|
Quote: |
'The system call does not exist on this system. (MQStart) |
Well, that looks quite clear.
Do you have a function MQStart in your source code? _________________ MQSeries.net helps those who help themselves.. |
|
Back to top |
|
 |
prince_mq |
Posted: Fri Nov 10, 2006 4:43 am Post subject: |
|
|
Voyager
Joined: 10 Aug 2006 Posts: 76
|
Thanks gaya and nigel for your replies.
i have permissions of 777 for chadexit file but still its not working.
nigelg,
i have MQStart in my file. my code looks like
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <cmqc.h>
#include <cmqxc.h>
/*for UNIX Systems*/
#ifdef _unix
void MQStart() {;} /* dummy entry point - for consistency only */
void MQENTRY MY_MQ_CHANNEL_AUTO_DEF_EXIT ( PMQCXP pChannelExitParms,PMQCD pChannelDef)
{
// do processing
}
#endif
/*for Windows Systems*/
#ifdef _WIN32
#include <windows.h>
BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved)
{
return TRUE;
}
extern "C" __declspec(dllexport) void MQStart() {;} /* dummy entry point - for consistency only */
extern "C" __declspec(dllexport) void MQENTRY MY_MQ_CHANNEL_AUTO_DEF_EXIT ( PMQCXP pChannelExitParms,PMQCD pChannelDef)
{
//do processing
}
#endif
The command i am using for compiling chad exit is:
cc -e MQStart -bE:chadexit.exp -bM:SRE -o /var/mqm/exits/chadexit chadexit.c -I/usr/mqm/inc -L/usr/mqm/lib -lmqmzf
I have two doubts:
my .exp file looks like
#!
MQStart
MQENTRY
is this correct?
i am getting the following warnings when i compiled my chad exit which i ignored
ld: 0711-327 WARNING: Entry point not found: MQStart
ld: 0711-319 WARNING: Exported symbol not defined: MQStart
ld: 0711-319 WARNING: Exported symbol not defined: MY_MQ_CHANNEL_AUTO_DEF_EXIT
ld: 0711-244 ERROR: No csects or exported symbols have been saved.
pls let me know if i can ignore these warnings.
thanks in advance, |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri Nov 10, 2006 4:52 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
prince_mq wrote: |
ld: 0711-327 WARNING: Entry point not found: MQStart
ld: 0711-319 WARNING: Exported symbol not defined: MQStart
ld: 0711-319 WARNING: Exported symbol not defined: MY_MQ_CHANNEL_AUTO_DEF_EXIT
ld: 0711-244 ERROR: No csects or exported symbols have been saved. |
prince_mq wrote: |
Check that the entry point 'MQStart' has been exported from the library. |
prince_mq wrote: |
pls let me know if i can ignore these warnings. |
http://www.mqseries.net/phpBB2/viewtopic.php?t=20523 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Gaya3 |
Posted: Fri Nov 10, 2006 5:17 am Post subject: |
|
|
 Jedi
Joined: 12 Sep 2006 Posts: 2493 Location: Boston, US
|
Hi
Don't ignore the Warnings that you are getting while compiling the exit programming.
Its not finding the entry point, MQ Start
So please try to make it correct and execute, it will work.
Thanks and Regards
Gayathri _________________ Regards
Gayathri
-----------------------------------------------
Do Something Before you Die |
|
Back to top |
|
 |
prince_mq |
Posted: Fri Nov 10, 2006 5:24 am Post subject: |
|
|
Voyager
Joined: 10 Aug 2006 Posts: 76
|
jeff, thanks so much for the link. The link is really useful for windows user.
actually my code is working on Windows and Solaris
Now, i am testing it on AIX and i am running into the above problems.
if any has some inputs regarding the above problem , kindly let me know.
Thanks, |
|
Back to top |
|
 |
prince_mq |
Posted: Wed Nov 15, 2006 11:54 pm Post subject: |
|
|
Voyager
Joined: 10 Aug 2006 Posts: 76
|
Hi,
I have modified the above code and i am getting a syntax error when i am compiling the following code. Its actually a C question. But i guess there will be some one on this forum who can help me sort this out. The error i am getting is at the starting of open brace which is highlighted in Blue below. please help me.
/* entry point for Unix System */
#ifdef _unix
void MQStart() {;} /* dummy entry point - for consistency only */
void MQENTRY MY_MQ_CHANNEL_AUTO_DEF_EXIT ( PMQCXP pChannelExitParms,PMQCD pChannelDef)
#endif
{ //SYNTAX ERROR AT THE START OF THIS LINE
/* do processing */
/* do processing */
}
Thanks |
|
Back to top |
|
 |
wschutz |
Posted: Thu Nov 16, 2006 3:30 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
What error are you getting? _________________ -wayne |
|
Back to top |
|
 |
prince_mq |
Posted: Thu Nov 16, 2006 3:33 am Post subject: |
|
|
Voyager
Joined: 10 Aug 2006 Posts: 76
|
wayne,
line 24.1: 1506-046 (S) Syntax error.
I am on AIX. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Nov 16, 2006 3:37 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
prince_mq wrote: |
wayne,
line 24.1: 1506-046 (S) Syntax error.
I am on AIX. |
I'm assuming that "_unix" IS defined ....
can you post the code from the top to that line ? _________________ -wayne |
|
Back to top |
|
 |
prince_mq |
Posted: Thu Nov 16, 2006 3:42 am Post subject: |
|
|
Voyager
Joined: 10 Aug 2006 Posts: 76
|
wayne, i haven't defined _unix. It worked for _WIN32, so i thought it should work for _unix. can you let me know where i should define this.
the complete code looks like:
#ifdef _WIN32
#include <windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <cmqc.h>
#include <cmqxc.h>
#ifdef _WIN32
BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved){return TRUE;}
extern "C" __declspec(dllexport) void MQStart() {;} /* dummy entry point - for consistency only */
extern "C" __declspec(dllexport) void MQENTRY MY_MQ_CHANNEL_AUTO_DEF_EXIT ( PMQCXP pChannelExitParms,PMQCD pChannelDef)
#endif
#ifdef _unix
void MQStart() {;} /* dummy entry point - for consistency only */
void MQENTRY MY_MQ_CHANNEL_AUTO_DEF_EXIT ( PMQCXP pChannelExitParms,PMQCD pChannelDef)
#endif
{
//do processing
//do processing
} |
|
Back to top |
|
 |
wschutz |
Posted: Thu Nov 16, 2006 3:48 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
as a hack, put
"#define _unix" at the top of your program .... _________________ -wayne |
|
Back to top |
|
 |
prince_mq |
Posted: Thu Nov 16, 2006 4:01 am Post subject: |
|
|
Voyager
Joined: 10 Aug 2006 Posts: 76
|
Thanks alot Wayne, it Worked!
This time i didnt get any compilation errors.
I hope this code works well for all unix platforms like AIX, SOLARIS, HP-UX.
For _WIN32, it didnt throw any errors but for _unix it threw an error. any idea as to why this is happening?
Thanks again! |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 16, 2006 4:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Or use
#if def _WIN32..
.... windows stuff here
#else // assume unix here
.... unix stuff here
#endif _________________ MQ & Broker admin |
|
Back to top |
|
 |
|