You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jesse Long (JIRA)" <ji...@apache.org> on 2011/01/04 13:11:48 UTC

[jira] Created: (CXF-3229) Generated Exception files should extend java.lang.Exception, not Exception

Generated Exception files should extend java.lang.Exception, not Exception
--------------------------------------------------------------------------

                 Key: CXF-3229
                 URL: https://issues.apache.org/jira/browse/CXF-3229
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS, Tooling
    Affects Versions: 2.3.1, 2.3.0, 2.4
         Environment: All
            Reporter: Jesse Long


WSDL2Java generates Java source code, for faults, it generates exceptions. When the fault name is Exception, the code looks like

public class Exception extends Exception

Which is a cyclic inheritance problem. It should be:

public class Exception extends java.lang.Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CXF-3229) Generated Exception files should extend java.lang.Exception, not Exception

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-3229:
--------------------------------

    Assignee: Daniel Kulp

> Generated Exception files should extend java.lang.Exception, not Exception
> --------------------------------------------------------------------------
>
>                 Key: CXF-3229
>                 URL: https://issues.apache.org/jira/browse/CXF-3229
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.3.0, 2.3.1, 2.4
>         Environment: All
>            Reporter: Jesse Long
>            Assignee: Daniel Kulp
>         Attachments: cxf-Exception.patch
>
>
> WSDL2Java generates Java source code, for faults, it generates exceptions. When the fault name is Exception, the code looks like
> public class Exception extends Exception
> Which is a cyclic inheritance problem. It should be:
> public class Exception extends java.lang.Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-3229) Generated Exception files should extend java.lang.Exception, not Exception

Posted by "Jesse Long (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Long updated CXF-3229:
----------------------------

    Attachment: cxf-Exception.patch

This is the patch against trunk to resolve the issue, probably will patch cleanly against 2.3x branch too

> Generated Exception files should extend java.lang.Exception, not Exception
> --------------------------------------------------------------------------
>
>                 Key: CXF-3229
>                 URL: https://issues.apache.org/jira/browse/CXF-3229
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.3.0, 2.3.1, 2.4
>         Environment: All
>            Reporter: Jesse Long
>         Attachments: cxf-Exception.patch
>
>
> WSDL2Java generates Java source code, for faults, it generates exceptions. When the fault name is Exception, the code looks like
> public class Exception extends Exception
> Which is a cyclic inheritance problem. It should be:
> public class Exception extends java.lang.Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-3229) Generated Exception files should extend java.lang.Exception, not Exception

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3229.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.2

> Generated Exception files should extend java.lang.Exception, not Exception
> --------------------------------------------------------------------------
>
>                 Key: CXF-3229
>                 URL: https://issues.apache.org/jira/browse/CXF-3229
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.3.0, 2.3.1, 2.4
>         Environment: All
>            Reporter: Jesse Long
>            Assignee: Daniel Kulp
>             Fix For: 2.3.2
>
>         Attachments: cxf-Exception.patch
>
>
> WSDL2Java generates Java source code, for faults, it generates exceptions. When the fault name is Exception, the code looks like
> public class Exception extends Exception
> Which is a cyclic inheritance problem. It should be:
> public class Exception extends java.lang.Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-3229) Generated Exception files should extend java.lang.Exception, not Exception

Posted by "Glen Mazza (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977270#action_12977270 ] 

Glen Mazza commented on CXF-3229:
---------------------------------

Dan Kulp had suggested a while back a little bit more work would be needed (throw clauses in methods also would need updating):
http://cxf.547215.n5.nabble.com/name-collision-Exception-td560353.html

It may be interesting to see what Metro's wsimport equivalent does, they may be a step ahead of CXF in this regard:
http://www.jroller.com/gmazza/entry/soap_client_tutorial

> Generated Exception files should extend java.lang.Exception, not Exception
> --------------------------------------------------------------------------
>
>                 Key: CXF-3229
>                 URL: https://issues.apache.org/jira/browse/CXF-3229
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.3.0, 2.3.1, 2.4
>         Environment: All
>            Reporter: Jesse Long
>         Attachments: cxf-Exception.patch
>
>
> WSDL2Java generates Java source code, for faults, it generates exceptions. When the fault name is Exception, the code looks like
> public class Exception extends Exception
> Which is a cyclic inheritance problem. It should be:
> public class Exception extends java.lang.Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-3229) Generated Exception files should extend java.lang.Exception, not Exception

Posted by "Jesse Long (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977275#action_12977275 ] 

Jesse Long commented on CXF-3229:
---------------------------------

Good news. References to unqualified class names in java source code are resolved by first looking for inner classes, then classes from the same package and finally classes from java.lang. So, because the fault is xxx.Exception, and the interface is xxx.MyInterface, the "throws Exception" will refer to xxx.Exception. :)

> Generated Exception files should extend java.lang.Exception, not Exception
> --------------------------------------------------------------------------
>
>                 Key: CXF-3229
>                 URL: https://issues.apache.org/jira/browse/CXF-3229
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS, Tooling
>    Affects Versions: 2.3.0, 2.3.1, 2.4
>         Environment: All
>            Reporter: Jesse Long
>         Attachments: cxf-Exception.patch
>
>
> WSDL2Java generates Java source code, for faults, it generates exceptions. When the fault name is Exception, the code looks like
> public class Exception extends Exception
> Which is a cyclic inheritance problem. It should be:
> public class Exception extends java.lang.Exception

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.