Author |
Message
|
Sridar |
Posted: Fri Jul 28, 2006 12:41 am Post subject: User Exception Catalog |
|
|
Acolyte
Joined: 14 May 2006 Posts: 72 Location: Chennai, India
|
Hi
I have a problem in creating my own Exception Catalog.
The problem is at the beginning stage.
When i try to compile the .mc file i am getting Errors.
Below is the content of my .mc file (ExceptionCatalog.mc)
************************begin************
MessageIdTypedef=DWORD
SeverityNames=(Success=0x0:STATUS_SEVERITY_SUCCESS
Informational=0x1:STATUS_SEVERITY_INFORMATIONAL
Warning=0x2:STATUS_SEVERITY_WARNING
Error=0x3:STATUS_SEVERITY_ERROR
)
FacilityNames=(System=0x0:FACILITY_SYSTEM
Runtime=0x2:FACILITY_RUNTIME
Stubs=0x3:FACILITY_STUBS
Io=0x4:FACILITY_IO_ERROR_CODE
)
LanguageNames=(English=0x409:MSG00409)
; // The following are message definitions.
MessageId=3001
Severity=Error
Facility=Runtime
SymbolicName=MSG_INVALID_BUSFUN
Language=English
Exception INVALID BUSINESS FUNCTION.
.
*********************end*****************
I am giving the command:
H:\>mc -v -w -s -h h:\ -r h:\ ExceptionCatalog.mc
and i ma getting the error:
MC: Compiling ExceptionCatalog.mc
ExceptionCatalog.mc(27) : error : invalid character (0x2e)
Writing h:\\MSG00409.bin
[c0020bb9 .. c0020bb9] - 84 bytes
Total of 1 messages, 100 bytes
If i remove the lines after the "Language=English" then it is compiling.
But is this correct?
What do i have to do for compiling the file.
I have checked the earlier posts regarding Exception Catalog and all of them have been able to compile.
Can anyone help. _________________ Thanks and Regards
Sridar |
|
Back to top |
|
 |
wbibrk |
Posted: Tue Aug 01, 2006 6:32 pm Post subject: |
|
|
Apprentice
Joined: 09 Jul 2005 Posts: 46
|
Hi Sridar,
Remove the last line containg a dot.
Also, are you trying to use the message catalog in a C/C++ node or Java node? If it is a java node, then you do not need the message compiler and dll instead you need to use the standard java resource bundle mechanism |
|
Back to top |
|
 |
Sridar |
Posted: Tue Aug 01, 2006 9:47 pm Post subject: |
|
|
Acolyte
Joined: 14 May 2006 Posts: 72 Location: Chennai, India
|
Thanks,
I am not using Java nodes.
I have now compiled adn created the dll also.
I have put the dll in c:\Program ....\Websphere ...\messages and also the Properties File containing the Exception Code and the Exception Message.
in the same path.
I have created a registry key also for this.
When i am using the same in the Throw statement i am not getting the Exception message
THROW USER EXCEPTION SEVERITY 3 CATALOG 'IMNXCPN' MESSAGE 3012;
where IMNXCPN is the catalog name(same as property file name,dll name,registry key name).
The exception list just lists catalog name and severity name.
the exception message field is blank. _________________ Thanks and Regards
Sridar |
|
Back to top |
|
 |
wbibrk |
Posted: Wed Aug 02, 2006 1:25 pm Post subject: |
|
|
Apprentice
Joined: 09 Jul 2005 Posts: 46
|
Hi Sridar,
Here's the statement from the help item for THROW statement
MESSAGE is an optional clause; if you omit it, it defaults to the first message number of the block of messages provided for using THROW statements in WebSphere Message Broker catalog (2951). If you enter a message number in the THROW statement, you can use message numbers 2951 to 2999. Alternatively, you can generate your own catalog by following the instructions in Using event logging from a user-defined extension.
Try using a message within the range of 2951 to 2999. Eventhough it does not explicitly state that you can use any message number for an message in user-defined catalog 3012 is already defined in the Message Broker catalog |
|
Back to top |
|
 |
Sridar |
Posted: Wed Aug 02, 2006 10:56 pm Post subject: |
|
|
Acolyte
Joined: 14 May 2006 Posts: 72 Location: Chennai, India
|
Thanks again,
But i want to use my own exception catalog and i have my own number sequence for the exceptions.
Also when i have specified the catalog name should'nt the broker look for the exception no. 3012 in "IMNXCPN" rather than in its own catalog.
If its still looking in its own catalog should it not post the WBI 's message for exception code 3012(if it exists). _________________ Thanks and Regards
Sridar |
|
Back to top |
|
 |
Sridar |
Posted: Mon Aug 07, 2006 3:51 am Post subject: |
|
|
Acolyte
Joined: 14 May 2006 Posts: 72 Location: Chennai, India
|
All
Any thoughts on this _________________ Thanks and Regards
Sridar |
|
Back to top |
|
 |
|