You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "J Ross Nicoll (JIRA)" <ax...@ws.apache.org> on 2005/11/18 20:58:41 UTC

[jira] Created: (AXIS-2310) Incorrect catching of java.lang.Error subclasses

Incorrect catching of java.lang.Error subclasses
------------------------------------------------

         Key: AXIS-2310
         URL: http://issues.apache.org/jira/browse/AXIS-2310
     Project: Apache Axis
        Type: Bug
  Components: WSDL processing  
    Versions: 1.3    
 Environment: Any/all
    Reporter: J Ross Nicoll


Axis catches java.lang.Throwable in several places, which is the superclass of Error. This means that errors such as OutOfMemoryError and ThreadDeath are caught. According to the Java virtual machine:

"The class Error and its subclasses are exceptions from which ordinary programs are not ordinarily expected to recover."

In specific, src/org/apache/axis/wsdl/toJava/JavaStubWriter.java line 406:

        pw.println("        catch (java.lang.Throwable _t) {");

should be:

        pw.println("        catch (java.lang.Exception _e) {");

so that ThreadDeath is not caught, as catching it means that threads never exit properly (see http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ThreadDeath.html).

However, there are likely to be other points where this is an issue, that I haven't found yet, and checking the code would probably be a good idea...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-2310) Incorrect catching of java.lang.Error subclasses

Posted by "Jarek Gawor (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2310?page=all ]
     
Jarek Gawor resolved AXIS-2310:
-------------------------------

    Fix Version: current (nightly)
     Resolution: Fixed

Fix committed to trunk.

> Incorrect catching of java.lang.Error subclasses
> ------------------------------------------------
>
>          Key: AXIS-2310
>          URL: http://issues.apache.org/jira/browse/AXIS-2310
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Any/all
>     Reporter: J Ross Nicoll
>      Fix For: current (nightly)

>
> Axis catches java.lang.Throwable in several places, which is the superclass of Error. This means that errors such as OutOfMemoryError and ThreadDeath are caught. According to the Java virtual machine:
> "The class Error and its subclasses are exceptions from which ordinary programs are not ordinarily expected to recover."
> In specific, src/org/apache/axis/wsdl/toJava/JavaStubWriter.java line 406:
>         pw.println("        catch (java.lang.Throwable _t) {");
> should be:
>         pw.println("        catch (java.lang.Exception _e) {");
> so that ThreadDeath is not caught, as catching it means that threads never exit properly (see http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ThreadDeath.html).
> However, there are likely to be other points where this is an issue, that I haven't found yet, and checking the code would probably be a good idea...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira