Can not catch in servlet exception thrown by EJB

Hello everybody.
I created an exception class InvalidDataException derived from Exception. This exception is thrown in an EJB session.
In my servlet I wrote two catch blocks. The first one is :
catch(InvalidDataException ex) and the second one is catch(Exception ex).
The InvalidDataException is not catched in the InvalidDataException block but in the Exception block. And in the Exception block I display the class of the catched exception, the class is the class of my InvalidDataException.
I hope my explanation is clear...
Any ideas ??
Thank you for your help
Here is the stacktrace, there are french words, dont be afraid :-)
10:20:48,261 INFO  [STDOUT] avant lancement exception invalidData
10:20:48,264 ERROR [[BookServlet]] Servlet.service() for servlet BookServlet threw exception
pipeline.MyExceptions.InvalidDataException: La date de d\uffffbut doit \ufffftre ant\uffffrieure \uf
fff la date de fin du projet
        at pipeline.ejb.FacadeBean.verifDates(FacadeBean.java:169)
        at pipeline.ejb.FacadeBean.reserverRess(FacadeBean.java:125)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.jboss.invocation.Invocation.performCall(Invocation.java:359)
        at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionConta
iner.java:228)
        at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionI
nterceptor.java:158)
        at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstance
Interceptor.java:169)
        at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.
java:71)
        at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:63)
        at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:121)
        at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:350)
        at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:181)
        at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:168)
        at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:206)
        at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.
java:136)
        at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:643)
        at org.jboss.ejb.Container.invoke(Container.java:917)
        at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:430)
        at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:103)
        at $Proxy110.reserverRess(Unknown Source)
        at pipeline.web.BookServlet.doPost(BookServlet.java:235)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j
ava:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:54)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.ja
va:174)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:868)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Htt
p11BaseProtocol.java:663)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)

Hello,
I fix my problem. I included the class InvalidDataException in the *.war and in the *.jar so there were 2 definitions of InvalidDataException. Thats why my exception was not catched.
Bye

