Preventing an OperationBinding from putting messages into the FacesContext

Hi,
We sometimes manually execute an OperationBinding by calling something like:
OperationBinding op = bindings.getOperationBinding("someOperation");
op.execute();Sometimes the facade method that gets called throws an exception. It's a useful exception containing a useful description of the problem. We can extract the necessary information from the exception and display it to the user via a FacesMessage.
Here's the problem: the OperationBinding.execute() method stuffs the FacesContext with gibberish messages that look similar to this:
JBO-29000: Unexpected exception caught: javax.ejb.EJBException, msg=java.lang.IllegalArgumentException: ........... .; nested exception is: java.lang.IllegalArgumentException: ............Such messages are completely unacceptable to appear in the GUI. We need to put a user-friendly message instead.
So, how can we prevent ADF from stuffing the FacesContext with gibberish messages? Or, if it's impossible to prevent these messages, could anyone, please, advise how we can remove them from the context?
Thanks in advance.

Actually, Wes' post indicates how to create a custom error handler - the error handler is responsible for looking at the exceptions generated and converting them to Faces messages.
OperationBinding's execute() method, when exceptions occur in the underlying method, wrap the exception inside things like JBO-29000 (as you've seen). You could very well take Wes' approach, create a custom error handler, and when you get a JBO-29000, walk the exception details yourself and only add Faces Messages as meet your requirements (i.e., don't add a message for the JBO-29000).
Ideally, I'd like a way to do something like this (hint hint hint to Oracle), which cannot be done today:
OperationBinding op = something;
try
  op.executeButPleaseDontEatTheExceptionsAndJustThrowThem();
catch (MyCustomException mce)
}As to Jags' post - the messages still display.
John

