You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Jake Robb (JIRA)" <ji...@apache.org> on 2007/07/09 21:50:26 UTC

[jira] Created: (WW-2035) ConfigurationManager overwrites exception stacktraces

ConfigurationManager overwrites exception stacktraces
-----------------------------------------------------

                 Key: WW-2035
                 URL: https://issues.apache.org/struts/browse/WW-2035
             Project: Struts 2
          Issue Type: Bug
          Components: Configuration
    Affects Versions: 2.0.8
            Reporter: Jake Robb
            Priority: Minor


Line 51-56 of ConfigurationManager.java:

try {
    configuration.reload(getConfigurationProviders());
} catch (ConfigurationException e) {
    setConfiguration(null);
    throw e;
}

Note that the caught exception is re-thrown, overwriting the stacktrace.  This should be replaced with:

throw new WhateverException("something went wrong here", e);

Replacing, of course, the exception type and message with something more indicative of the problem.

To see the real exception and its message, I had to download the Struts source, link it in to my project, and debug my way to the exception.  It was annoying, to say the least.

In my case, the problem was that my build scripts were including the Struts JARs in my APP-INF/lib directory, and as such the xwork JAR was being loaded twice.

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


[jira] Assigned: (WW-2035) ConfigurationManager overwrites exception stacktraces

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes reassigned WW-2035:
--------------------------------

    Assignee: James Holmes

> ConfigurationManager overwrites exception stacktraces
> -----------------------------------------------------
>
>                 Key: WW-2035
>                 URL: https://issues.apache.org/struts/browse/WW-2035
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.0.8
>            Reporter: Jake Robb
>            Assignee: James Holmes
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> Line 51-56 of ConfigurationManager.java:
> try {
>     configuration.reload(getConfigurationProviders());
> } catch (ConfigurationException e) {
>     setConfiguration(null);
>     throw e;
> }
> Note that the caught exception is re-thrown, overwriting the stacktrace.  This should be replaced with:
> throw new WhateverException("something went wrong here", e);
> Replacing, of course, the exception type and message with something more indicative of the problem.
> To see the real exception and its message, I had to download the Struts source, link it in to my project, and debug my way to the exception.  It was annoying, to say the least.
> In my case, the problem was that my build scripts were including the Struts JARs in my APP-INF/lib directory, and as such the xwork JAR was being loaded twice.

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


[jira] Resolved: (WW-2035) Change ConfigurationManager to not overwrite exception stacktraces

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes resolved WW-2035.
------------------------------

    Resolution: Fixed

This was resolved by XWork ticket XW-545 and will be available in the 2.1 release of XWork:

http://jira.opensymphony.com/browse/XW-545


> Change ConfigurationManager to not overwrite exception stacktraces
> ------------------------------------------------------------------
>
>                 Key: WW-2035
>                 URL: https://issues.apache.org/struts/browse/WW-2035
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.0.8
>            Reporter: Jake Robb
>            Assignee: James Holmes
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> Line 51-56 of ConfigurationManager.java:
> try {
>     configuration.reload(getConfigurationProviders());
> } catch (ConfigurationException e) {
>     setConfiguration(null);
>     throw e;
> }
> Note that the caught exception is re-thrown, overwriting the stacktrace.  This should be replaced with:
> throw new WhateverException("something went wrong here", e);
> Replacing, of course, the exception type and message with something more indicative of the problem.
> To see the real exception and its message, I had to download the Struts source, link it in to my project, and debug my way to the exception.  It was annoying, to say the least.
> In my case, the problem was that my build scripts were including the Struts JARs in my APP-INF/lib directory, and as such the xwork JAR was being loaded twice.

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


[jira] Updated: (WW-2035) ConfigurationManager overwrites exception stacktraces

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes updated WW-2035:
-----------------------------

    Issue Type: Improvement  (was: Bug)