Similar Messages

  • Why can not catch the standard BACK event in ALV's USER_COMMAND event,

    Hi expert, why i can not catch the standard BACK event in ALV's USER_COMMAND event,
    Code:
    DATA G_CON_UC_FORM   TYPE SLIS_FORMNAME VALUE 'F_USER_COMMAND',
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = SY-REPID
          I_CALLBACK_TOP_OF_PAGE  = G_CON_FORM
          I_CALLBACK_USER_COMMAND = G_CON_UC_FORM
          IT_FIELDCAT             = G_TAB_FIELDCAT
          IT_SORT                 = G_TAB_SORT_INF
          I_SAVE                  = G_CON_U
    *<<<Liang
        IT_EVENTS               = G_TAB_ALV_EVENTS
    *<<<Liang
        TABLES
          T_OUTTAB                = G_TAB_OUTPUT_DATA
        EXCEPTIONS
          PROGRAM_ERROR           = 1
          OTHERS                  = 2.
    *&      Form  F_USER_COMMAND
          ALV USER COMMAND processing
    FORM F_USER_COMMAND .
      IF SY-UCOMM = '&FO3'.
        LEAVE TO SCREEN 0.
      ENDIF.
    ENDFORM.                    " F_USER_COMMAND
    When I set breakpoint on this subrouting ,and try to click stardard  BACK or CANCEL button, the callback form do not run, but if double click one of line of alv report, the callback form works well,
    so why??

    hi
    good
    check this report and change your code accordingly.
    THESE LINES ARE FOR THE MAIN PROGRAM ***
    SAP V40B ***
    REPORT Z_PICK_LIST .
    TABLES: RESB.
    SELECTION-SCREEN BEGIN OF BLOCK BL1 WITH FRAME TITLE TEXT-BL1.
    SELECT-OPTIONS: S_WERKS FOR RESB-WERKS," Plant
                    S_AUFNR FOR RESB-AUFNR," Order number
                    S_BDTER FOR RESB-BDTER." Req. date
    SELECTION-SCREEN END OF BLOCK BL1.
    PARAMETERS: P_VARI LIKE DISVARIANT-VARIANT DEFAULT '/STANDARD'.
    DATA: BEGIN OF OUT OCCURS 10,
            AUFNR LIKE RESB-AUFNR,         " Order number
            MATNR LIKE RESB-MATNR,         " Material
            BDMNG LIKE RESB-BDMNG,         " Requirements in UM
            MEINS LIKE RESB-MEINS,         " Unit of Measure (UM)
            ERFMG LIKE RESB-ERFMG,         " Requirements in UE
            ERFME LIKE RESB-ERFME,         " Unit of Entry (UE)
            MAKTX LIKE MAKT-MAKTX,         " Mat. description
          END OF OUT.
    INCLUDE Z_ALV_VARIABLES.
    INITIALIZATION.
      REPNAME = SY-REPID.
      PERFORM INITIALIZE_FIELDCAT USING FIELDTAB[].
      PERFORM BUILD_EVENTTAB USING EVENTS[].
      PERFORM BUILD_COMMENT USING HEADING[].
      PERFORM INITIALIZE_VARIANT.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_VARI.
      PERFORM F4_FOR_VARIANT.
    AT SELECTION-SCREEN.
      PERFORM PAI_OF_SELECTION_SCREEN.
    START-OF-SELECTION.
      PERFORM GET_ORDERS.
      PERFORM GET_MATERIAL_DESCRIPTION.
    END-OF-SELECTION.
      PERFORM BUILD_LAYOUT USING LAYOUT.
      PERFORM BUILD_PRINT  USING PRINTS.
      PERFORM WRITE_USING_ALV.
          FORM INITIALIZE_FIELDCAT                               *
    -->  P_TAB                                                         *
    FORM INITIALIZE_FIELDCAT USING P_TAB TYPE SLIS_T_FIELDCAT_ALV.
      DATA: CAT TYPE SLIS_FIELDCAT_ALV.
      CLEAR CAT.
    ENDFORM.                               " INITIALIZE_FIELDCAT
    *&      Form  GET_ORDERS
          text
    FORM GET_ORDERS.
      SELECT AUFNR MATNR BDMNG MEINS ERFMG ERFME
             FROM RESB
             APPENDING TABLE OUT
             WHERE XLOEK EQ SPACE          " deletion indicator
             AND   XWAOK EQ 'X'            " goods movement indicator
             AND   WERKS IN S_WERKS        " plant
             AND   BDTER IN S_BDTER        " req. date
             AND   AUFNR IN S_AUFNR.       " pr. order
    ENDFORM.                               " GET_ORDERS
    *&      Form  GET_MATERIAL_DESCRIPTION
          text
    FORM GET_MATERIAL_DESCRIPTION.
      SORT OUT BY MATNR.
      LOOP AT OUT.
        SELECT SINGLE MAKTX
               INTO OUT-MAKTX
               FROM MAKT
               WHERE MATNR EQ OUT-MATNR
               AND   SPRAS EQ 'EN'.
        MODIFY OUT.
      ENDLOOP.
      SORT OUT BY AUFNR MATNR.
    ENDFORM.                               " GET_MATERIAL_DESCRIPTION
          FORM TOP_OF_PAGE                                              *
    FORM TOP_OF_PAGE.
      DATA: L_POS TYPE P.
    first line
      WRITE:/ TEXT-001.                    " Plant:
      IF S_WERKS-HIGH NE SPACE.
        WRITE: S_WERKS-LOW, TEXT-TO1, S_WERKS-HIGH.
      ELSEIF S_WERKS-LOW NE SPACE.
        LOOP AT S_WERKS.
          WRITE: S_WERKS-LOW.
        ENDLOOP.
      ELSEIF S_WERKS-LOW EQ SPACE.
        WRITE: TEXT-ALL.
      ENDIF.
      L_POS = ( SY-LINSZ DIV 2 ) - ( STRLEN( TEXT-TIT ) DIV 2 ).
      POSITION L_POS. WRITE: TEXT-TIT.
      L_POS = SY-LINSZ - 20.
      POSITION L_POS. WRITE: TEXT-011, SY-UNAME RIGHT-JUSTIFIED.  " User:
    second line
      WRITE:/ TEXT-002.                    " Order:
      IF S_AUFNR-HIGH NE SPACE.
        WRITE: S_AUFNR-LOW, TEXT-TO1, S_AUFNR-HIGH.
      ELSEIF S_AUFNR-LOW NE SPACE.
        LOOP AT S_AUFNR.
          WRITE: S_AUFNR-LOW.
        ENDLOOP.
      ELSEIF S_AUFNR-LOW EQ SPACE.
        WRITE: TEXT-ALL.
      ENDIF.
      L_POS = SY-LINSZ - 20.
      POSITION L_POS. WRITE: TEXT-012,SY-DATUM.      " Date:
    third line
      WRITE:/ TEXT-003.                    " Req. Date:
      IF S_BDTER-HIGH(1) NE '0'.
        WRITE: S_BDTER-LOW, TEXT-TO1, S_BDTER-HIGH.
      ELSEIF S_BDTER-LOW(1) NE '0'.
        LOOP AT S_BDTER.
          WRITE: S_BDTER-LOW.
        ENDLOOP.
      ELSEIF S_BDTER-LOW(1) EQ '0'.
        WRITE: TEXT-ALL.
      ENDIF.
      L_POS = SY-LINSZ - 20.
      POSITION L_POS. WRITE: TEXT-013, SY-PAGNO.   " Page:
    ENDFORM.                               " TOP_OF_PAGE
          FORM END_OF_LIST                                              *
    FORM END_OF_LIST.
      DATA: L_POS TYPE P.
      ULINE.
      WRITE:/ '|', TEXT-021.      " Delivered by:
      L_POS = SY-LINSZ DIV 2.
      POSITION L_POS. WRITE: '|', TEXT-031.            " Received by:
      L_POS = SY-LINSZ.
      POSITION L_POS. WRITE: '|'.
      WRITE:/ '|'.
      L_POS = SY-LINSZ DIV 2.
      POSITION L_POS. WRITE: '|'.
      L_POS = SY-LINSZ.
      POSITION L_POS. WRITE: '|'.
      ULINE.
      WRITE:/ '|', TEXT-012.      " Date:
      L_POS = SY-LINSZ DIV 2.
      POSITION L_POS. WRITE: '|', TEXT-012.            " Date:
      L_POS = SY-LINSZ.
      POSITION L_POS. WRITE: '|'.
      WRITE:/ '|'.
      L_POS = SY-LINSZ DIV 2.
      POSITION L_POS. WRITE: '|'.
      L_POS = SY-LINSZ.
      POSITION L_POS. WRITE: '|'.
      ULINE.
    ENDFORM.                               " END_OF_LIST
    *&      Form  WRITE_USING_ALV
          text
    FORM WRITE_USING_ALV.
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
           EXPORTING
                I_PROGRAM_NAME     = REPNAME
                I_INTERNAL_TABNAME = 'OUT'
                I_INCLNAME         = REPNAME
           CHANGING
                CT_FIELDCAT        = FIELDTAB.
      IF SY-SUBRC <> 0.
        WRITE: 'SY-SUBRC: ', SY-SUBRC, 'REUSE_ALV_FIELDCATALOG_MERGE'.
      ENDIF.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                I_CALLBACK_PROGRAM       = REPNAME
               i_callback_pf_status_set = 'PF_STATUS_SET'
               i_callback_user_command  = 'USER_COMMAND'
                I_STRUCTURE_NAME         = 'OUT'
                IS_LAYOUT                = LAYOUT
                IT_FIELDCAT              = FIELDTAB
                I_DEFAULT                = 'A'
                I_SAVE                   = G_SAVE
                IS_VARIANT               = G_VARIANT
                IT_EVENTS                = EVENTS[]
                IS_PRINT                 = PRINTS
           TABLES
                T_OUTTAB                 = OUT.
      IF SY-SUBRC <> 0.
        WRITE: 'SY-SUBRC: ', SY-SUBRC, 'REUSE_ALV_LIST_DISPLAY'.
      ENDIF.
    ENDFORM.                               " WRITE_USING_ALV
    THESE LINES ARE FOR THE INCLUDE ***
    ***INCLUDE Z_ALV_VARIABLES .
    TYPE-POOLS: SLIS.
    DATA: FIELDTAB TYPE SLIS_T_FIELDCAT_ALV,
          HEADING  TYPE SLIS_T_LISTHEADER,
          LAYOUT   TYPE SLIS_LAYOUT_ALV,
          EVENTS   TYPE SLIS_T_EVENT,
          REPNAME  LIKE SY-REPID,
          F2CODE   LIKE SY-UCOMM VALUE  '&ETA',
          PRINTS   TYPE SLIS_PRINT_ALV,
          TITLE(40) TYPE C,
          G_SAVE(1) TYPE C,
          G_EXIT(1) TYPE C,
          G_VARIANT LIKE DISVARIANT,
          GX_VARIANT LIKE DISVARIANT.
    CONSTANTS: FORMNAME_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
               FORMNAME_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE',
               FORMNAME_END_OF_LIST TYPE SLIS_FORMNAME VALUE 'END_OF_LIST',
               FORMNAME_BEFORE_LINE TYPE SLIS_FORMNAME VALUE 'BEFORE_LINE',
               FORMNAME_AFTER_LINE TYPE SLIS_FORMNAME VALUE 'AFTER_LINE'.
          FORM MAIN_STATEMENTS                                          *
    THIS IS THE CODE THAT MUST BE INSERTED IN THE MAIN PROGRAM
    FORM MAIN_STATEMENTS.
    Declare the parameter P_VARI wherever you want it. If you don't
    want it, hide it with NO-DISPLAY, but it must exist.
    parameters: p_vari like disvariant-variant. " ALV Variant
    You have to add the following line after the data and parameter
    declaration:
    include z_alv_variables.
    Then, after the data/parameter declaration, add these lines:
    *initialization.
    repname = sy-repid.
    perform initialize_fieldcat using fieldtab[].
    perform build_eventtab using events[].
    perform build_comment using heading[].
    perform initialize_variant.
    If you are using the variable P_VARI (ALV Variant), also add this:
    *at selection-screen on value-request for p_vari.
    perform f4_for_variant.
    *at selection-screen.
    perform pai_of_selection_screen.
    After the "END-OF-SELECTION" statement, add these lines:
    perform build_layout using layout.
    perform build_print  using prints.
    perform write_using_alv.
    You also have to create the following forms: (you can find samples
    in this program)
    INITIALIZE_FIELDCAT
    USER_COMMAND     (only if you are creating a STATUS)
    WRITE_USING_ALV
    ENDFORM.
    *&      Form  INITIALIZE_FIELDCAT_SAMPLE
          THIS IS A SAMPLE, DO NOT USE THIS FORM IN YOUR PROGRAM
         -->P_FIELDTAB[]  text                                           *
    FORM INITIALIZE_FIELDCAT_SAMPLE USING P_TAB TYPE SLIS_T_FIELDCAT_ALV.
      DATA: CAT TYPE SLIS_FIELDCAT_ALV.
      CLEAR CAT.                           " Always clear before use
      CAT-TABNAME = 'I'.                   " Your internal table
      CAT-REF_TABNAME = 'ZCUSTMAS'.  " The data dictionary reference table
      CAT-FIELDNAME = 'KUNNR'.       " Name of your field in the itable.
      CAT-COL_POS   = 1.                   " Output position
      APPEND CAT TO P_TAB.
      CAT-FIELDNAME = 'NAME1'.             " Next field
      CAT-COL_POS   = 2.
      APPEND CAT TO P_TAB.
      CAT-FIELDNAME = 'STRAS'.             " and the next
      CAT-COL_POS   = 3.
      APPEND CAT TO P_TAB.
      CAT-FIELDNAME = 'LOEVM'.
      CAT-SELTEXT_S = 'Del'.         " You can always override the descrip-
      CAT-SELTEXT_M = 'Delivery'.          " tion (short, medium, large)
      CAT-SELTEXT_L = 'Delivery Num'.
      CAT-COL_POS   = 4.
      APPEND CAT TO P_TAB.
      CAT-FIELDNAME = 'FKIMG'.
      CAT-DO_SUM    = 'X'.                 " You want totals calculated.
      CAT-NO_OUT    = 'X'.                 " and hidden.
      APPEND CAT TO P_TAB.
    ENDFORM.                               " INITIALIZE_FIELDCAT
    *&      Form  BUILD_EVENTTAB
          THIS IS THE SAME FOR ALL THE PROGRAMS
         -->P_EVENTS[]  text                                             *
    FORM BUILD_EVENTTAB USING P_EVENTS TYPE SLIS_T_EVENT.
      DATA: LS_EVENT TYPE SLIS_ALV_EVENT.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
           EXPORTING
                I_LIST_TYPE = 0
           IMPORTING
                ET_EVENTS   = P_EVENTS.
      READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_TOP_OF_PAGE
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE FORMNAME_TOP_OF_PAGE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO P_EVENTS.
      ENDIF.
      CLEAR LS_EVENT.
      READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_END_OF_LIST
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE FORMNAME_END_OF_LIST TO LS_EVENT-FORM.
        APPEND LS_EVENT TO P_EVENTS.
      ENDIF.
      CLEAR LS_EVENT.
      READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_BEFORE_LINE_OUTPUT
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE FORMNAME_BEFORE_LINE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO P_EVENTS.
      ENDIF.
      CLEAR LS_EVENT.
      READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_AFTER_LINE_OUTPUT
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE FORMNAME_AFTER_LINE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO P_EVENTS.
      ENDIF.
      CLEAR LS_EVENT.
      READ TABLE P_EVENTS WITH KEY NAME = SLIS_EV_END_OF_PAGE
                               INTO LS_EVENT.
      IF SY-SUBRC = 0.
        MOVE FORMNAME_END_OF_PAGE TO LS_EVENT-FORM.
        APPEND LS_EVENT TO P_EVENTS.
      ENDIF.
    ENDFORM.                               " BUILD_EVENTTAB
    *&      Form  BUILD_COMMENT
    NOT REALLY NEEDED, BUT I'LL LEAVE IT THERE, JUST IN CASE...
         -->P_HEADING[]  text                                            *
    FORM BUILD_COMMENT USING P_HEADING TYPE SLIS_T_LISTHEADER.
      DATA: HLINE TYPE SLIS_LISTHEADER,
            TEXT(60) TYPE C,
            SEP(20) TYPE C.
      CLEAR: HLINE, TEXT.
      HLINE-TYP  = 'H'.
    write: text-101 to text+23.
      HLINE-INFO = TEXT.
      APPEND HLINE TO P_HEADING.
    ENDFORM.                               " BUILD_COMMENT
    *&      Form  INITIALIZE_VARIANT
    VERY IMPORTANT WHEN YOU USE VARIANTS!!!
    FORM INITIALIZE_VARIANT.
      G_SAVE = 'A'.
      CLEAR G_VARIANT.
      G_VARIANT-REPORT = REPNAME.
      GX_VARIANT = G_VARIANT.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                I_SAVE     = G_SAVE
           CHANGING
                CS_VARIANT = GX_VARIANT
           EXCEPTIONS
                NOT_FOUND  = 2.
      IF SY-SUBRC = 0.
        P_VARI = GX_VARIANT-VARIANT.
      ENDIF.
    ENDFORM.                               " INITIALIZE_VARIANT
    *&      Form  PAI_OF_SELECTION_SCREEN
    ALSO FOR VARIANTS
    FORM PAI_OF_SELECTION_SCREEN.
      IF NOT P_VARI IS INITIAL.
        MOVE G_VARIANT TO GX_VARIANT.
        MOVE P_VARI TO GX_VARIANT-VARIANT.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
             EXPORTING
                  I_SAVE     = G_SAVE
             CHANGING
                  CS_VARIANT = GX_VARIANT
             EXCEPTIONS
                  WRONG_INPUT   = 1
                  NOT_FOUND     = 2
                  PROGRAM_ERROR = 3.
        IF SY-SUBRC EQ 0.
          G_VARIANT = GX_VARIANT.
        ELSE.
          PERFORM INITIALIZE_VARIANT.
        ENDIF.
      ELSE.
        PERFORM INITIALIZE_VARIANT.
      ENDIF.
    ENDFORM.                               " PAI_OF_SELECTION_SCREEN
    *&      Form  F4_FOR_VARIANT
          text
    FORM F4_FOR_VARIANT.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                IS_VARIANT = G_VARIANT
                I_SAVE     = G_SAVE
           IMPORTING
                E_EXIT     = G_EXIT
                ES_VARIANT = GX_VARIANT
           EXCEPTIONS
                NOT_FOUND  = 2.
      IF SY-SUBRC = 2.
        MESSAGE ID SY-MSGID TYPE 'S'      NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ELSE.
        IF G_EXIT = SPACE.
          P_VARI = GX_VARIANT-VARIANT.
        ENDIF.
      ENDIF.
    ENDFORM.                               " F4_FOR_VARIANT
    *&      Form  BUILD_LAYOUT
    STANDARD LAYOUT
         -->P_LAYOUT  text                                               *
    FORM BUILD_LAYOUT USING P_LAYOUT TYPE SLIS_LAYOUT_ALV.
      P_LAYOUT-F2CODE       = F2CODE.
      P_LAYOUT-ZEBRA        = 'X'.
    p_layout-detail_popup = 'X'.
      P_LAYOUT-TOTALS_TEXT  = SPACE.
      P_LAYOUT-SUBTOTALS_TEXT = SPACE.
    ENDFORM.                               " BUILD_LAYOUT
          FORM BUILD_PRINT                                              *
    STANDARD PRINT OPTIONS                                             *
    -->  P_PRINT                                                       *
    FORM BUILD_PRINT USING P_PRINT TYPE SLIS_PRINT_ALV.
      P_PRINT-NO_PRINT_LISTINFOS = 'X'.
      P_PRINT-NO_PRINT_SELINFOS  = ' '.
    ENDFORM.                               " BUILD_PRINT
          FORM PF_STATUS_SET                                            *
    NAME YOUR STATUS ALV. IF YOU NEED IT..                             *
    FORM PF_STATUS_SET USING EXTAB TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'ALV' EXCLUDING EXTAB.
    ENDFORM.                               " PF_STATUS_SET
          FORM USER_COMMAND_SAMPLE                                      *
    -->  UCOMM                                                         *
    -->  SELFIELD                                                      *
    FORM USER_COMMAND_SAMPLE USING UCOMM    LIKE SY-UCOMM
                               SELFIELD TYPE SLIS_SELFIELD.
      CASE UCOMM.
        WHEN 'MSXL'.                       " Export to Excel
         perform set_excel_export.
          CLEAR UCOMM.
        WHEN 'MM03'.
         set parameter id 'MAT' field selfield-value.
         call transaction 'MM03' and skip first screen.
          CLEAR UCOMM.
        WHEN 'BGR1'.
         perform fill_available.
         perform graph_available.
          CLEAR UCOMM.
        WHEN 'DOCU'.
         call function 'Z_HELP' exporting repname = repname.
      ENDCASE.
    ENDFORM.                               " USER_COMMAND
    *&      Form  WRITE_USING_ALV_SAMPLE
    *THIS IS A SAMPLE AND MUST BE WRITTEN DIRECTLY IN THE MAIN PROGRAM
    FORM WRITE_USING_ALV_SAMPLE.
    YOU CAN MERGE WITH A DATA DICTIONARY TABLE USING THIS:
    call function 'REUSE_ALV_FIELDCATALOG_MERGE'
          exporting
               i_program_name     = repname
               i_internal_tabname = 'I'
               i_inclname         = repname
          changing
               ct_fieldcat        = fieldtab.
    if sy-subrc <> 0.
       write: 'SY-SUBRC: ', sy-subrc, 'REUSE_ALV_FIELDCATALOG_MERGE'.
    endif.
    OR JUST DISPLAY IT USING THIS:
    call function 'REUSE_ALV_LIST_DISPLAY'
          exporting
               i_callback_program       = repname
               i_callback_pf_status_set = 'PF_STATUS_SET'
               i_callback_user_command  = 'USER_COMMAND'
               i_structure_name         = 'I'
               is_layout                = layout
               it_fieldcat              = fieldtab
               i_default                = 'A'
               i_save                   = g_save
               is_variant               = g_variant
               it_events                = events[]
               is_print                 = prints
          tables
               t_outtab                 = i.
    if sy-subrc <> 0.
       write: 'SY-SUBRC: ', sy-subrc, 'REUSE_ALV_LIST_DISPLAY'.
    endif.
    ENDFORM.                               " WRITE_USING_ALV
    thanks
    mrutyun^

  • Can not make XSQL servlet running under Jrun 3.1! need help

    Hi,
    I tried to run Oracle XSQL servlet under JRun 3.1,I did servlet mapping, such as
    <servlet-name>oracle-xsql-servlet</servlet-name>
    <servlet-class>oracle.xml.xsql.XSQLServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>oracle-xsql-servlet</servlet-name>
    <url-pattern>*.xsql</url-pattern>
    </servlet-mapping>
    I set classpath for XSQL related library such as oraclexsql.jar, xmlparserv2.jar,etc, I believe everything is setup correctly, however when I invoke .xsql page, I did not get data instead of getting sql text!, here is my xsql file content:
    <?xml version="1.0"?>
    <!-- reports.xsql: List of reports by user id -->
    <?xml-stylesheet type="text/xsl" href="Filter.xsl"?>
    <page connection="reports_8i" xmlns:xsql="urn:oracle-xsql">
         <dataform target="reportFilter.jsp" submit="Go">
    <xsql:set-session-param name="userid" value="{@userid}" ignore-empty-value="no"/>
         <xsql:include-param name="userid"/>
         <xsql:set-session-param name="bu_id" value="{@bu_id}" ignore-empty-value="no"/>
         <xsql:include-param name="bu_id"/>
         <xsql:set-session-param name="client_id" value="{@client_id}" ignore-empty-value="no"/>
         <xsql:include-param name="client_id"/>
         <item type="list" name="targetPage" label="Available Reports">
         <xsql:ref-cursor-function bind-params="userid">
                   reports_generation.getReportList(?)
              </xsql:ref-cursor-function>
              </item>
         </dataform>
    </page>
    What I got when I invoked this page is reports_generation.getReportList(?)!!
    It seems that JRun 3.1 did not understand xsql syntax, it means it can not find XSQL servlet related libraries, come on, I did set classpath.
    Does anyone has this experience to help me out? Highly appreicate you in advance.
    Thanks.

    i think i solved this problem by specifying the full path to javac...
    what must i do to avoid this?

  • In Firefox 4.0 with a Server with a self signed certificate using IPv6 I can not add a "Security Exception" for this certificate.

    In Firefox 4.0 I have a server ... it contains a self signed certificate. Using IPv6 I can not add a "Security Exception" for this certificate.
    1. I log onto the server (using IPv6). I get the "Untrusted connection page" saying "This connection is Untrusted"
    2. I click on "Add Exception.." under the "I understand the Risks" section.
    3. The "Add Security Exception" dialog comes up. soon after the dialog comes up I get an additional "Alert" dialog saying
    An exception occured during connection to xxxxxxxxx.
    Peer's certificate issuer has been marked as not trusted by the User.
    (Error code sec_error_untrusted_issuer).
    Please note that this works in Firefox 3.6.16 (in IPv4 and IPv6). It also works in Firefox 4.0 in IPv4 only IPv6 has an issue. What's wrong?

    Exactly the same problem, except I'm using FF v6 for Windows, not FF v4 as for the lead post. This is for a self-cert which IS trusted, although the error message says it isn't.

  • Can not catch exception in jsp?

    It sames that it is not a must to catch exception potentially throwed.The following snippet can work well.But if in a standard java file ,we should catch the naming exception.How to explain this phenomena?
    <%! int a=8;%>
              <%
              System.out.println("begin jsp");
              Hashtable h=new Hashtable();
              h.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
              h.put(Context.PROVIDER_URL,"jnp://127.0.0.1:1099");
              InitialContext ic=new InitialContext(h);
              CalcHome ch=(CalcHome) ic.lookup(CalcHome.JNDI_NAME);
              System.out.println("begin create cal");
              Calc c=ch.create();
              a=c.calcBonus(2,2);
              System.out.println(a);
              %>
              <%=a%>

    But don't forget to have isErrorPage="true" or it will ignore the try/catch, at least with my server (IPlanet).
    I have actually found it much nicer to have a full error page with JSP. All my JSP pages have errorPage set to an error.jsp and isErrorPage set to false.
    This means no try/catch blocks anywhere muddying up code. Just the error page has all the catches. I like it.

  • Exception thrown in EJB not captured in ManagedBean

    Hi. Im new in community.
    I have an EE project using JSF 1.2, EJB 3.0 deployed in Weblogic 10.3.6.
    My EJB that throws an Exception that is captured in my ManagedBean. However the exception does not reach to my ManagedBean.
    This exception should reload the page with an error message stating that the group already exists, but as the exception does not reach the ManagedBean, the page is not displayed with the error message.
    I appreciate the help. Rgrds.
    My web.xml
      <error-page>
        <exception-type>java.lang.Exception</exception-type>
        <location>/PRErrorPageView.faces</location>
      </error-page>
    My EJB:
    try {
                List<Grupo> grupos = findGrupoByName(grupo.getNomeGrupo());
                if (!grupos.isEmpty() && !alteraPermissao)
                    throw new GrupoException("msgErroGrupoNomeCadastrado");
    My ManagedBean:
    Here is the call of my EJB
    grupoServices.persisteGrupo(grupo, listCR, listCC, listCM, listCP, listMo, alteraGrupo, codigoTela, codigoUsuarioLogado);         
    cancelar();
    FacesUtil.addSuccessMessage("Grupo criado com sucesso!");
    } catch (GrupoException e) {
    logger.warning(e.getMsg());
    FacesUtil.addErrorMessage(e.getMsg());
    My class GrupoException:
    public class GrupoException extends ComponentException{
        /** The serialVersionUID */
        private static final long serialVersionUID = -6912605895523623154L;
            public GrupoException(String key){
            super(key);
    My ComponentException:
    public class ComponentException extends RuntimeException{
        /** The serialVersionUID */
        private static final long serialVersionUID = -2534006938034008594L;
        private String            msg;
        public ComponentException(String key) {
            String msgBundle = ResourcesUtil.getString(ResourcesUtil.MENSAGENS_FILE, key);
            this.msg = msgBundle;
    Weblogic log:
    ]] Root cause of ServletException.
    javax.faces.FacesException: #{cadastroGrupo.gravar}: javax.ejb.EJBException: EJB Exception: : br.com.telefonica.portal.services.exceptions.GrupoException
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl.persisteGrupo(GrupoServiceImpl.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
        at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
        at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy87.persisteGrupo(Unknown Source)
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.__WL_invoke(Unknown Source)
        at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.persisteGrupo(Unknown Source)
        at br.com.telefonica.portal.web.views.CadastroGrupoBean.gravar(CadastroGrupoBean.java:310)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
        at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
        at javax.faces.component.UICommand.broadcast(UICommand.java:387)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    ; nested exception is: br.com.telefonica.portal.services.exceptions.GrupoException
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
        at javax.faces.component.UICommand.broadcast(UICommand.java:387)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
        Truncated. see log file for complete stacktrace
    Caused By: javax.faces.el.EvaluationException: javax.ejb.EJBException: EJB Exception: : br.com.telefonica.portal.services.exceptions.GrupoException
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl.persisteGrupo(GrupoServiceImpl.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
        at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
        at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy87.persisteGrupo(Unknown Source)
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.__WL_invoke(Unknown Source)
        at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.persisteGrupo(Unknown Source)
        at br.com.telefonica.portal.web.views.CadastroGrupoBean.gravar(CadastroGrupoBean.java:310)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
        at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
        at javax.faces.component.UICommand.broadcast(UICommand.java:387)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    ; nested exception is: br.com.telefonica.portal.services.exceptions.GrupoException
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
        at javax.faces.component.UICommand.broadcast(UICommand.java:387)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
        Truncated. see log file for complete stacktrace
    Caused By: javax.ejb.EJBException: EJB Exception: : br.com.telefonica.portal.services.exceptions.GrupoException
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl.persisteGrupo(GrupoServiceImpl.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.oracle.pitchfork.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:34)
        at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
        at com.oracle.pitchfork.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:42)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
        at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
        at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
        at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
        at $Proxy87.persisteGrupo(Unknown Source)
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.__WL_invoke(Unknown Source)
        at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:39)
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl_k21zc8_GrupoServicesLocalImpl.persisteGrupo(Unknown Source)
        at br.com.telefonica.portal.web.views.CadastroGrupoBean.gravar(CadastroGrupoBean.java:310)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.el.parser.AstValue.invoke(AstValue.java:187)
        at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
        at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
        at javax.faces.component.UICommand.broadcast(UICommand.java:387)
        at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:475)
        at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:756)
        at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
        at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    ; nested exception is: br.com.telefonica.portal.services.exceptions.GrupoException
        at weblogic.ejb.container.internal.EJBRuntimeUtils.throwEJBException(EJBRuntimeUtils.java:156)
        at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:887)
        at weblogic.ejb.container.internal.BaseLocalObject.handleSystemException(BaseLocalObject.java:818)
        at weblogic.ejb.container.internal.BaseLocalObject.postInvoke1(BaseLocalObject.java:517)
        at weblogic.ejb.container.internal.BaseLocalObject.__WL_postInvokeTxRetry(BaseLocalObject.java:455)
        Truncated. see log file for complete stacktrace
    Caused By: br.com.telefonica.portal.services.exceptions.GrupoException
        at br.com.telefonica.portal.services.impl.GrupoServiceImpl.persisteGrupo(GrupoServiceImpl.java:93)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        Truncated. see log file for complete stacktrace

    Tao,
              > If your ejb method is in a transaction context, then you throw application
              exception, the container will try to commit the transaction.
              In the case of an application exception, the caller will be responsible for
              committing or rolling back the transaction. (A runtime exception will roll
              back the transaction automatically.) That is why, if you use CMT, that the
              EJB methods call from outside the EJB container (such as from a servlet)
              should never be able to throw runtime exceptions.
              Peace,
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Tao Zhang" <[email protected]> wrote in message
              news:3a33c04a$[email protected]..
              >
              > Hi,
              > It's ok because you look after the transaction yourself. probably you use
              the default transaction attribute 'Supports'.
              >
              > If your ejb method is in a transaction context, then you throw application
              exception, the container will try to commit the transaction.
              >
              > Hope this can help.
              > Tao Zhang
              >
              > "Gormless" <[email protected]> wrote:
              > >
              > >When I throw an application exception from within a statless session bean
              which uses jdbs for DB Lookup Only I get
              > >"Exception thrown in non-transactional EJB invoke".
              > >
              > >As this is a llokup only I have no Transaction Management
              >
              

  • Can not make force-update="true" in orion-ejb-jar.xml

    if you make force-update="true" in the orion-ejb-jar.xml, even a simple entity bean can not be deploy to oc4j 9.0.3.
    can anybody tell me if it is a bug?
    Auto-deploying file:/D:/testdir/fromdbms/Project1/classes/ (No previous deployment found)... Country_EntityBeanWrapper2.java:1567: unclosed string literal
    if(com.evermind.server.ApplicationServer.DEBUG) debug("update COUNTRY set CODE = ?, NAME = ? where UNIQUEID = ?
    ^
    Country_EntityBeanWrapper2.java:1568: ')' expected
    PreparedStatement statement = connection.getCustomStatement("update COUNTRY set CODE = ?, NAME = ? where UNIQUEID = ?");
    ^

    I use jdeveloper 903 version to create only one entity bean, and set the force-update=true in the orion-ejb-jar.xml, when verify it, it is ok, when deploy it to the oc4j 903 version, it throws error message.
    you may try it using jdeveloper 9.0.3 version.

  • Applet can not read from servlet because of java.io.EOFException

    Hi all,
    i try to communicate my applet with a servlet. i examine lots of codes from internet and i did lots of things to get a working sample but i couldn't sucess on this work for 2 days so if anyone can help me i will be very happy.
    Anyway, here is the code snippets :
    1- Applet side code to send data (serializabed object) to servlet :
       // Opening connection...
       URL urlServlet = new URL("http", "81.214.190.3", 8080, "/pwta/pwtax");
       URLConnection connection = urlServlet.openConnection();
       // Setting attributes...
       connection.setDoInput(true);
       connection.setDoOutput(true);
       connection.setUseCaches(false);
       connection.setDefaultUseCaches(false);
       connection.setRequestProperty("Content-Type",
                                                                  "application/octet-stream");
       OutputStream outputStream = connection.getOutputStream();
       ObjectOutputStream objectOutputStream = new ObjectOutputStream (outputStream);
       objectOutputStream.writeObject(islem);
       objectOutputStream.flush();
       objectOutputStream.close();
       // Receiving result from servlet...
      // Exception is thrown at line 71! Detail is written at bottom of message!
      InputStream inputStream = con.getInputStream(); // line 71 is here!!!
      ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
      returnValue = (Sonuc) objectInputStream.readObject();
      objectInputStream.close();
      inputStream.close();
    2- Server side code which read data and sendit after processing  to   applet  :
    // Reading requirement... Implementation is done in doPost() method!
        InputStream in = request.getInputStream();
        ObjectInputStream inputFromApplet = new ObjectInputStream(in);
        Islem islem = (Islem) inputFromApplet.readObject();
        inputFromApplet.close();
        // Doing the required job!
       setMapperAndDoTheJob(islem);
       // Writing the result to user...
       OutputStream outstr = response.getOutputStream();
       ObjectOutputStream oos = new ObjectOutputStream(outstr);
       oos.writeObject(sonuc);
       oos.flush();
       oos.close();
    //  *************************************************************************When i run my applet the following exception is thrown :
    java.io.EOFException
    at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
    at java.io.ObjectInputStream$BlockDataInputStream.readShort(Unknown Source)
    at java.io.ObjectInputStream.readStreamHeader(Unknown Source)
    at java.io.ObjectInputStream.<init>(Unknown Source)
    at tr.com.proksis.pwta.domain.PWTAProcessor.transferProcess(PWTAProcessor.java:71)
    Best Regards,
    eRoHaN

    get it working using a text transfer before you use and object transfer

  • Why I can not release the memory except I run System.exit()

    I have an application which runs over night. (more than 8 hours)
    after a certain period I stopped the applicatin(but it doesn't exit from JVM) reset all the object and run System.gc().
    I am sure ther is not references point to the object.
    it seams JVM hold the memory and memory is not released.
    Questions:
    1. whether JVM will "hold" memory?
    2. Is there a method to focerly release memory?
    Thanks a lot!
    Qi

    Questions:
    1. whether JVM will "hold" memory?I've notice with version 1.4.0 that it starts to release memory when about 90% of the total memory allocated is free of use.
    2. Is there a method to focerly release memory?
    No.. But you can provide it with a hint by using the System.gc();

  • Can not compile a servlet!

    Hi!
    so.. I import
    import javax.servlet.*;
    import javax.servlet.http.*;
    ..and then I write mi servlet. But javac tels me :
    HttpServlet .. no such thing !
    What shall I do ?

    do you have servlet.jar included in your classpath? do you have a servlet runner? if not, go to jakarta.apache.org and download tomcat.

  • I have two Win 7 PCs running iTunes 10.7.0.21 one is a 64 bit maching and the other is a 32 bit.  I can see the Air Play on both and can see the AE speakers, however, for some reason I can not select any speakers except the PC speakers on the 32 bit PC.

    This problem only started after I updated iTunes to version 10.7.0.21.  Never had a problem with the AE speakers until now.  Funny no problem on my 64 bit PC only the 32 bit one.

    If you are running win 7, i had this problem come up when i updated my itunes 10.7, btw it now runs like a dog, on slighty older hardware in win 7, hopefully version 11 fixes this!!!!!!
    Go here, apparently firewall settings for itunes can be reset, so you need to add back in udp access, and change it to public.
    http://blog.forret.com/2010/10/fix-for-error-15000-remote-speakers-on-itunes-win dows-7/

  • How to catch exception thrown from a function module?

    Hi all,
             When we are calling a function module from JSPDynpage setting some import parameters, If in some case an exception is thrown in the function module.  How can we catch the same exception in the JSPDynpage program?
    Thanks & Regards,
    Ravi

    Hi Ravi
                                    Try this
                                                try
                    Object retMsgs = output.get(bapiretrunmsgobject);
                      if(result != null )
    IrecordSet rmsg = (IrecordSet) result
                   catch(Exception ex)
                        printException(ex, "Error getting function result");
    Lemme know for any further questions.
    Regards
    Praveen

  • Catching all possible exceptions in gui thread

    Hi,
    I have such a problem: I am developing Swing app and sometimes it crashes by throwing an Exception which I don't catch. The effect is that this exception prints stack trace on System.err but user is not notified and wonders what is happening... I would prefer to show custom ErrorDialog with stacktrace.
    I am searching for simple and effective way to catch every possible exception thrown from within any library. I think of a few ways from which everyone has some disadvantages.
    The ideal way would be replacing AWT event queue dispatcher so I could process every GUI event inside try { } catch (Exception e) {} block. That would be a good place to catch all exceptions. Unfortunately I don't know if it is possible.
    For now I am trying such a solution:
    I start background thread together with main app. Then I redirect System.err and System.out streams to PipedStream connected to this background thread. This thread can analyze anything that is going to System.err and maybe recognize potential exception stacktraces. Then it can notify main thread of an exception. But it is not ideal as I have to parse the stream and it can always be not ideal in exception recognition. And the code is quite costly.
    Do you have any ideas, had similar problems?

    But how can I cause GUI thread to run in my thread
    group? As I suppose GUI thread is started by JVM and
    is something separate from my code - I can get a
    reference to GUI thread but don't know how to
    manipulate or replace it...One alternative is to completely separate the GUI code from your code.
    Your code, which is wrapped in appropriate try/catch blocks, runs on its own thread and does its own processing. When it's done with that processing, it queues the results on the event thread for display. If an exception occurs during your processing, then you queue something that notifies the GUI.
    The simplest way to implement this is to spawn a new thread for each operation. The Runnable that you give to that thread looks like the following:
    public MyOperationClass implements Runnable
        public void run()
            try
                // do your exception-generating code here
                SwingUtilities.invokeLater( new MyGUIUpdateClass(param1, param2));
            catch (Exception e)
                SwingUtilities.invokeLater(new MyExceptionReporter(e));
    }This is only a bare-bones solution (and hasn't been compiled). Since it separates the GUI from actual processing, you'll probably want to display a wait cursor while the processing thread is doing its thing. You'll probably end up implementing a class that implements this pattern. You may also want to create a producer-consumer thread, so that the user won't invoke, say, a dozen different operations at once.
    However, this sort of code is absolutely essential to Swing programming. Most apps do extensive non-GUI processing, such as database queries. If you run such queries in the GUI thread, your GUI will freeze.
    Sun has named this pattern "SwingWorker", although I don't think they've fleshed it out very fully: http://java.sun.com/products/jfc/tsc/articles/threads/threads2.html

  • Application error not catched

    Hi,
    we are calling an RFC synchronously from BPM. This is a standard BAPI, that does not have any RFC exception message (BAPI_IPAK_START and BAPI_ISREQUEST_GETSTATUS). We are only able to catch system errors, since no RFC exception message is avaiable for which we could define a different exception branch.
    If an error happens in the RFC, an application error is thrown, which is not catched in the exception branch defined to handle the system error. After the application error, the process simply terminates- that's it.
    Why is an application error not catched as system error? Is there any way to catch an application error and let the business process continue?
    Your help will be rewarded,
    Volker

    Hi Volker,
    a BAPI does not throw any exception, therefore you cannot catch any.
    - You could write a wrapper RFC around the BAPI which interprets the RETURN structure and throws exception in case of an error.
    - You could have a fork in the BPM depending of the entries in RETURN.
    Regards
    Stefan

  • How can we handle user defined exceptions in ejbStore() of entity bean

    Accroding to my knowledge in ejbStore we can not handle user defined exceptions. Can anybody help on this????

    In my case I am calling a method from ejbsotre() . In that method i wanted to put some checks according to that i wanted to throw exceptions.
    In this case how would I handle exceptions.
    Can you suggest in this case,please !!!

Maybe you are looking for