Exception handling in  Data feeder class

Hi All,
I have written some code in the DATA class feeder.  there i am catching some exception and i am displaying the exception using the message manager.
So after catching the exception , its going for dump because , the mo_message , the attribute of the data class has NULL values ,
But i can able to display the exceptions in form and list feeder classes . because i have referred the data class in both form and list attributes .
So its getting the instance , but i need to display the exceptions in the data class, how to get the instance of the message interface.
Please share !
Thanks,
Pradeep.

Hi,
throw a new JBOException
Frank

Similar Messages

  • Get the handler for GUIBB Feeder class from Genil implementation class

    Hello,
    In BOL based GUIBB, the feeder class will call correspondence Genil implementation class, may I know if it is possible to get the handler or instance of the feeder class in the Genil implementation class, then we can call the method of the feeder class get some information about the feeder, e.g. the value of the parameter.
    Thank you very much.
    Best regards,
    Shumin

    Hello,
    In BOL based GUIBB, the feeder class will call correspondence Genil implementation class, may I know if it is possible to get the handler or instance of the feeder class in the Genil implementation class, then we can call the method of the feeder class get some information about the feeder, e.g. the value of the parameter.
    Thank you very much.
    Best regards,
    Shumin

  • Exception handling for eventlistener inner classes in swing application

    Hi,
    This is probably sooo easy I will kick myself when I find out, but anyway here goes...
    I have an inner class thus...
              cmbOffence.addFocusListener(new FocusAdapter() {
                        public void focusGained(FocusEvent e) {
                             cmbOffence_focusGained(e);
                        public void focusLost(FocusEvent e) {
                        try {
                             cmbOffence_focusLost(e);
                        } catch (XMLConfigurationException xce) {
                   });where cmbOffence.focusLost(e) is looking up to a class that throws an exception which should be fatal i.e. the swing app should close. I want to handle this exception gracefully so therefore want to throw the XMLConfiguratinException to the main application class. How do I do this?? I guess this is more of an inner classes question than a swing one per se, but any help would be appreciated.
    Thanks
    Conrad

    I think you're maybe confusing classes and threads. In the typical Swing application the "main" thread finishes after openning the initial window and there really is no main thread to report back to. In fact the dispatcher thread is about as "main" as they come.
    To exit such a program gracefully is usually a matter of cleaning up resources and calling dispose on the main window, which you can perfectly well do from the dispatcher thread.
    I usually wind up with some centralised method to deal with unexpected exceptions, for example as part of my desk top window in an MDI, but it's called from the dispatcher thread as often as from anywhere.

  • Exception handling in data control

    How to handle exceptions in data control so that it will bubble up to the surface level and be handled gracefully (meaning give user a message indication some kind of error has occurred and try again later)
    I have page to display user information which comes from a data control (I dragged and dropped the DC to the page). There is no managed bean involved. One day some problem happened with the database and the data control failed. The user ended up seeing a blank page.
    Thanks.

    Hi,
    throw a new JBOException
    Frank

  • How to used exception handler ?

    hi,
    i am facing ADF-Faces 60003 exception in my project .i searched this problem they are saying this is bugs. i am using jdeveloper 11.1.1.3 . this message is coming in pop -up.to hiding this message i am thinking to implement exception handler .
    is this possible to handle ?for exception handler , i created a class which contains following code
    public class Eception extends ExceptionHandler{
    public Eception() {
    super();
    public void handleException(FacesContext facesContext, Throwable throwable,
    PhaseId phaseId) {
    System.out.println("------------------------------");
    String error_message;
    error_message = throwable.getMessage();
    //check error message and handle it if you can
    System.out.println("===================="+error_message+"-------------------------"+phaseId);
    and also i created a text file name oracle.adf.view.rich.context.Exceptionhandler and pasted in .adf\META-INF\services folder .
    but still my handleException is not triggering .i do not know why ?
    is there any other step .please let me know where is problem .
    thanks
    Edited by: ADFORCLE on Oct 27, 2011 1:28 PM

    any how i am able to called my handler method.name is handler file is not correct.after resolving this problem i am facing new problem.suppose right now i am in A page. if i navigate to different pages B . all are required validation message of page B is showing .even though it's first jsf life cycle phase .

  • Exception Handling Standards -The exception Exception should never been thrown. Always Subclass Exception and throw the subclassed Classes.

    In the current project my exception handling implementation is as follows :
    Exception Handling Layer wise :
    DL layer :
    catch (Exception ex)
    bool rethrow = ExceptionPolicy.HandleException(ex, "Ui Policy");
    if (rethrow)
    throw;
    BL Layer
    catch (Exception ex)
    bool rethrow = ExceptionPolicy.HandleException(ex, "Ui Policy");
    if (rethrow)
    throw;
    UI Layer
    catch (Exception ex)
    bool rethrow = ExceptionPolicy.HandleException(ex, "Ui Policy");
    if (rethrow)
    Response.Redirect("ErrorPage.aspx", false);
    We have a tool to check the standards. And tool output is as follows :
    The exception Exception should never been thrown. Always Subclass Exception and throw the subclassed Classes.
    I need suggestions on how to implement the same according to standards.

    Your tool is wrong if it says to never throw Exception.  This was a common recommendation back in the .NET v1 days but has long since been thrown out.  It is perfectly fine to use Exception when you have a general exception that provides no information
    that an application can use to make an informed opinion.
    The general rules of exception throwing is to throw the most specific exception that makes sense. If there is no specific exception that applies and it would be useful for the caller to handle the exception differently than other exceptions then creating
    a custom exception type is warranted.  Otherwise throwing Exception is reasonable. As an example you might have an application that pulls back product data given an ID. There is no built in exception that says the ID is invalid. However an invalid ID
    is something that an application may want to handle differently than, say, an exception about the product being discontinued.  Therefore it might make sense to create an ItemNotFoundException exception that the application can react to.
    Conversely there is no benefit in having different exception types for disk full and disk quota met. The application will respond the same in either case.
    Michael Taylor
    http://blogs.msmvps.com/p3net

  • Message handling in feeder class for component under FPM_FORM_UIBB

    Hi,
    I have created a component configuration under the component FPM_FORM_UIBB. The feeder class used is CL_HRESS_PER_DETAIL_0021_10.  I have modified the method IF_FPM_GUIBB_FORM~GET_DATA to report an error message using the FPM message manager(code is hown below) if the field state is not filled.
    The problem is that i get the error message below along with the standard success message that 'Data is Saved'.(and the data is actually saved on the back end)
    Is there a way that i can stop additional processing after I report the error message?  I
    IF io_event->mv_event_id EQ 'FPM_SAVE'.
          IF <lv_data_country> = 'US' AND <lv_data_state> IS INITIAL.
            DATA: lv_message_manager TYPE REF TO if_fpm_message_manager,
                       lv_fpm TYPE REF TO if_fpm.
            "Get handle to the IF_FPM interface
            lv_fpm = cl_fpm_factory=>get_instance( ).
            "Get handle to the FPM Message Manager
            lv_message_manager = lv_fpm->mo_message_manager.
            CALL METHOD lv_message_manager->report_message
              EXPORTING
                iv_message_text              = 'State is mandatory'
                io_component                 = me
                iv_severity                  = 'E'.
          ENDIF.
        ENDIF.
    Thanks in advance,
    Reddy

    Hallo reddy,
    i think you need to append the error message to the et_messages exporting parameter. Further you cannot stop the processing of the instructions followed by the your logic.
    Runtime is not going to stop when it encounter report-error-message. You have to do it yourself using if ..else construct.
    You can also program it in process_event method and return ev_result as failed. In this way the fpm event phase model stops further processing.

  • Customised Exception handling class.....

    Hello Friends,
    I am working on a project for which I need to create my own exception handling class.
    The reason I need this class is to catch any exceptions and get a customised error message
    according to each exception and then be able to display those messages on web page.
    some examples of the exception I want to catch and display appropriate message are..
    1. a duplicate reord in db
    2. wrong data type (this will deal with ints,doubles and strings data types)
    3. date type validation ( to make sure its date object instead of a string)
    and there are several more messages but if can get some help or idea from any one to design a class for the above errors I might be able to manage other errors as well.
    greatly appreciate any respnses.

    First off, you can extend Exception:
    public class MyException extends Exception {
    }You can put some custom messages into the class:
    public class MyException extends Exception {
      public static final String DUPLICATE_RECORD = "Duplicate record in db",
                           WRONG_DATA_TYPE = "Wrong data type",
                           VALIDATION_ERROR = "Invalid data type";
    }Then, have your constructors, which take a String as an argument, so they can get your 'presets' or a custom message:
    public class MyException extends Exception {
      public static final String DUPLICATE_RECORD = "Duplicate record in db",
                           WRONG_DATA_TYPE = "Wrong data type",
                           VALIDATION_ERROR = "Invalid data type";
      public MyException(String message) {
        super(message);
    }You could also have a series of exception classes: DuplicateRecordException, WrongDataTypeException, ValidationException, etc. Hope that helps.
    m

  • Exception Handling for many bean objects of a container class in a JSP page

    Hello,
    I have on container bean class. In this container class, there are several others class objects and the getter methods to get these objects out to the JSP pages.
    I have one JSP page which will use different objects in the container class object through the getter methods of the container class.
    My question is how to implement the exception handler for all the objects in the container so that the JSP page can handle all exceptions if occurrs in any object in the container?
    Please give me some suggestions. Thanks
    Tu

    Thanks for your reply.
    Since the container is the accessor class, I have no other super class for this container class, I think I will try the try catch block in the getter methods.

  • Class based exception handling

    Hi everyone....
    I am new to object oriented abap.
    I would like to know more about exception handling using classes.
    please provide some good material or links on the topic?
    Points will be rewarded.......

    hi,
    Download the PDF from here.
    http://www.esnips.com/doc/6d16a298-9227-4d32-acf1-e91164c89daf/3-ABAP-Objects(P283)
    Follow this link too for tutorials.
    http://www.****************/Tutorials/OOPS/MainPage.htm
    Hope this helps, Do reward.
    Edited by: Runal Singh on Mar 14, 2008 3:28 PM

  • Exception handling across multiple classes

    Is it possible to throw the exception from one class to another class for exception handling.............. can anyone tell me the way........

    you don't throw it to a specific class. in the method where the exception might be thrown, you can choose to either catch it there, or just re-throw it so that the method before it can choose to catch it or throw it. you know what a stack trace is? it's a chain of methods that were called to get to a certain point in execution, and if an exception is thrown somewhere, either the method in which it is thrown deals with it, or it passes it back to the preceeding method in the stack
    why were you trying to throw it to a class?

  • Exception Handling at class level

    This is a quick one. I've never used a try catch event handling statement at the class level where I declare all my variables before. Is is ok to do this? Can someone perhaps show me some psuedo code like this?
    private final ImageIcon[] CAT_BULLETS = {new ImageIcon("yellow_his.gif"),
                                                                                 new ImageIcon("blue_pp.gif"),                                             new ImageIcon("pink_sn.gif"),
                                                                                 new ImageIcon("brown_ent.gif"),                                                             new ImageIcon("green_al.gif"),
                                                                                 new ImageIcon("orange_sl.gif")};

    No, you can't wrap class-level variable declarations in try-catch blocks. Declare
    the variables at the class level, do the assignment in you constructor,
    and wrap the code there in a try-catch block.

  • How to log exception from a struts action class

    Hi guys,
    I am recoding my application to use the strut framework. There's one small thing i wonder is that how i can log an exception arrise in an action class. In my original servlet, wherever an exception arise, i use:
    catch(Exception e)
             getServletContext().log("User enter an invalid date");
             throw e;
          }However, when i move this servlet into a action class, the getServletContext method doesnt work anymore. I thought action is a child of httpServlet but since getServletContext is not available in action, then how can i log the error?
    Hope to get some help
    Message was edited by:
    lnthai2002

    Hi guys,
    I am recoding my application to use the strut
    framework. There's one small thing i wonder is that
    how i can log an exception arrise in an action class.
    In my original servlet, wherever an exception arise,
    i use:
    catch(Exception e)
    getServletContext().log("User enter an invalid
    valid date");
             throw e;
          }However, when i move this servlet into a action
    class, the getServletContext method doesnt work
    anymore. I thought action is a child of httpServlet
    but since getServletContext is not available in
    action, then how can i log the error?
    Hope to get some help
    Message was edited by:
    lnthai2002Action class is just a POJO and works a handler of your request. ActionServlet invoke your Action class based on the action you call in your URL. When you are usign the Struts why do you need your Original Servel, use the ActionServlet and if required you can extend it and create your own servlet

  • Calling a Web Dynpro Application from POWL feeder class

    Hi,
    I know this question is asked before but never answered, but I try again......
    I have a own POWL feeder class where I defined a button in method IF_POWL_FEEDER~GET_ACTIONS.
    I know that this action can be handled in method IF_POWL_FEEDER~HANDLE_ACTION.
    When pressing the button I want do call another web dynpro application.
    How can I do this? -> Any Example Coding?
    Thank you and best regards, Edgar

    Hi Vineet,
    it works, thanks a lot!!!!  Best Regards, Eddy
    P.S.: Here is the coding for triggering the event and passing parameters for the selected POWL table line:
    METHOD if_powl_feeder~handle_action.
      DATA: ls_parameter TYPE powl_namevalue_sty.
      DATA: lt_flights TYPE ty_flights.
      DATA: ls_flight TYPE sflight.
      DATA: ls_selected TYPE rstabix.
      FIELD-SYMBOLS: <lt_fligts> TYPE STANDARD TABLE.
      IF i_actionid = 'EDIT'.
    *   Important: this triggers the event
        e_portal_actions-fire_wdevent = abap_true.
    *   Pass parameters to event
        ASSIGN c_result_tab TO <lt_fligts>.
        lt_flights = <lt_fligts>.
    *   Determine the first selected row
        READ TABLE c_selected INTO ls_selected INDEX 1.
    *   Read selected POWL data
        READ TABLE lt_flights INDEX ls_selected-TABIX INTO ls_flight.
        CHECK sy-subrc = 0.
    *   Pass parameters
        ls_parameter-key = 'ACTIONID'.
        ls_parameter-value = 'I_ACTIONID'.
        APPEND ls_parameter TO e_portal_actions-parameters.
        ls_parameter-key = 'CARRID'.
        ls_parameter-value = ls_flight-carrid.
        APPEND ls_parameter TO e_portal_actions-parameters.
        ls_parameter-key = 'CONNID'.
        ls_parameter-value = ls_flight-connid.
        APPEND ls_parameter TO e_portal_actions-parameters.
        ls_parameter-key = 'FLDATE'.
        ls_parameter-value = ls_flight-fldate.
        APPEND ls_parameter TO e_portal_actions-parameters.
      ENDIF.
    ENDMETHOD.

  • Exception Handling-rite way??

    Hi Friends,
    This Exception handling is really causing some problems for me.I run a query,return the resultset,cook the data from my other java class and display it thru my jsp and the last statement from my jsp is to call the close method(commented out).The problem is if some unknown Exception arises the close() method is not being called,causing open connections which later on are
    creating some disasters.I tried to implement it now using the finally method,so that it always gets closed,but hte problem is when i call the ReturnResultSet() method and try to cook the data,it says "ResultSet Closed".Please tell me which is the right way to implement this:
    public ResultSet ReturnResultSet(String Query) throws Exception
         try{  
           if (datasource != null) {
             connection = datasource.getConnection();
             if (connection != null) {
               statement = connection.createStatement( );
               resultset = statement.executeQuery(Query);         
           return resultset;
         } catch (SQLException sqle)
           sqle.printStackTrace();
           return null;
         finally {       
         try {
           if (resultset != null) resultset.close();
           if (statement != null) statement.close();
           if (connection != null) connection.close();
         catch (SQLException sqle) {
           sqle.printStackTrace();
    public void close()
       try { resultset.close(); } catch (Exception ex) {}
       try { statement.close(); } catch (Exception ex) {}
       try { connection.close(); } catch (Exception ex) {}
    */Any help would be appreciated and some duke dollars would be awarded too.Thanks

    Ok I think i got your point and i should award you
    the duke dollars too,but one last thing to ask.I call
    the close() method after all my processing is over,I
    just
    wanna know should I have the connection.close() thing
    inside it,becuase dont that contradicts the whole
    connection pool thing,as i am closing a connection
    and it has to open a new connection for every
    request.Or should i just have resultset.close() and
    statement.close() in it.
    Thanks for all your helpAre you talking about a standard J2EE container-provided connection pool? If so, then yes, you still need to 'close' the connection. That doesn't actually close it, it just tells the pool it is available to be used again the next time someone asks it for a connection. Hopefully you're not writing your own home-grown "connection pool".

Maybe you are looking for

  • Calling SQL Server Script File in Hypersonic DB

    HI All, I am using Hypersonic Database with java swing. To update the database, i am getting SQL Server script file through a webservice. The problem is i dont have any idea, how i can update Hypersonic Database with the SQL Server script file. Pleas

  • Error when trying to compile with cos.jar

    When compiling on linux/tomcat machine I put the path to cos.jar in my javac command and get the following error: .../cos.jar: cannot execute binary file I can compile servlets that do not require this jar file but cannot compile servlets that need i

  • Adobe reader won't accept the password I know is right

    So I can't download it.  Help!

  • ACE and Client cert headers

    Hi all, We currently use a Cisco SCA for SSL off load. When adding client certificates to the SCA, there is an option to "Add Client Certificate Info" - which uses a check box to enable this feature. This feature, to the best of my knowledge, sends t

  • Cannot access Rows from a non-nested table item..

    create or replace package types as type cursorType is ref cursor; end; create or replace function sp_ListEmp return types.cursortype as l_cursor types.cursorType; begin open l_cursor for select ename, empno from Scott.emp order by ename; return l_cur