> ConfigurationManager overwrites exception stacktraces
> -----------------------------------------------------
>
>                 Key: WW-2035
>                 URL: https://issues.apache.org/struts/browse/WW-2035
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.0.8
>            Reporter: Jake Robb
>            Assignee: James Holmes
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> Line 51-56 of ConfigurationManager.java:
> try {
>     configuration.reload(getConfigurationProviders());
> } catch (ConfigurationException e) {
>     setConfiguration(null);
>     throw e;
> }
> Note that the caught exception is re-thrown, overwriting the stacktrace.  This should be replaced with:
> throw new WhateverException("something went wrong here", e);
> Replacing, of course, the exception type and message with something more indicative of the problem.
> To see the real exception and its message, I had to download the Struts source, link it in to my project, and debug my way to the exception.  It was annoying, to say the least.
> In my case, the problem was that my build scripts were including the Struts JARs in my APP-INF/lib directory, and as such the xwork JAR was being loaded twice.

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


[jira] Updated: (WW-2035) Change ConfigurationManager to not overwrite exception stacktraces

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes updated WW-2035:
-----------------------------

    Summary: Change ConfigurationManager to not overwrite exception stacktraces  (was: ConfigurationManager overwrites exception stacktraces)

> Change ConfigurationManager to not overwrite exception stacktraces
> ------------------------------------------------------------------
>
>                 Key: WW-2035
>                 URL: https://issues.apache.org/struts/browse/WW-2035
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.0.8
>            Reporter: Jake Robb
>            Assignee: James Holmes
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> Line 51-56 of ConfigurationManager.java:
> try {
>     configuration.reload(getConfigurationProviders());
> } catch (ConfigurationException e) {
>     setConfiguration(null);
>     throw e;
> }
> Note that the caught exception is re-thrown, overwriting the stacktrace.  This should be replaced with:
> throw new WhateverException("something went wrong here", e);
> Replacing, of course, the exception type and message with something more indicative of the problem.
> To see the real exception and its message, I had to download the Struts source, link it in to my project, and debug my way to the exception.  It was annoying, to say the least.
> In my case, the problem was that my build scripts were including the Struts JARs in my APP-INF/lib directory, and as such the xwork JAR was being loaded twice.

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


[jira] Commented: (WW-2035) Change ConfigurationManager to not overwrite exception stacktraces

Posted by "Jake Robb (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_41490 ] 

Jake Robb commented on WW-2035:
-------------------------------

Thanks!

> Change ConfigurationManager to not overwrite exception stacktraces
> ------------------------------------------------------------------
>
>                 Key: WW-2035
>                 URL: https://issues.apache.org/struts/browse/WW-2035
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Configuration
>    Affects Versions: 2.0.8
>            Reporter: Jake Robb
>            Assignee: James Holmes
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> Line 51-56 of ConfigurationManager.java:
> try {
>     configuration.reload(getConfigurationProviders());
> } catch (ConfigurationException e) {
>     setConfiguration(null);
>     throw e;
> }
> Note that the caught exception is re-thrown, overwriting the stacktrace.  This should be replaced with:
> throw new WhateverException("something went wrong here", e);
> Replacing, of course, the exception type and message with something more indicative of the problem.
> To see the real exception and its message, I had to download the Struts source, link it in to my project, and debug my way to the exception.  It was annoying, to say the least.
> In my case, the problem was that my build scripts were including the Struts JARs in my APP-INF/lib directory, and as such the xwork JAR was being loaded twice.

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


[jira] Updated: (WW-2035) ConfigurationManager overwrites exception stacktraces

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes updated WW-2035:
-----------------------------

    Fix Version/s: 2.1.0

> ConfigurationManager overwrites exception stacktraces
> -----------------------------------------------------
>
>                 Key: WW-2035
>                 URL: https://issues.apache.org/struts/browse/WW-2035
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.0.8
>            Reporter: Jake Robb
>            Priority: Minor
>             Fix For: 2.1.0
>
>
> Line 51-56 of ConfigurationManager.java:
> try {
>     configuration.reload(getConfigurationProviders());
> } catch (ConfigurationException e) {
>     setConfiguration(null);
>     throw e;
> }
> Note that the caught exception is re-thrown, overwriting the stacktrace.  This should be replaced with:
> throw new WhateverException("something went wrong here", e);
> Replacing, of course, the exception type and message with something more indicative of the problem.
> To see the real exception and its message, I had to download the Struts source, link it in to my project, and debug my way to the exception.  It was annoying, to say the least.
> In my case, the problem was that my build scripts were including the Struts JARs in my APP-INF/lib directory, and as such the xwork JAR was being loaded twice.

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