Global exception handling (Web Applications)

Hi,
I want to capture all run time exceptions and store them into a log file.
I have used uncaught error event handler for catching all such run time exceptions.
Application has various components and I have manualy introduced few run time exceptions at various places
I was able to capture these uncaught exceptions only at very few places and even this was not consistent.
Any help will be greatly appreciated.
Thanks,
Abhishek.

If you have multiple SWFs, you may need information in this post: http://blogs.adobe.com/aharui/2011/04/catching-uncaughterror-in-flex-modules.html

Similar Messages

  • Global Exception Handler

    Hello,
    I've implemented the Global Exception Handler how is saying at http://www.adobe.com/devnet/flex/articles/global-exception-handling.html
    Some errors are being catched by it, and others not.
    I looked at another thread here, but for him, the Debug Dialog was not appearing because another place was catching the exception for him.
    There are some way to catch all errors in just on place?
    I need this, because sometimes in production happen errors that we didn't find in development, but stills there.
    The SDK is 4.1 and minimum Flash Player for the applications is 10.1.
    Regards,
    Fredy.

    How to reproduce the error not being catched.
    Main Application:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:s="library://ns.adobe.com/flex/spark"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     minWidth="955"
                                     minHeight="600"
                                     xmlns:views="views.*"
                      applicationComplete="onApplicationComplete()">
              <s:layout>
                        <s:VerticalLayout />
              </s:layout>
              <fx:Script>
                        <![CDATA[
                                  import com.adobe.ac.logging.GlobalExceptionHandler;
                                  import com.adobe.ac.logging.LogHandlerAction;
                                  private var globalExceptionHandler:GlobalExceptionHandler;
                                  private function onApplicationComplete():void {
                                            globalExceptionHandler = new GlobalExceptionHandler();
                                            globalExceptionHandler.preventDefault = true;
                                            var lha:LogHandlerAction = new LogHandlerAction();
                                            globalExceptionHandler.handlerActions = [];
                                            globalExceptionHandler.handlerActions.push(lha);
                        ]]>
              </fx:Script>
              <mx:ViewStack id="vs" creationPolicy="none">
                        <views:FirstView  />
                        <views:SecondView />
              </mx:ViewStack>
              <s:Button label="Call Second View" click="vs.createDeferredContent()"/>
    </s:Application>
    First View:
    <?xml version="1.0" encoding="utf-8"?>
    <s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:s="library://ns.adobe.com/flex/spark"
                         xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"
                         creationComplete="onCreationComplete()">
              <fx:Script>
                        <![CDATA[
                                  import mx.rpc.remoting.RemoteObject;
                                  private function onCreationComplete():void {
                                            trace("First Created!");
                        ]]>
              </fx:Script>
    </s:NavigatorContent>
    Second View:
    <?xml version="1.0" encoding="utf-8"?>
    <s:NavigatorContent xmlns:fx="http://ns.adobe.com/mxml/2009"
                                                      xmlns:s="library://ns.adobe.com/flex/spark"
                                                      xmlns:mx="library://ns.adobe.com/flex/mx" width="400" height="300"
                                                      creationComplete="onCreationComplete()">
              <fx:Script>
                        <![CDATA[
                                  import mx.rpc.remoting.RemoteObject;
                                  private function onCreationComplete():void {
                                            trace("Second View created!");
                                            var ro:RemoteObject;
                                            ro.destination = "";
                        ]]>
              </fx:Script>
    </s:NavigatorContent>
    Regards,
    Fredy.

  • Global Exception Handling

    How to set up global exception handling to provide user friendly messages to user?
    AFAIK there is no real global exception handing available for now in ADF. So I need some "tutorials" about exception handling in:
    - Model
    - Controller
    - View
    Thx
    Regards
    Zmeda

    refer this
    http://blogs.oracle.com/groundside/entry/adventures_in_adf_logging_part
    controller
    http://blogs.oracle.com/jdevotnharvest/entry/extending_the_adf_controller_exception_handler
    http://andrejusb.blogspot.com/2011/03/exception-handler-for-method-calls_19.html
    http://my.safaribooksonline.com/book/databases/oracle/9780071622547/introduction-to-oracle-adf-task-flows/ch04lev1sec7
    http://my.safaribooksonline.com/book/databases/oracle/9780071622547/working-with-unbounded-and-bounded-oracle-adf-task-flows/169

  • Calling EJBs from Global Exception Handler

    Hi, I'm using Weblogic Workshop 8.1.4.
    I have a JPF which calls a EJB to set a lock flag (to prevent the JPF being executed twice at the same time.)
    I want to reset the lock flag in the global exception handler, however, if I call an EJB (Entity or Session) in a perform node in the exception handler, I get a NullPointerException.
    Is this because it's being called in the exception handler? Is there any way to work around this (without building a POJO which does all the persistance logic and SQL calling manually?)
    Thanks.

    You can redirect stdout to wherever you want by using
    System.setOut(PrintStream out). Also, you can give
    printStackTrace a PrintStream.
    hth,
    mI think to solve this problem you should call System.setErr(PrintStream err);

  • Global exception handler not being called

    Hi,
    I have a wli process that has a global excepton handler. One of the controls throws a NullPointerException but it is not being handled by the group exception handler nor the global exception handler.
    Does anyone have any idea what may be causing this behaviour?
    Thanks,
    Dale

    I have discovered that using -memalign=Ns with N greater than 1 does not work for me. For example, if I remove a VME card from the system and try to use an unsigned short pointer to access a 16-bit register in the card's vacated VME address space, my signal handler gets called when I compile the code with N=1, but for any other N, my handler is ignored and my program cores.
    Unfortunately, using N=1 causes other code that works with higher N to fail. I have one VME card where I need to access a register as a 16-bit read. The code the compiler generates to access the unsigned short pointer value results in two single-byte load instructions - this causes the device to cry foul and as a result, the driver raises SIGBUS, which my program handles. For higher N, the compiler generates one two-byte load instruction, and the device is happy to send back the data.
    So it would appear there is some kind of problem with -xmemalign=Ns for N > 1. It seems like the SIGBUS handler typically imployed by the compiler to handle the misalignment problems when -xmemalign=Ni is used is being invoked.
    Any other ideas?

  • Getting class cast exception in Web application.

    I have a web application deployed using standard specs for deployment. I
              have and web-inf directory with a web.xml file set up. All the servlet
              classes are in the classes sub-directory of web-inf.
              If I deploy this application using the Tomcat application server,
              everything works as expected. When I deploy this application using the
              Weblogic software, I can get to the initial page, put once I select a
              link that calls the main servlet, I get a classcast exception. Both the
              Tomcat and Weblogic software point to the same directory for the
              application.
              I double checked and made sure that no other instances of my servlet
              classes exist anywhere else in the class path.
              Any one have any thoughts or suggestions. I am perplexed that this web
              app runs fine under the Tomcat software and yet...
              Thanks.
              Paul Garduno
              

    Thanks for your reply. I am not using any EJBs. From what I have
              gathered since writing my message, this may be the "dreaded" class cast
              exception (although I don't know why since it runs under Tomcat).
              Basically, the initial page is displayed. When you select the SEARCH
              button (for example), the request goes to a servlet which puts a vector
              of custom classes into a session parameter. The request is then
              forwarded to the JSP page which uses the information in the classes to
              help build some information on the page. The first line in the JSP is
              processed (a simple output line to the system console) and then the
              classcast exception occurs.
              According to the info that I have seen, this shouldn't happen since I am
              not changing either the servlet or JSP files which would mean that
              nothing should be re-compiled.
              I have a call into tech support. I will post their answer and copy you
              on the message.
              Thanks.
              Paul
              Cameron Purdy wrote:
              >
              > Are you using EJBs hosted on the same instance of WebLogic? If so, delete
              > the home/remote interfaces from your web deployment. Otherwise, post the
              > exception listing ....
              >
              > Cameron Purdy, LiveWater
              >
              > "Paul Garduno" <[email protected]> wrote in message
              > news:[email protected]...
              > > I have a web application deployed using standard specs for deployment. I
              > > have and web-inf directory with a web.xml file set up. All the servlet
              > > classes are in the classes sub-directory of web-inf.
              > >
              > > If I deploy this application using the Tomcat application server,
              > > everything works as expected. When I deploy this application using the
              > > Weblogic software, I can get to the initial page, put once I select a
              > > link that calls the main servlet, I get a classcast exception. Both the
              > > Tomcat and Weblogic software point to the same directory for the
              > > application.
              > >
              > > I double checked and made sure that no other instances of my servlet
              > > classes exist anywhere else in the class path.
              > >
              > > Any one have any thoughts or suggestions. I am perplexed that this web
              > > app runs fine under the Tomcat software and yet...
              > >
              > > Thanks.
              > >
              > > Paul Garduno
              

  • Global Exception in Struts

    Hi All,
    When ever there is an error I need to handle the exceptions gracefully. Since I'm using struts frame work I'm using global-exceptions declarative.
    Here is the struts-config.xml where I have included <global-exceptions>
    <global-exceptions>
    <exception handler="com.hp.chrs.action.ActionExceptionHandler"
    type="java.lang.Exception"
    key="global.error.message"
    path="/jsp/chrs_error.jsp" />
    </global-exceptions>
    I have written ActionExceptionHandler.java class which is the subclass of ExceptionHandler. In execute function of this I'm logging the error then forwarding it to chrs_error.jsp.
    public ActionForward execute(Exception ex, ExceptionConfig ae,
    ActionMapping mapping,
    ActionForm formInstance,
    HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException {
    System.out.println("Inside execute of ActionExceptionHandler");
    logError(ex);
    //forward to the jsp
    ActionForward forward =
    super.execute(ex, ae, mapping, formInstance, request, response);
    When ever an error occurs chrs_error.jsp is displayed. But it is not going to ActionExceptionHandler.java class.
    What my unerstanding is whenever error occurs it should go to ActionExceptionHandler and then display chrs_error.jsp.
    Any inputs are welcome
    Thanks in Advance

    No there isn't a global exception handler in JSF. At least none that I've ever heard of or run across. This is something I think JSF dropped the ball on. Maybe in a future release?
    I'm afraid you'll have to get creative with error processing. It's tricky with JSF.
    The way I did it in my application was to create error pages (as you mentioned). I configured the web.xml to redirect to these error pages if there was an uncaught exception. There are some serious limitations when you forward to a JSF page like this though. First, you need to make your error page have f:subview tags instead of f:view. Then, I couldn't get commandLink or commandButton to work right. The action method never got executed!
    You may have already seen some discussions about this. If not, dig around in the forums and you'll find a few good tips.
    CowKing

  • Step repeated in Exception branch requires exception handler, why?

    I have a BPM Integration process with a sync send step calling a RFC. Any system errors and application errors are handled by an exception branch where I send an alert as then re-do the send step (so that it will fail but allow me to restart from that point after fixing the issue). The problem I am having is that in this send step, since it is mandatory to have an exception handler for application errors (defined fault message RFC.Exception), what do I enter for exception handler in this send step which is itself in an exception branch? I do not want to handle the exception this second time since I want this step to fail and process stops here to be able to restart manually later.

    Hi,
    I am not sure, how you will restart the step manually? Because once there is an error in the sync send, the message will turn to "Cancelled" status. You cannot restart this message.
    Now, for the second send step in the exception block you will not be able to choose the same exception block in the exception handler field. But for some reason if this send also fails then you cannot restart the process manually - same reason i mentioned above. It will fail as you intended it to do so.
    Regards,
    Balaji.M

  • WAD - Save web application

    how can I save exceptions in web application. tell me the procedure since i have find no options there...

    This is based on WAD,
    The Process that I did in WAD,
    1, Use the Webtemplate -- List of Exceptions ( added a Bex query which have an exception )
    2, Execute , I found the option to create a new exeption, after created  this, it become invisible while refreshing the URL,
    Let me know whether am I doing right or not ?, Pl guide me to save an exception in WAD
    thanks,
    JD
    Edited by: jaya durai on Apr 27, 2010 11:46 AM

  • Implementing Exception Handling Application Block in custom web parts, event receivers

    hi,
      I am currently implementing try {} catch(Exception expp) { throw expp;} to handle exceptions in my intranet appln.
    I have several custom web parts, event receivers, few console applciations as timer jobs etc. If i want to implement a  robust exception handling what should be  the approach. by searching, i saw, ms patterns n practices provides the
    appln blocks.
    But I think[ pls correct me if i am wrong ] those  appln blocks are meant for asp.net applns ONLY.
    if not, anyone has implemented those appln blocks in SP development? if yes, can anyone provide one sample /  link to implement Exception Handling in SP.
    help is appreciated! 

    Hi,
    Here are some articles for your reference:
    Handling Error Centrally in a SharePoint Application
    http://www.codeproject.com/Articles/26236/Handling-Error-Centrally-in-a-SharePoint-Applicati
    Using Microsoft Enterprise Library Application Block in SharePoint
    http://www.codeproject.com/Articles/21389/Using-Microsoft-Enterprise-Library-Application-Blo
    Exception Handling in SharePoint
    http://spmatt.wordpress.com/2012/02/01/exception-handling-in-sharepoint/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Good exception handling policy for Java web application

    I'm looking for a good exception handling policy for Java web application. First I found this Java exception handling best practices - How To Do In Java which says that you should never catch the Trowable class nor use e.printStackTrace();
    Then I found this Oracle page The Message-Driven Bean Class - The Java EE 6 Tutorial, which does just that. So now I'm confused. Is there a good page online for an exception handling policy for Java EE Web applications? I have a hard time finding one. I've read that you should not catch the Exception class. I've been catching it previously to make sure that some unknown exception doesn't slip through early in the loop and stops all other customers from executing later on in the loop. We have a loop which runs once a minute implemented using the Quartz framework. Is it OK if you just change the implementation to catch the RuntimeException class instead of the Exception class? We're using Java 7 and the Jetty Servlet Container.

    I'm looking for a good exception handling policy for Java web application.
    If you have not done so I suggest you start by reviewing the several trails in The Java Tutorials.
    Those trails cover both HOW to use exceptions and WHEN to use them.
    This trail discusses  the 'controversy' you mention regarding 'Unchecked Exceptions'
    http://docs.oracle.com/javase/tutorial/essential/exceptions/runtime.html
    Unchecked Exceptions — The Controversy
    Because the Java programming language does not require methods to catch or to specify unchecked exceptions (RuntimeException, Error, and their subclasses), programmers may be tempted to write code that throws only unchecked exceptions or to make all their exception subclasses inherit from RuntimeException. Both of these shortcuts allow programmers to write code without bothering with compiler errors and without bothering to specify or to catch any exceptions. Although this may seem convenient to the programmer, it sidesteps the intent of the catch or specify requirement and can cause problems for others using your classes.
    Why did the designers decide to force a method to specify all uncaught checked exceptions that can be thrown within its scope? Any Exception that can be thrown by a method is part of the method's public programming interface. Those who call a method must know about the exceptions that a method can throw so that they can decide what to do about them. These exceptions are as much a part of that method's programming interface as its parameters and return value.
    The next question might be: "If it's so good to document a method's API, including the exceptions it can throw, why not specify runtime exceptions too?" Runtime exceptions represent problems that are the result of a programming problem, and as such, the API client code cannot reasonably be expected to recover from them or to handle them in any way. Such problems include arithmetic exceptions, such as dividing by zero; pointer exceptions, such as trying to access an object through a null reference; and indexing exceptions, such as attempting to access an array element through an index that is too large or too small.
    Generally don't catch an exception unless you plan to HANDLE the exception. Logging, by itself is NOT handliing.
    First I found this Java exception handling best practices - How To Do In Java which says that you should never catch the Trowable class nor use e.printStackTrace(); 
    That article, like many, has some good advice and some poor or even bad advice. You get what you pay for!
    I've read that you should not catch the Exception class.
    Ok - but all that does is indicate that a problem of some sort happened somewhere. Not very useful info. Java goes to a lot of trouble to provide specific exceptions for specific problems.
    I've been catching it previously to make sure that some unknown exception doesn't slip through early in the loop and stops all other customers from executing later on in the loop.
    If the exception is 'unknown' then maybe it NEEDS to 'stop all other customers from executing later on in the loop'.
    That is EXACTLY why you don't want to do that. You need to identify which exceptions should NOT stop processing and which ones should.
    Some 'unknown' exceptions can NOT be recovered and indicate a serious problem, perhaps with the JVM itself. You can NOT just blindly keep executing and ignore them without risking data corruption and/or the integrity of the entire system Java is running on.
    Is it OK if you just change the implementation to catch the RuntimeException class instead of the Exception class? We're using Java 7 and the Jetty Servlet Container.
    No - not if you want a well-behaved system.
    Don't catch exceptions unless you HANDLE/resolve them. There are times when it makes sense to log the exception (which does NOT handle it) and then raise it again so that it gets handled properly later. Yes - I know that is contrary to the advice given in that article but, IMHO, that article is wrong about that point.
    If you have ever had to maintain/fix/support someone else's Java code you should already understand how difficult it can be to find WHERE a problem occurs and WHAT the exact problem is when exceptions are not handled properly.

  • Exception handling in synchronous proxy - web service scenario

    Hi Gurus,
    I have a synchronous scenario in which SAP is sending a request via XI using SOAP and receiving a response back. As part of this scenario, I am consuming standard web service APIs provided by the third party.
    Since, every request has to contain the connecting user id and password provided by the third party, I am sending/receiving messages without SOAP envelop (achieved by clicking 'Do not use SOAP envelope' checkbox in SOAP Receiver Communication Channel).
    For this scenario, we are including the user id and password in the request message using XSLT mapping and the request number using simple message mapping.
    The fault message of the web service is being mapped to the fault message created in XI under Fault Message Types.
    The interface mapping page has got 3 tabs, one each for Request message mapping, Response message mapping and Fault message mapping.
    When I trying to test a failure scenario by giving an incorrect request number(since this is the only input parameter in gthe request message apart from user id and password), it is throwing up "MAPPING">EXCEPTION_DURING_EXECUTE error.
    Actually, for such requests, I am getting a proper fault response back from the third party which I can see in XI (in moni) as response to my request but when I am looking at the message in moni in SAP, I am only seeing "MAPPING">EXCEPTION_DURING_EXECUTE. Even I can see the exception in the trace section of my response in moni in XI.
    My feeling is that the fault message mapping is not getting executed at all.
    I also thought to do a 2:1 multimapping in which, the target side will contain the response message type created in XI but the source will contain two messages, i.e. Normal response message structure provided by third party and Fault message structure provided by third party but I am not sure whether this is possible without using BPM.
    Please suggest the best way to resolve this issue.

    The Fault message raised from 3rd party service, is structured as follow ??
    HTTP/1.1 500 Internal Server Error
    Content-Type: text/xml; charset="utf-8"
    Content-Length: nnnn
    <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Body>
           <SOAP-ENV:Fault>
               <faultcode>SOAP-ENV:Server</faultcode>
               <faultstring>Server Error</faultstring>
               <detail>
                   <e:myfaultdetails xmlns:e="Some-URI">
                     <message>My application didn't work</message>
                     <errorcode>1001</errorcode>
                   </e:myfaultdetails>
               </detail>
           </SOAP-ENV:Fault>
       </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Take a look here:
    /people/jin.shin/blog/2007/05/21/handling-web-service-soap-fault-responses-in-sap-netweaver-xi
    and to this standard document:
    http://help.sap.com/saphelp_nwpi711/helpdata/en/48/5946db5f693912e10000000a42189b/content.htm

  • Extend BizTalk ESB Exception Handling to manage exception for all organization wide application exception

    Hello,
    Can we Extend BizTalk ESB Exception Handling to manage exception for all organization wide application ( both biztalk and external) exception ?
    Is it something a good option or there are better approach to do this.
    Business requirement is Exception management should be single window for complete end-to end application ( source-Biztalk - destination)
    Tarun
    Tarun

    Hi Tarun,
    ESB Toolkit framework for exception handling is not complete OOTB. it is intended as a framework and set of patterns that can and should
    be extended based on the customer’s needs.
    One way of extending the capabilities is by using Standardized Exception Management or SEM in short. 
    SEM solution extends the capabilities of the Microsoft ESB Exception Management Framework and follows a design pattern that provides a flexible
    approach to exception monitoring and enables error responses to originate from outside of the solution. While SEM is primarily targeted to Microsoft BizTalk Server applications, it can also be leveraged by other applications that are able to call a Windows
    Communications Foundation (WCF) or web service.
    Refer: Standardized Exception Management
    Standardized Exception Management (SEM)
    Rachit

  • Handling multiple events in web application

    We are converting a window application to a web application. We are facing an issue while implementing the web application with Java on front end and Oracle DB in back end. Consider a field with a car registration number which needs to be verified if it exists in the DB and fetch the remaining values related to the car and display it. At the same time we also need to save the car registration number in the form (displayed in the browser) so that other operations (such as invoicing) can happen on the car. We have a constraint that we cannot touch any of the server procedures in the DB (which handles all DB calls) but could only play with the functions in the UI.
    Now the verification of the reg. no. happens whenever we go 'out of focus' from the text box where the reg.no. is written. However, if the user presses 'save' button to save the reg.no., verification should also occur and data should be saved. Now the problem we are facing is that on pressing the save button, two events are occurring simultaneously - 1. textbox with reg.no. is getting 'out of focus' and 2. save button is getting pressed resulting in verifying the reg.no. again. Due to this two events happening simultaneously, one or other method is failing leading to the car reg.no. not getting verified and saved as it should be.
    Could anyone think of any solution to overcome the issue?
    /Mayank

    Hi,
    Your assumptions are all correct. Indeed there is Javascript code executing on focus change and AJAX is doing the validations by inturn calling an oracle procedure through some Java rountine. The two requests are overlapping and hence blocking the complete execution of either, leading to the validation not taking place at all.
    The webpage gets refreshed everytime an event occurs and thus the next event can take place only after the page has refreshed once (after completing all the validations linked to that event). The problem is occuring since the page is not getting time to refresh. With simultaneous execution of 2 events, the validations related to 'Out of focus' remains incomplete before the 'save function' starts. I am constrained not to put the validation related to 'Out of Focus' in the beginning of 'save' event since that would alter functionality of the 'save' event. Again, I am not allowed to change any of the server procedures on the DB side and have to pass exactly the same i/o parameters for it to function properly.
    What I am trying to find is: Whether it is possible to find out (using some global variables) that when the 2 events are happening simultaneously, their functionalities could be combined and serialized in just one refresh of the webpage. and how?
    I am trying to get this project done by Java resources and am myself not very technical with Java. If a solution exists and I get to know it exists, I can guide the programmers to try out the approach that come up.
    Thanks so much :)

  • Exception Handling with OC4J Web Services

    Hi,
    I want to throw some custom exceptions from my web services, based upon my business logic. From the documents I came to know that I can use "javax.xml.rpc.soap.SOAPFaultException" for the same. Following is the sample web service code which I'm trying in my environment.
    import javax.ejb.Stateless;
    import javax.jws.WebMethod;
    import javax.jws.WebService;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.soap.SOAPFaultException;
    @WebService
    @Stateless
    public class TestService {
         @WebMethod
         public void greeting()
              throw new SOAPFaultException(new QName("uri", "local"),
         "My Fault String", "My Fault Actor", null);
    Deployment of the web service goes fine and on the invocation of the "greeting" operation the exception is being thrown. But the problem is that, the soap response, which my web service client receives is as of follows,
    <env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://service.csm.nb.md.inglife.jp.co/">
    <env:Body>
    <env:Fault>
    <faultcode>env:Server</faultcode>
    <faultstring>Internal Server Error (Caught exception while handling request: oracle.oc4j.rmi.OracleRemoteException: javax.xml.rpc.soap.SOAPFaultException: My Fault String; nested exception is: javax.xml.rpc.soap.SOAPFaultException: My Fault String)</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    This means that OC4J again wraps the SOAPFaultException thrown by me. Is there any way by which I can avoid the further wrapping of my exceptions? If there is anything wrong in my approach please do let me know.
    Regards,
    Dipu

    This is one of the "classic" design problems in this kind of architecture. And, unfortunately, the answer is "it depends on how you think you need to handle it." And I'm sure there are plenty of "gurus" that will tell you one way or another is the only way to do it.
    I'll be more honest: I'll give you a couple of personal suggestions, based on experience in this architecture. These are suggestions - you may do with them what you will. I will not say this is the best, most correct, or even remotely relevant to what you're doing.
    If it's simple data validation for "typing" (e.g. String, number, Date, etc.), that is taken care of when you attempt to stuff in the information into the appropriate DTO. If it's more "sophisticated" than that (must be in a certain range, etc.), that particular checking should probably be delegated from your Controller to a helper class. That not only saves the "expense" of transmitting the information back and forth across the wire, it's "faster" to the end user so say "Ooopsie" by redirecting back to the form right then. Basically the same thing if the types are wrong.
    That only leaves the "big" problems in the business layer (EJBs), where you have to deal with concurrency, database failures, etc. Generally these kinds of exceptions are thrown back to to the Controller in one of two forms:
    1) a sublass of RuntimeException, which signals that some Very Bad Things have happened in your container. EJBException is one like that and you can see where it's being thrown from.
    2) a subclass of Exception, also called "application exceptions." They are usually something like a "duplicate record" or a validation-like error (which you mentioned) like a missing field. They're used as a signal to a failure in the logic, not the container. That way you have to decide at what layer of your architecture they should be handled and/or passed on to the next.

Maybe you are looking for

  • PO condition type

    Hi guys, We have configured two difference pricing procedures for domestic and import procurements.  10 condition types are common for two procedures and 10 more different condition types are available in each procedure. With SAP standard settings fo

  • Invoice Planning: Allowing ERS vendor

    Hi, We have implemented Invoice planning. Making our supplier an ERS vendor prevents us from doing the normal procurement process for using the supplier as they are an ERS vendor. The process of activating the ERS for the sake of using invoice planni

  • PO Naming Convention for specific company code

    Hi experts! Is there any way to know this PO naming convention is belongs to which company code? For eg: PO naming convention starts with 600*******. How will i know which company code is using the naming convention for their purchase order? Please h

  • Use Cisco ACS to verify MAC address for VPN User

    Question: I want to have the MAC address of a machine checked when the user is logging into VPN Client. For example: User opens VPN client-->Clicks connect-->types in User/Pass which gets passed to ACS (part of what should be sent is the MAC address)

  • External System communication via RFC

    Hi Experts In my landscape, sending system want to use an RFC connection to the PI via SAP java connector. In turn PI should call the RFC in the SAP System and execute the RFC and return the results. note ; Sending system is Java based system Is it p