Exception is not caught in the catch.

Hi,
In my application an exception is thrown but it doesn get caught in the inner catch but at the outermost catch.
809 throw Exception("Cannot Assign", 1120,)
(dbx) next
dbx: warning: can't find symbolic information for thrown type (missing N_LSYM/YR stab?)
dbx: warning: can't find symbolic information for thrown type (missing N_LSYM/YR stab?)
t@3 (l@3) exception will transfer flow to or past '_ex_debug_handshake1'
Use step or next to get to the catch location
stopped in __exdbg_notify_of_throw at 0xfb794a3c
0xfb794a3c: __exdbg_notify_of_throw : retl
dbx: warning: can't find symbolic information for thrown type (missing N_LSYM/YR stab?)
(dbx) where
current thread: t@3
=>[1] SelectionImpl::AssignCart(this = 0x4ab9f8, cart = CLASS), line 809 in "RouteImpl.cpp"
[2] Selection::AssignCart(this = 0x556de8, cart = CLASS), line 477 in "Route.cpp"
[3] CaseBase::RetailRoute(this = 0x4508d0), line 1595 in "CaseBase.cpp"
[4] CaseBase::Assignment(this = 0x4508d0), line 1542 in "CaseBase.cpp"
[5] CaseBase::acceptCart(this = 0x4508d0, cartNbr = CLASS), line 1175 in "CaseBase.cpp"
[6] CaseIF::acceptCart(this = 0x472f40, cartNbr = 0x4c66b8 "00010", error = CLASS), line 515 in "CaseIF.cpp"
AssignCart throws an exception which should get caught in CaseBase::AssignCart instead it gets caught in the catch block of CaseIF::acceptCart.
Thanks in advance for your help.
Thanks,
Santosh A.

Exceptions/Errors are thrown and catch the same for static and non-static methods.
You cannot have fields or methods which are "outside" a class.
The only thing "outside" a class is a package, AFAIK.
The reason your exception is going to the console if because the exception is not being caught.
So is there anyway I can catch this exception and do a gracefully exit using the a static method?You need to place a try catch for this exception. Have a look at the stack trace to see where you could place this to catch the exception.