Similar Messages

  • How do I keep itunes from putting things into the cloud after I've downloaded them?

    Hello - Not everyone lives in Silicon Valley or New York City.  I have a relatively slow internet connection so it takes about 2 hours to download a 45-minute tv episode.  Yesterday I did that, and today I went to watch it and it had been put back in the cloud!  "No problem," says Apple, "You can download it again."  It takes f**** 2 hours to download it again.  How can I keep Itunes from putting things I've already downloaded back into the cloud?

    How do I keep itunes from putting things into the cloud after I've downloaded them?
    You don't. They are in the cloud as soon as you make a purchase. As in immediately/right now. They don't get uploaded from yoru computer to the cloud.
    Did you delete it after you watched it?

  • What prevents a package from pre-loading into the AppV cache (using SCCM)

    This could be an App-V issue or an SCCM issue, not entirely sure...
    When SCCM deploys AppV apps to clients we always set to download and run locally.  With this set SCCM will always cache the entire package in the AppV cache immediately so it can be used offline.
    I've got a package where this just isn't working.  It is set to download and run locally but after it is deployed the PercentLoaded value shows 0.  If a user then runs it you are looking at a delay whilst it then unpacks from the SCCM cache to
    the AppV cache.  This package includes a script which executes when published so could this be the culprit?

    Mmm the mount seems to be failing...
    AppVManageClient5X::MountAppVPackage() failed for package [530ecc6a-26db-487f-9ab8-5bd3c427a9d1]. (0x87d0128f)
    Looking in the App-V Event viewer we have events like:
    Microsoft AppV Streaming Manager LoadAll failed with status The system cannot find the file specified., Package Version {b83b67b9-56a8-4862-aaa0-16d27c2036ab}
    and
    Could not read the streaming information from file \ProgramData\App-V\0CD3D585-5851-4242-B9E5-A8F49ABC04B5\b83b67b9-56a8-4862-aaa0-16d27c2036ab\Root\commons-logging-1.0.4.jar. Failure status 0xc0000275. - VERBOSE MESSAGE NOT AN ERROR
    0xc0000275 means nothing to me so a quick Google shows The file or directory does not have a reparse
    point.
    Perhaps an issue with the package then?  It is still residing inside the SCCM cache and if a user runs the software it starts mounting more of it...

  • How do I prevent Adobe Reader from translating barcodes into the numbers?

    see title

    I'm assuming the document uses a barcode font to display a barcode, and when the document is opened in Reader that the bar code is not displaying. If this is the case, check to see if the bar code font is embedded. If it's not, it will have to be for it to work as you want.

  • HT2729 How can I put songs into the album they came from but were split because of multiple artists on a tune?

    I need help in finding out home to combine songs from the same CD into one Album. When putting CD into the iMac, it auto loads into iTunes. If the artist is singing duet and the songs show more than one artist, it gets separated in iTunes. I want to combine all tracks together like they are on the CD.

    One way around this is to edit the album info for each song on that album and make the album artist 'various artists', or you can remove that duet artist and make all the artists the same.
    Seems to be a glitch or change with how iTunes sees albums now. THey alphabetize them by artist and, as you've noticed, if the artists are different, it sees them as different albums.
    I had many albums like this and spent a whole weekend editing the info to 'various' to clean it up.

  • Is there a way to put music from an ipod into the music library?

    I want to put music from an ipod into the music library. Is there a way of doing it because i dont know how?

    The music sync is one way - computer to ipod.  The exception is itunes purchases.  File>Transfer Purchases
    Everything on your ipod should also be on your computer and included in your regular backup of your computer.

  • HT3529 Is there any way to sync iMessages from an iPhone into the Messages on a Mac Book Pro?

    Basically, for me to upgrade to an iPhone 5s, I'll have to trade in my iPhone 4s. The thing is, I'm pretty sentimental when it comes to certain text messages and I would really like to be able to save them all somewhere, somehow. Everything else is backed up to my laptop, so I'm not concerned about anything else on the phone; it's just not wanting to part with the text messages... It would be nice if there is a way to sync the rest of one's messages into the Messages app on the MacBook Pro. Is that possible?

    If the photos were on the iphone when the last sync was performed, then you should be able to restore from backup.

  • I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    I filmed several takes of the same scene for a movie. I trimmed the best clips from each take and put them into the project screen. However, I can't figure out how to make it flow seamlessly as one scene. Can someone please help me??

    1-800-676-2775  apple support   tech support 1 800 275 2273
    If your computer is on one minute before it freezes, than you have one minute to secure your serial number.
    click the apple----->click about this Mac ------> click on version----> until you see the serial number.  You may have to do this a couple of times if it freezes before you have all the numbers.  A camera might help.
    Good Luck

  • I put the sdcard from my camera into the large disc slot and it is stuck!!

    I put the sd card from my camera into the large disc slot and it is stuck. I've tried shaking it out.

    The safest option is to take it into an apple retail store or an authorized service provider. It is a bad idea to stick things in the disk drive to try to get the SD card out and risk any more possible damage.

  • How to put songs into the 5300 player from compute...

    When i sync or just drop it into the phone it only shows up to the memory card and it won't be on the player on the 5300. How can I put it into the 5300 player? Thanks in advance.

    Drop music files to phone connected as USB-drive;
    On the phone: Menu> Media > Music Player and then in player left soft key> Music Library > Update Library;
    Instead of it all you may simply restart the phone
    Nokia 5300 dark gray / V5.51

  • Putting message into send queue failed

    Putting message into send queue failed, due to: com.sap.engine.interfaces.messaging.api.exception.DuplicateMessageException: Message Id 8fd8ebf2-14dc-498c-26d4-fa83a612df8f(OUTBOUND) already exists in duplicate check table: com.sap.sql.DuplicateKeyException: Violation of PRIMARY KEY constraint 'PK__BC_MSG_DUP_CHECK__0CB1C3F7'. Cannot insert duplicate key in object 'SAPPIQDB.BC_MSG_DUP_CHECK'..
    I get the above error for one of my interface.
    The scenario is simple lift and shift using integrated scenario.
    I am unable to figure out reason for the above error.
    Regards,
    Lalit Mohan Gupta.

    Hi Lalit Mohan Gupta,
    It seems like you have a problem with duplicate Message IDs (GUID). This can happen if you do not let SAP PI generate the message ID for the message being processed, but is relying on an external system to provide you with the message ID.
    In any case. I don't think you will succeed with getting the message processed, because of the duplicate message ID constraint in SAP PI. But you need to be aware that depending on how your SAP PI has been setup to handle archiving/deletion of messages in Java-stack, you could potentially run into the situation, where SAP PI removes the initial message from its database and by that enables processing of the duplicate message ID.
    Best regards,
    Jacob

  • When I download firefox, using recommended setting, or my own, all the sub files/folders like plugins, modules, updater end up on the desktop as well as in the file location. And when I try to put them into the file location, they don't. And when I delete

    When I download firefox, using recommended setting, or my own, all the sub files/folders like plugins, modules, updater end up on the desktop as well as in the file location. And when I try to put them into the file location, they don't. And when I delete them, FireFox won't open. I tried deleting FireFox and reinstalling it multiple times, and a message pops up sometimes that says FireFox may not have installed correctly, so I follow the steps, but all the extra icons on my desktop don't go away. This has happened every time I have downloaded FireFox. The browser itself works, but I need to know how to get rid of these icons, but still be able to use FireFox. This is on a new computer, with Windows 7.
    == I downloaded FireFox. ==
    == User Agent ==
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6

    Managed to solve this myself. Just went to properties > hidden.

  • TS3899 How do you fix a gmail account on an iPhone 4G that stops downloading messages into the InBox?

    How do you fix a gmail account on an iPhone 4G that stops downloading messages into the InBox?  My gmail gave me a notice that said imap.gmail.com is not responding.  Can send emails out but cannot download new messages into Inbox.

    Hi! So I finally found a disk cleaning kit and tried it out. No luck : (
    The exact thing that occurs is:
    Put disk in. It does not show up. Cannot get it out.
    Turn computer on and off.
    Message comes up saying it cannot read the disk and if I would like to erase the disk or eject it.
    Then I eject it.
    That's the whole of the cycle.
    So do you think that just means it;s busted and no other way I can solve it but go with the external drive at this point?
    I appreciate the help.

  • Bulk load messages into the language repository?

    Hi,
    Our existing, pre-APEX, applications make use of a common table of 'messages' to provide multiple language support e.g. we have a lookup against message number and language to produce the required message.
    This seems very similar to the functionality supplied through the apex_lang message repository. Is there an easy way in which we can load a modified version of our current messages into the repository without having to enter them in manually?
    Thanks,
    Andy

    Arie Geller wrote:
    Hello Andy,
    >> I'm slightly(!) confused. Are you advocating using the wwv_flow_api.create_message API or manual entry? The link that you posted refers to the API as a method of message entry, I don't see a reference to exporting messages from an existing application?
    Let’s go back to the beginning. As I understood, you first asked whether you can use some existing translation tables, to automatically populate the APEX translation repository. My answer was ‘no’ and I don’t think Flavio suggestions contradict it.Understood, in 'my' head the ability to create a script that would pick up my existing messages and use the 'create_message' API to load them into APEX was close enough to automatic for me! My intention is that our first move from legacy to APEX messaging would be to do this to create the base messages, and that we would consider translation later... (In some cases, I could use our existing multi-language messages to produce both the primary language and the translated messages).
    Is my position more clear now? I hope so :)Thanks, much clearer, however the final step - once we have a set of base/primary and translated messages, how do we make use of them in a later application?

  • Encode a message into the picture

    Hi,
    regarding the subject above, i know how to encode a static message (which mean predefined the message) into a picture..
    But when it come to the dynamic message (user can enter message), i really no idea on how to encode it in the picture..
    example for how i encode it for static msg :
    predefined msg = "ON"
    O = 79 = 01 00 11 11 c1, c2, c3, c4
    N = 78 = 01 00 11 10 d1, d2, d3, d4
    //0xFC = 1111 1100 <-- used this to remove the last 2 bits
    int c1=1, c2=0, c3=3, c4=3;               //O
    int d1=1, d2=0, d3=3, d4=2;               //N
    int alpha, red, green, blue;
    //unpack the individual pixel n process
    alpha     = (pixels[1]>>24) & 0xFF;
    red     = ((pixels[1]>>16) & 0xFC) + c1;          
    green     = ((pixels[1]>>8) & 0xFC) + c2;
    blue     = (pixels[1] & 0xFC)     + c3;
    //repack the pixels
    pixels[1] = (alpha<<24) | (red<<16) | (green<<8) | blue;
    //unpack the individual pixel n process
    alpha     = (pixels[2]>>24) & 0xFF;
    red     = ((pixels[2]>>16) & 0xFC) + c4;          
    green     = ((pixels[2]>>8) & 0xFC) + d1;
    blue     = (pixels[2] & 0xFC)     + d2;
    //repack the pixels
    pixels[2] = (alpha<<24) | (red<<16) | (green<<8) | blue;
    //unpack the individual pixel n process
    alpha     = (pixels[3]>>24) & 0xFF;
    red     = ((pixels[3]>>16) & 0xFC) + d3;      
    green     = ((pixels[3]>>8) & 0xFC) + d4;
    blue     = (pixels[3] & 0xFC); // no use.... finish used all the bits
    //repack the pixels
    pixels[3] = (alpha<<24) | (red<<16) | (green<<8) | blue;
    But when came to dynamic msg.. i really no idea on how to continue..
    when i get everything ready.. (the msg length, each char value) in the for loop..
    for(int j=0; j<length; j++){
    msg[j] = message.charAt(j);
    value[j] = (int) msg[j];
    //this is to get the binary no.
    c1= (value[j]>>6) & 0x03;
    c2= (value[j]>>4) & 0x03;
    c3= (value[j]>>2) & 0x03;
    c4= value[j] & 0x03;
    Encode(); //call a method to encode the msg into the picture
    wanted to encode it in the picture..
    but the requirement is encode only in the RGB and not alpha..
    so when i get the value (O = 01 00 11 11)
    c1 = 1 c2 =0 c3=3 c4=3
    alpha     = (pixels[1]>>24) & 0xFF;
    red     = ((pixels[1]>>16) & 0xFC) + c1;          
    green     = ((pixels[1]>>8) & 0xFC) + c2;
    blue     = (pixels[1] & 0xFC)     + c3;
    pixels[1] = (alpha<<24) | (red<<16) | (green<<8) | blue;
    but the c4 is not encoded yet... so how ?? what should i do in this method ? because after processing this, it should go back to the for loop to continue the next char.
    c1,c2,c3,c4 will be initialized with the new value again...
    As you can see in the static example, c4 is used in the pixels[2]... then continue with the next char's 1st 4 bit (d1,d2)..
    d3 & d4 is used in the pixels[3]...
    err.. hope you can understand my question and give me some ideas on "encoding a message into the picture"
    thanks and appreciate every single idea & help ;)

    Take a look in the indesign-server-plugin-techniques.pdf in the section on MessageLog for more info.
    Something interesting is that code that calls CAlert methods get converted into MessageLogs.
    Your use of the word "console" makes me think that you are coding for Mac. If that's the case you could create some Mac code and use NSLog to dump to console.
    Create a MyLog.mm file with something like:
    #import <Foundation/Foundation.h>
    void MyLogMessage(char *msg)
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
    NSLog(@"%s", msg);
    [pool release];
    Remember to add the Foundation framework to your project, and change the compile option from compile all files as C++ to compile according type.

Maybe you are looking for