Issue Details (XML | Word | Printable)

Key: BEEHIVE-1007
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Eddie O'Neil
Reporter: Subbu Allamaraju
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Beehive

Propage exception causes while throwing ServletException

Created: 17/Nov/05 12:37 AM   Updated: 10/Feb/06 12:11 PM
Return to search
Component/s: NetUI
Affects Version/s: None
Fix Version/s: 1.0.2

Time Tracking:
Not Specified

Resolution Date: 10/Feb/06 12:11 PM


 Description  « Hide
I have come across a usage of ServletException that drops out the original cause of the exception.

PageFlowPageFilter.runPage methods has code snippet that looks like

catch(Something s) {
    throw new ServletException(s);
}

Since ServletException is pre-J2SE1.4, its constructor does not call super(cause), thereby losing exception chaining. For all pre-J2SE1.4 exception classes in J2EE, we need to initialize the cause explicitly via initCause().

To get exception chaining correctly, this code should be changed to

catch(Something s) {
    ServletException se = new ServletException(s);
    s.initCause(s);
    throw se;
}

I'm not sure if there are other places in netui throwing similar exceptions. It would be good do a grep on the source.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Rich Feit made changes - 17/Nov/05 02:01 AM
Field Original Value New Value
Resolution Fixed [ 1 ]
Assignee Alejandro Ramirez [ alramire ]
Status Open [ 1 ] Resolved [ 5 ]
Eddie O'Neil made changes - 17/Nov/05 02:16 AM
Resolution Fixed [ 1 ]
Status Resolved [ 5 ] Reopened [ 4 ]
Assignee Alejandro Ramirez [ alramire ] Eddie O'Neil [ ekoneil ]
Eddie O'Neil made changes - 10/Feb/06 12:11 PM
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Resolved [ 5 ]
Fix Version/s v.next [ 12310718 ]