Similar Messages

  • Resteasy in-built exceptions not caught in the exception mapper

    Hi friends,
    I have written some exception mappers to catch and handle the in-built rest easy exceptions like NotFoundException,MethodNotAllowedException, etc., Sample code as shown:
    @Provider
    public class NotFoundExceptionMapper implements ExceptionMapper<org.jboss.resteasy.spi.NotFoundExc eption>
    @Override
    Response toResponse(org.jboss.resteasy.spi.NotFoundExceptio n exception) {
    return Response.status(500).build();
    I have also written a try catch block in my web filter class. Whenever a NotFoundException occurs, it is not caught in the mapper, but it goes to the catch block in the Filter.
    Whereas I have tried another exception mapper class to handle JsonParsingException. This is working correctly and giving a proper response from the mapper whenever a Json Parse exception occurs.
    The issue is only with the case of resteasy inbuilt exceptions.
    Also, the Provider has been registered in the application context using the include-filter tag inside component scan.
    Is there any additional configuration to be done for this?
    Please guide me as to what needs to be done to catch rest easy in-built exceptions in the mapper class itself.
    Regards,
    RM

    Cross posted
    http://stackoverflow.com/questions/10251640/resteasy-in-built-exceptions-not-caught-in-the-exception-mapper
    http://www.java-forums.org/advanced-java/58655-resteasy-built-exceptions-not-caught-exception-mapper.html
    db

  • Pop Up blocker exceptions are not saved in the browser for use, the next time the PC reboots. How do you save these exceptions for long term use?

    Pop Up blocker exceptions are not saved in the browser for use, the next time the PC reboots. How do you save these exceptions for long term use?

    In case you are using "Clear history when Firefox closes":
    *do not clear the Site Preferences
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/remove-browsing-search-and-download-history
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.
    If you have software like Advanced SystemCare (Surfing Protection feature) that might reset some files to older versions to protect these files against changes then check the settings or uninstall this software.

  • Cfajax Exception thrown not caught

    I'm trying to use the new coldfusion 8 ajax features, but I
    receive this error in the Ajax debug window: "window:global:
    Exception thrown and not caught"
    The result of the ajax cfc call shows correctly in the debug
    window, but never makes it back to my code because of this error.
    sample code:
    <javascript>
    function getUserName(userId) {
    var myTest = new myTestCFC();
    var thisUserName = myTest.getName(userId);
    alert(thisUserName);
    <in body of html>
    <cfajaxproxy cfc="myTestCFC" />
    Any ideas?

    Yes, I have encountered this. What I found out is that if I
    have content in my application.cfc page the results for cfselect
    will not make it back to the dropdowns even though the debug window
    shows that the values are there. I had my footer info in the
    application.cfc. Once I removed that I did not receive the
    exception. I found this from
    Ben
    Forta's blog toward the bottom of the page in the comments
    section.
    Now that I have taken that out when I go to my form the
    dropdowns work correctly but when I select anything from the
    dropdowns I can't reference them. Such as #form.cfselected_value#.
    So I'm going to go back to my application.cfc and start stripping
    items out again to see if there is something there causing the
    issuse. If anyone has an answer for this please let me know.
    Thanks
    Lisa

  • Reg: Exception (ALT NOT FOUND) in the fun.module CS_BOM_EXPL_MAT_V2

    Hi Experts,
    I called the fun. module CS_BOM_EXPL_MAT_V2 in SE38.
    While executing the function module, it is giving output for some types of material like (TP0331-).
    But it is raising the exception ALT NOT FOUND for some types of material like 'TB1000-'
    But for all types of material, it is giving correct output in SE37.
    I gave the input parameter's,
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
    EXPORTING
       CAPID                       = 'PP01'
       DATUV                       = sy-datum
       EMENG                       = '1'
       MKTLS                       = 'X'
       MEHRS                       = 'X'
       MTNRV                       = 'TB1000-'
       STLAL                       = '1'
       STLAN                       = '1'
       SVWVO                       = 'X'
       WERKS                       = '0010'
       VRSVO                       = 'X'
      TABLES
        stb                         = it_stpox
    EXCEPTIONS
       ALT_NOT_FOUND               = 1
       CALL_INVALID                = 2
       MATERIAL_NOT_FOUND          = 3
       MISSING_AUTHORIZATION       = 4
       NO_BOM_FOUND                = 5
       NO_PLANT_DATA               = 6
       NO_SUITABLE_BOM_FOUND       = 7
       CONVERSION_ERROR            = 8
       OTHERS                      = 9
    Can you please suggest me, why for the particular types of material, these function module is executing correctly in SE37 not in SE38.
    Whether i need to give some more inputs in SE38.
    Please guide me,
    Thanks in advance,
    Vijay.R

    hi,
    i have done the code like this,
    CALL FUNCTION 'CS_BOM_EXPL_MAT_V2'
    EXPORTING
    CAPID = 'PP01'
    DATUV = sy-datum
    EMENG = '1'
    MKTLS = 'X'
    MEHRS = 'X'
    MTNRV = 'TB1000-'
    STLAL = '01'  """" i have changed the value as 01 instead of 1.
    STLAN = '1'
    SVWVO = 'X'
    WERKS = '0010'
    VRSVO = 'X'
    TABLES
    stb = it_stpox
    EXCEPTIONS
    ALT_NOT_FOUND = 1
    CALL_INVALID = 2
    MATERIAL_NOT_FOUND = 3
    MISSING_AUTHORIZATION = 4
    NO_BOM_FOUND = 5
    NO_PLANT_DATA = 6
    NO_SUITABLE_BOM_FOUND = 7
    CONVERSION_ERROR = 8
    OTHERS = 9
    it is a small problem..
    whether u need any more information..
    please let me know.. still it is not working means,
    paste your code.. i will check
    regards
    vijay

  • Error while activating ODS is not caught in the back ground job..

    Hi All,
    We have a back ground job to load data to ODS and to activate it..If there is any error while loading or activating the data, back ground job is going into loop instead of cancelling the job..As the job is going into loop we are unable to trace the error unless we cancel the job manually and checking it..We have switched off displaying any messages while doing the back ground job...also we can not set any time limit for the job as it always depends on the volume of the data.
    My requirement is , back ground job must get cancelled if there is any error while loading the ODS..Can anybody suggest any idea on this..
    Thanks for reading.
    Umamaheswar kumar

    Hi Uma,
    A few hints for running and schedule and monitoring process chains:
    - always schedule the process chain in tcode RSPC
    - check the log in RSPC for error messages, or
    - check BW monitor for the ODS concerned (tcode RSMO, tab Details)
    if anything is not working fine, the status of the corresponding load will show you the errors, warnings ...
    either in RSPC - log or RSMO.
    hope it helps.
    Regards,
    Lilly

  • An exception event is caught by the trace command, but not by java command

    I am having a strange exception in the output of the trace command. The exception is only happening if I instantiate a new object in test class (I have included the code below).
    This is the exception is the output of trace:
    ThreadName: ====== main ======
    methodEntryEvent: main -- simplestTest location:simplestTest:13
    | Exception event found: instance of java.lang.ClassNotFoundException(id=39) catch: java.lang.ClassLoader:303 exception details: class com.sun.tools.jdi.ObjectReferenceImpl
    | Exception event found: instance of java.lang.ClassNotFoundException(id=40) catch: java.lang.ClassLoader:303 exception details: class com.sun.tools.jdi.ObjectReferenceImpl
    | Exception event found: instance of java.lang.ClassNotFoundException(id=40) catch: java.lang.ClassLoader:303 exception details: class com.sun.tools.jdi.ObjectReferenceImpl
    | methodEntryEvent: <init> -- Tutti location:Tutti:22
    | | methodExitEvent: <init> -- Tutti
    | methodEntryEvent: <init> -- Tutti location:Tutti:22
    | | methodExitEvent: <init> -- Tutti
    | methodExitEvent: main -- simplestTest
    Death of ThreadName:====== main end ======
    -- The application exited --
    This is the very simple test class:
    public class simplestTest {
        public static void main(String[] args) {
            int x = 10;
            System.out.println("hello test");
            Tutti tuttike;
            tuttike = new Tutti();
            Tutti tuttike2;
            tuttike2 = new Tutti();
    class Tutti {   
    }If I do not have any instantiations, I do not have the exception in the trace output. Also, if I run the above test application normally (with the java command), I do not have these exceptions.
    Anybody have an idea?

    Indeed, in jdb I do not get these exceptions. I was also about to say that running the trace tool from the command line (not from within Netbeans as before) yielded a slightly more detailed result:
    -- VM Started --
    ThreadName: ====== main ======
    methodEntryEvent: main  --  simplestTest location:simplestTest:13
    | Exception event found: instance of java.lang.ClassNotFoundException(id=39) cat
    ch: java.lang.ClassLoader.loadClass(java.lang.String, boolean)+39 exception deta
    ils: class com.sun.tools.jdi.ObjectReferenceImpl
    | Exception event found: instance of java.lang.ClassNotFoundException(id=40) cat
    ch: java.lang.ClassLoader.loadClass(java.lang.String, boolean)+39 exception deta
    ils: class com.sun.tools.jdi.ObjectReferenceImpl
    | Exception event found: instance of java.lang.ClassNotFoundException(id=40) cat
    ch: java.lang.ClassLoader.loadClass(java.lang.String, boolean)+39 exception deta
    ils: class com.sun.tools.jdi.ObjectReferenceImpl
    | methodEntryEvent: <init>  --  Tutti location:Tutti:22
    | | methodExitEvent: <init>  --  Tutti
    | methodEntryEvent: <init>  --  Tutti location:Tutti:22
    | | methodExitEvent: <init>  --  Tutti
    | methodExitEvent: main  --  simplestTest
    Death of ThreadName:====== main end ======
    -- The application exited --But I now understand this is completely normal behavior. What a strange way to signal class loading... In my own, much more elaborate debugging application, I have now signaled through JDI not to report these exceptions anymore.
    A question, is there a reason for this behavior?

  • Exception not caught

    Hi all.
    At my new customer, I have to implement webdynpro applications. The problem is that when I want to test the application, IE displays a message like this:
    "The following error text was processed in the system EPB : An exception occurred that was not caught.
    "The ABAP call stack was:
    Method: CHECK of program CX_FQDN=======================CP
    Method: LATE_CONSTRUCTOR of program CL_WDR_UCF====================CP
    Method: HANDLE_REQUEST of program CL_WDR_UCF====================CP
    Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
    Method: EXECUTE_REQUEST of program CL_HTTP_SERVER================CP
    Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
    Module: %_HTTP_START of program SAPMHTTP
    I have no idea what the problem is. All the necessary services are activated in SICF.
    Thanks for your help
    Nicolas

    Hi,
    it's about the fully qualified domain name (FQDN), see the <a href="http://help.sap.com/saphelp_nw70/helpdata/en/67/be9442572e1231e10000000a1550b0/frameset.htm">documentation</a>
    Regards, Heidi

  • Exception not caught while executing web dynpro application

    Hello all,
    I'm getting run time error exception CX_WDR_RR_EXCEPTION not caught when running web dynpro application
    The error analysis shows the custom component is locked by the user and cannot be regenerated. But I checked in SM12 for locked entries and component was not listed there.
    The program terminated in the include LWDR_RUNTIME_REPOSITORYF12
    Please suggest how to resolve the isse?
    Regards,
    anil

    sorry...posted in wrong forum...

  • Exception not caught soalris 8

    hi,
    I am building my executable on following platform
    SunOS 5.8 Generic sun4u sparc SUNW,Ultra-Enterprise
    using following compiler
    CC: WorkShop Compilers 5.0 98/12/15 C++ 5.0
    The problem is when I build the excutable in debug mode i.e by giving -g option the exception which i throw is caught in the catch statement.
    But when its a non debug build i.e removing -g the exceptions dont get caught instead i get something like
    Terminating<E0> E0
    Same code with same compiler works proper on soalris 6.
    When used dbx on non debug build , it says that the class which i throw is never caught. How is it possible when its getting caught in debug build?
    I searched the forums database and found some similar queries ,but no answers to them
    Can anybody help me in this matter.
    Any patch which i need to install , as my m/c doesnt have any patches installed as of yet
    Thanks and Regards
    Amol

    Does the bug 4400676 relate to whatever i am talking . If it is so then what patch no shd I use.

  • 'exception thrown but not caught' error on the url iview

    Hi,
    EP6, we have url iview that is working fine for displaying a web application. but the problem is some of the link on the web application throws 'exception thrown but not caught' error. it happens to some of the users though.

    Hi Mokone
    I agree with Raghvendranath statement.
    This is not portal side problem.U just using URL of that application
    Also do this
    Open the URLiView editor and check the Fetch Mode property value.
        Launch the same URL in a new browser window (not in the portal).
        Change the URLiView Fetch Mode property from Server-Side to Client-Side.
        The iView is using the Server-side fetching mode but no proxy is defined for the portal
    Hope this info help you
    Regards
    Ruturaj

  • Pl/sql exception not caught.

    This program should give me an error "table or view does not exist" caught by the pl/sql exception, as dba_data_file1 table does not exist.
    However all that it returns is Input truncated to 3 characters
    Q1. Why?
    Q2. How can I remove this message "Input truncated to 3 characters. Where is this message comming from?
    #!/bin/ksh
    sqlplus -s << EOF
    abc/[email protected]
    set pages 0
    SET SERVEROUTPUT ON BUFFER 100000000
    BEGIN
    dbms_output.ENABLE(1000000);
    SELECT
    round(sum(bytes)/1024/1024/1024),
    round(sum(free_bytes)/1024/1024/1024),
    TRUNC(SYSDATE)
    from
    (SELECT tablespace_name, BYTES, 0 FREE_BYTES FROM dba_data_files1
    UNION ALL
    SELECT tablespace_name, 0, BYTES FROM dba_free_space
    union all
    SELECT tablespace_name, BYTES, 0 FROM dba_temp_files
    union all
    SELECT 'REDO-LOGS', b.BYTES, 0
    FROM v\\$logfile a, v\\$log b
         WHERE
    a.GROUP# = b.GROUP#);
         dbms_output.put_line("ok ");
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line("Error "||SQLERRCODE ||":"|| SQLERRM);
    exit 1
    END;
    exit 0
    EOF
    $> tstrun.ksh
    Input truncated to 3 characters

    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line("Error "||SQLERRCODE ||":"|| SQLERRM);
    exit 1
    END;
    if you catch exception, process it then you must reraise it. its a general mistake found when you are using others instead of name exception, so remember whenever you use others you must reraise the exception

  • Database adapter exception not caught

    Hello,
    I am testing a BPEL orchestration that was running overnight. This process was handling a lot of database transactions that would take quite some time to run. Sometime during the run the database adapter could not connect and an exception was thrown causing the instance to go into an open.faulted state. In the BPEL orchestration I have a Catch-All at the global scope to handle all uncaught exceptions, but apparently this one exception did not get caught. I have had database exceptions thrown and caught previously in other runs, but I am concerned why this one was not handled. Can anyone provide some insight on why this happened and how this can be prevented. I am using 10.1.3.4
    Thanks,
    Jim

    What was the fault. Have you any faults / configuration defined in the BPEL fault framework?
    cheers
    James

  • Exceptions not caught in shared library when compiled under Sun Studio 9

    I realize it's a fairly old version of Sun Studio, however if at all possibly we'd like to avoid updating to the latest.
    Sun Studio 9, version reports
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/cc": Sun C 5.6 2004/07/15
    version of "/opt/SUNWspro/bin/../prod/bin/../../bin/CC": Sun C++ 5.6 2004/07/15
    uname -a
    SunOS sunblade 5.9 Generic_118558-27 sun4u sparc SUNW,Sun-Blade-100
    The problem is within our shared library a function calls another method within a try/catch block. This method then sometimes throws an exception which does have a matching catch block. On all other systems (Windows, AIX, HP-UX, Linux) the code works, the exception is caught and handled. On Solaris with Sun Studio 9 though, the exception is ignored and instead triggers an abort and core dump.
    Stack Trace:
    ffffffff7daa871c lwpkill (6, 0, ffffffff7fffd9c0, ffffffff7d3064d4, 2, ffffffff7fffd9ec) + 8
    ffffffff7da3e4b8 abort (ffffffff7d40dac8, ffffffff7d40cc38, ffffffff7d411e78, 10604c, 2, ffffffff7d40dac8) + 100
    ffffffff7d3064d4 __1cH__CimplRdefault_terminate6F_v_ (ffffffff7d40dac8, ffffffff7d40cc38, ffffffff7d411e78, 10604c, 104e40, ffffffff7d3064d0) + 4
    ffffffff7d3062b4 __1cH__CimplMex_terminate6F_v_ (ffffffff7d40de40, 0, 0, ffffffff7d40de40, ffffffff7d40c978, 1) + 24
    ffffffff7d306f04 exthrow_body (ffffffff7d40de40, 0, 0, 105af4, 52, ffffffff7d40e2e8) + 84
    ffffffff7d306e58 __1cG__CrunIex_throw6Fpvpkn0AQstatic_type_info_pF1_v_v_ (ffffffff7d40dec8, ffffffff7f0dea78, ffffffff7ecb6b28, ffffffff7d40de40, 0, ffffffff7d40de40) + 3c
    ffffffff7ecb6d90 __1cLIGExceptionFThrow6FnQenumIGErrorCodes_pkcxxp2x_v_ (fffffffffffff3e3, 0, 0, 0, ffffffff7f1187da, a0) + 80
    ffffffff7ecb6e78 __1cOThrowException6FnQenumIGErrorCodes_pkcxxp1x_v_ (fffffffffffff3e3, 0, 0, 0, ffffffff7f1187da, a0) + 30
    ffffffff7f083304 __1cSIGRasterProcessingNVerifyPalette6FpnMIGRasterPage_nTenumIGContrastModes__v_ (1001f3c10, 0, 0, 0, 0, 0) + b4
    ffffffff7f083760 __1cSIGRasterProcessingOInvertContrast6FpnMIGRasterPage_nTenumIGContrastModes_nTenumIGColorChannels_pnPtagAT_RECTANGLE__v_ (1001f3c10, 0, 0, ffffffff7fffe1a8, 0, 0) + 20
    ffffffff7f039a2c iIG_IP_contrast_invert (1001f3c10, 100162b10, 0, 0, 0, 0) + 104
    ffffffff7f039ba0 iIG_IP_contrast_invert_masked (1001f3c10, 100162b10, 0, 0, 0, 0) + 80
    000000010000b4e0 ipcontrast_invert_notify (10014d000, 10014d, 0, 100000, 100162000, 100162) + 48
    Try/catch block:
         try
              <Triggering function>
         catch(const IGException& ige)
              <Handling Code>
    The code which throws the exception is a static method of IGException which has a basic throw line:
         throw IGException(...);
    Source code is compiled with the following flags, none of which I could find any info to suggest affect this:
    CC -c -Xt -xCC -misalign -xarch=v9 -O
    Linking of the shared object is then done via the following, again nothing obvious that could cause issues. mapfile is an empty file.
    ld -o <outputfilename> -G -z textoff -M mapfile -z noversion -64 -h <outputfilename> <object files> -L/opt/SUNWspro/lib/v9 -lCrun -lX11 -lc -lm
    I did read somewhere mentioning to make sure to use RTLD_GLOBAL if using dlopen on the .so, but the test app is using ld to link the library.
    Does anyone have any ideas why with the Sun Studio 9 compiler these exceptions are not being caught? Based on the fact they are caught on all other compilers, i'm guessing this issue is with the compiler.
    Also, as a test it seems that if the shared object is not built as a 64-bit object, then everything works. The issue only seems to occur when it is a 64-bit object. Likely an issue with the 64-bit compiling?
    Edited by: 837682 on Feb 17, 2011 9:23 AM

    As the other poster pointed out, you need to link the shared library using CC, not ld. I should have noticed that error in the original post.
    Try using CC instead of ld in your link command. The CC command causes additional files to be linked into the shared library that are required for proper operation, and particularly for exception handling. I think that is the actual source of your problem.
    You should not use -L options that point into the compiler installation area, and when you use CC to link, you don't need to.
    I'm surprised that you seem to have a copy of libCrun.so.1 in the compiler installation area -- that should not be the case. The the only versions of libCrun should be static libraries libCrun.a. You almost never want to link with a static version of a system library, and absolutely never when building a shared library. The file /opt/SUNWspro/lib/libCrun.so.1 ought to be a symbolic link pointing to /usr/lib/libCrun.so.1, but if that were the case, the version command would have the same output.
    By any chance, did you install your compiler by copying it from another installation? If you do that, you need to use tar, not cp, to ensure that symbolic links are preserved.

  • How to print out the exception caught in the servlet controller to JSP?

    May I know how to print the Exception caught and the stacktrace thing? What i try to do this in the databaseErrata.jsp code was not given me any answer. Instead, causing a number of errors.
    Below are my servlet controller code and databaseErrata.jsp code.
    ----$CATALINA_HOME/webapps/mvct/WEB-INF/classes/Action.java----
    import java.io.*;
    import java.sql.*;
    import java.text.*;
    import javax.naming.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import foo.*;
    public class Action extends HttpServlet
      public void doGet(HttpServletRequest request,
    HttpServletResponse response)
        throws ServletException, IOException
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();
        // find real web resource
        String forward = request.getServletPath();
    //'forward' is a string variable consist of url
        if(forward.endsWith(".do"))
          forward = forward.substring(1, forward.length()
    -3) + ".jsp";
        else
          throw new ServletException(
          "Action servlet called with illegal path: " +
    forward); //display the defined error msg and error
    url within the 'forward'
    out.println("forward after forward.substring() = " +
    forward + "</br>");
        // build and validate view page attributes
        HttpSession session = request.getSession();
        try
          byEmployeeId convert =
    (byEmployeeId)session.getAttribute("convert");
          if(convert == null)
            session.setAttribute("convert", convert = new
    byEmployeeId());
          convert.start("11145");
        catch(NamingException ex)
          request.setAttribute("exception", ex);
          forward = "databaseError.jsp";
        catch(SQLException ex)
          request.setAttribute("exception", ex);
          forward = "databaseErrata.jsp";
        catch(IllegalArgumentException ex)
          request.setAttribute("message", "<FONT COLOR='red'>"+ex.getMessage()+"</font>");
        // forward request
        RequestDispatcher rd =
    request.getRequestDispatcher(forward);
        rd.forward(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
        throws ServletException, IOException
          doGet(request, response);
    }----$CATALINA_HOME/webapps/mvct/databaseErrata.jsp----
    <% String message = (String)request.getAttribute("message"); %>
    <HTML>
    <HEAD>
    <TITLE>databaseErrata.jsp Page</TITLE>
    </HEAD>
    <BODY>
    <% if (message != null) { %>
    Message = <%= message %>
    <H1>databaseErrata.jsp Page</H1>
    </BODY>
    </HTML>

    You're missing a closing curly bracket in the JSP page.
    Also, this will only print the exception message. I would recommend passing on the whole Exception object.
    ie request.setAttribute("theException", ex);
    That way you have the exception object to print the stacktrace from.
    However, you are doing this manually. The container can handle this stuff for you if you so wish.
    Check the documentation on error pages. You are able to set up an error page in the web.xml, that all exceptions/errors get directed to.
    something like:
    <error-page>
    <exception-type>java.lang.Exception</exception-type>
    <location>/errorPages/debugError.jsp</location>
    </error-page>
    You then write the JSP page something like this
    <%@ page language="java" %>
    <%@ page isErrorPage="true" %>
    <%@ page import="java.util.*, java.io.*" %>
    <h1>Programming error <BR> FOR DEBUGGING PURPOSES ONLY</h1>
    <p>This page is only for debugging purposes.  Should not be deployed to live environment.</p>
    <p>Details of the error are as follows:</p>
    <table border = 1 width=200>
    <tr><td valign=top><strong>Error :</strong></td><td><%=exception.getMessage()%></td></tr>
    <tr><td valign=top width='80%'><strong>Trace :</strong></td><td><pre><% exception.printStackTrace(new PrintWriter(out));%></pre></td></tr>
    </table>
    <br>Cheers,
    evnafets

Maybe you are looking for