04-03-06 01:04 AM
I've seen this before and if I remember correctly you must make sure that WC
is able to locate the ResourceBundle you've associated. If its a store spe
cific ResourceBundle ensure that you've built the correct path at the time t
he ECException is thrown.
Also when passing your exception parameters try just using an Object[] a
rray instead of the ECMessageHelper to generate the message params. I'm wil
ling to bet you'll be able to get the results you want by doing the followin
g.
//Build message at runtime, not as a stored message. This is just to test t
hat
//the message is being recognized.
ECMessage ecm = new ECMessage(ECMessageSeverity.ERROR,ECMessageType.USER,"MY
_MESSAGE_ID",myResourceBundlePath,classname));
//Now throw the ECApplicationException with runtime Object[]
throw new ECApplicationException(ecm,classname,mn,
new Object[]{myPa
ram1,myParam2,myParam3},false);
//If you want this message logged remove the last parameter
Try it this way and I'll bet your message shows up. I think what happens is
that the WC message handler either ignores custom bundles or it fails to fi
nd the custom bundle if its store or locale specific, which then causes it t
o attempt to locate the
SystemMessages. I'm not sure about that, but it seems that something along
those lines is taking place.
[ Post a follow-up to this message ]
|