You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Rakesh Midha (JIRA)" <ji...@apache.org> on 2006/12/04 12:52:20 UTC

[jira] Created: (GERONIMO-2621) Exception handling in Console

Exception handling in Console
-----------------------------

                 Key: GERONIMO-2621
                 URL: http://issues.apache.org/jira/browse/GERONIMO-2621
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
          Components: console
    Affects Versions: 2.0
            Reporter: Rakesh Midha
         Assigned To: Rakesh Midha
             Fix For: 2.0


This improvement is discussed in http://comments.gmane.org/gmane.comp.java.geronimo.devel/41449

In case I get any exception or error condition in Console, the nothing is printed on web console and huge stack trace is printed on server console. Only thing done in the name of Exception handling in all the portlets is "throw PortletException"

I somehow don't like this behavior of console. As a console user I don't want to go and see server stacktrace, if there is some error I should atleast be informed in console. I think everytime there is a error or exception in console, it should be printed in either exception page in webconsole, or in header of portlet view page. This is done to some extent in configManager and CA part of console. But not in uniform way.

This is what I am proposing for Exception handling in console :
1. Create a ConsoleException.java which extends PortletException, this class will have overridden printStackTrace(PrintWriter), which will set attribute required in _ConsoleException.jsp apart from printing the stack on PrintWriter.
2. Create _ConsoleException.jsp which should be included in all portlet, this jsp will be responsible to print a short message and long stack trace. (with a toggle button to view and hide long stack trace)
3. All Portlet classes should throw ConsoleException instead of PortletException

I think this will be nice and cleaner way to handle the console problems. 

-- 
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] Commented: (GERONIMO-2621) Exception handling in Console

Posted by "Don Hill (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/GERONIMO-2621?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492300 ] 

Don Hill commented on GERONIMO-2621:
------------------------------------

I think there are other ways to handle this so that as portlets are added to the console they don't have to develop to this pattern, why not create a abstract ConsolePortlet and let the abstract class handle the exception presentation.

catch the PortletException and call handleException(.) of the abstract class which could do a include for the error jsp. Another thought is that we could have an exception entry in web.xml that would catch the PortletException, this would then be handled by the container.

Just some thoughts ;)

> Exception handling in Console
> -----------------------------
>
>                 Key: GERONIMO-2621
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2621
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: console
>    Affects Versions: 2.0-M5
>            Reporter: Rakesh Midha
>         Assigned To: Rakesh Midha
>             Fix For: 2.0-M5
>
>         Attachments: deployExp.patch
>
>
> This improvement is discussed in http://comments.gmane.org/gmane.comp.java.geronimo.devel/41449
> In case I get any exception or error condition in Console, the nothing is printed on web console and huge stack trace is printed on server console. Only thing done in the name of Exception handling in all the portlets is "throw PortletException"
> I somehow don't like this behavior of console. As a console user I don't want to go and see server stacktrace, if there is some error I should atleast be informed in console. I think everytime there is a error or exception in console, it should be printed in either exception page in webconsole, or in header of portlet view page. This is done to some extent in configManager and CA part of console. But not in uniform way.
> This is what I am proposing for Exception handling in console :
> 1. Create a ConsoleException.java which extends PortletException, this class will have overridden printStackTrace(PrintWriter), which will set attribute required in _ConsoleException.jsp apart from printing the stack on PrintWriter.
> 2. Create _ConsoleException.jsp which should be included in all portlet, this jsp will be responsible to print a short message and long stack trace. (with a toggle button to view and hide long stack trace)
> 3. All Portlet classes should throw ConsoleException instead of PortletException
> I think this will be nice and cleaner way to handle the console problems. 

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


[jira] Updated: (GERONIMO-2621) Exception handling in Console

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

Prasad Kashyap updated GERONIMO-2621:
-------------------------------------

    Patch Info: [Patch Available]

> Exception handling in Console
> -----------------------------
>
>                 Key: GERONIMO-2621
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2621
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: console
>    Affects Versions: 2.0-M5
>            Reporter: Rakesh Midha
>            Assignee: Rakesh Midha
>             Fix For: 2.0
>
>         Attachments: deployExp.patch
>
>
> This improvement is discussed in http://comments.gmane.org/gmane.comp.java.geronimo.devel/41449
> In case I get any exception or error condition in Console, the nothing is printed on web console and huge stack trace is printed on server console. Only thing done in the name of Exception handling in all the portlets is "throw PortletException"
> I somehow don't like this behavior of console. As a console user I don't want to go and see server stacktrace, if there is some error I should atleast be informed in console. I think everytime there is a error or exception in console, it should be printed in either exception page in webconsole, or in header of portlet view page. This is done to some extent in configManager and CA part of console. But not in uniform way.
> This is what I am proposing for Exception handling in console :
> 1. Create a ConsoleException.java which extends PortletException, this class will have overridden printStackTrace(PrintWriter), which will set attribute required in _ConsoleException.jsp apart from printing the stack on PrintWriter.
> 2. Create _ConsoleException.jsp which should be included in all portlet, this jsp will be responsible to print a short message and long stack trace. (with a toggle button to view and hide long stack trace)
> 3. All Portlet classes should throw ConsoleException instead of PortletException
> I think this will be nice and cleaner way to handle the console problems. 

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


[jira] Updated: (GERONIMO-2621) Exception handling in Console

Posted by "Rakesh Midha (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/GERONIMO-2621?page=all ]

Rakesh Midha updated GERONIMO-2621:
-----------------------------------

    Attachment: deployExp.patch


As discussed in discussion thread http://comments.gmane.org/gmane.comp.java.geronimo.devel/41449

This patch provides following improvements for configManager view of console.

I am supplying this patch as a sample for coming up with a guidelines to exception handling and info/warning printing.

Here is what is done to handle exception in console:
1. ConsoleException.java which extends PortletException, this class will have overridden printStackTrace(PrintWriter), which will set attribute required in _ConsoleException.jsp apart from printing the stack on PrintWriter. For now logging is not used and printStackTrace() prints exception on web console and server console.

2. Create _ConsoleException.jsp which should be included in all portlet, this jsp will be responsible to print a short message and long stack trace. (with a toggle button to view and hide long stack trace and dojo dialog link). We need to select one from toggle button and dojo dialog, for now i ave included both.

4. In BasePortlet added printInfo, printWarning, printError and printFullError. Apart from console exception these methods can be used to print info, warning, error or full exception to web console. All Info and full exceptions will be printed in black, warnings in yellow and Error in red font.

5. DeploymentPortlet class throws ConsoleException instead of PortletException
6. DeploymentPortlet class also use printInfo, printWarning metods

To view the effect of patch:
Apply the patch
Using deploy new page, try to redeploy an application which is not deployed. This will print a short exception and detailed exception.

If this protocol is accepted I will provide a patch for other portlets also.

thanks

> Exception handling in Console
> -----------------------------
>
>                 Key: GERONIMO-2621
>                 URL: http://issues.apache.org/jira/browse/GERONIMO-2621
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: console
>    Affects Versions: 2.0
>            Reporter: Rakesh Midha
>         Assigned To: Rakesh Midha
>             Fix For: 2.0
>
>         Attachments: deployExp.patch
>
>
> This improvement is discussed in http://comments.gmane.org/gmane.comp.java.geronimo.devel/41449
> In case I get any exception or error condition in Console, the nothing is printed on web console and huge stack trace is printed on server console. Only thing done in the name of Exception handling in all the portlets is "throw PortletException"
> I somehow don't like this behavior of console. As a console user I don't want to go and see server stacktrace, if there is some error I should atleast be informed in console. I think everytime there is a error or exception in console, it should be printed in either exception page in webconsole, or in header of portlet view page. This is done to some extent in configManager and CA part of console. But not in uniform way.
> This is what I am proposing for Exception handling in console :
> 1. Create a ConsoleException.java which extends PortletException, this class will have overridden printStackTrace(PrintWriter), which will set attribute required in _ConsoleException.jsp apart from printing the stack on PrintWriter.
> 2. Create _ConsoleException.jsp which should be included in all portlet, this jsp will be responsible to print a short message and long stack trace. (with a toggle button to view and hide long stack trace)
> 3. All Portlet classes should throw ConsoleException instead of PortletException
> I think this will be nice and cleaner way to handle the console problems. 

-- 
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] Updated: (GERONIMO-2621) Exception handling in Console

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

Prasad Kashyap updated GERONIMO-2621:
-------------------------------------

    Fix Version/s:     (was: 2.0-M5)
                   2.0

> Exception handling in Console
> -----------------------------
>
>                 Key: GERONIMO-2621
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2621
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: console
>    Affects Versions: 2.0-M5
>            Reporter: Rakesh Midha
>            Assignee: Rakesh Midha
>             Fix For: 2.0
>
>         Attachments: deployExp.patch
>
>
> This improvement is discussed in http://comments.gmane.org/gmane.comp.java.geronimo.devel/41449
> In case I get any exception or error condition in Console, the nothing is printed on web console and huge stack trace is printed on server console. Only thing done in the name of Exception handling in all the portlets is "throw PortletException"
> I somehow don't like this behavior of console. As a console user I don't want to go and see server stacktrace, if there is some error I should atleast be informed in console. I think everytime there is a error or exception in console, it should be printed in either exception page in webconsole, or in header of portlet view page. This is done to some extent in configManager and CA part of console. But not in uniform way.
> This is what I am proposing for Exception handling in console :
> 1. Create a ConsoleException.java which extends PortletException, this class will have overridden printStackTrace(PrintWriter), which will set attribute required in _ConsoleException.jsp apart from printing the stack on PrintWriter.
> 2. Create _ConsoleException.jsp which should be included in all portlet, this jsp will be responsible to print a short message and long stack trace. (with a toggle button to view and hide long stack trace)
> 3. All Portlet classes should throw ConsoleException instead of PortletException
> I think this will be nice and cleaner way to handle the console problems. 

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


[jira] Closed: (GERONIMO-2621) Exception handling in Console

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

Kevan Miller closed GERONIMO-2621.
----------------------------------

    Resolution: Won't Fix

The console has been extensively reworked. If we want to take up this effort, again, please reopen or create a new jira.

> Exception handling in Console
> -----------------------------
>
>                 Key: GERONIMO-2621
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2621
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: console
>    Affects Versions: 2.0-M5
>            Reporter: Rakesh Midha
>            Assignee: Rakesh Midha
>             Fix For: 2.1
>
>         Attachments: deployExp.patch
>
>
> This improvement is discussed in http://comments.gmane.org/gmane.comp.java.geronimo.devel/41449
> In case I get any exception or error condition in Console, the nothing is printed on web console and huge stack trace is printed on server console. Only thing done in the name of Exception handling in all the portlets is "throw PortletException"
> I somehow don't like this behavior of console. As a console user I don't want to go and see server stacktrace, if there is some error I should atleast be informed in console. I think everytime there is a error or exception in console, it should be printed in either exception page in webconsole, or in header of portlet view page. This is done to some extent in configManager and CA part of console. But not in uniform way.
> This is what I am proposing for Exception handling in console :
> 1. Create a ConsoleException.java which extends PortletException, this class will have overridden printStackTrace(PrintWriter), which will set attribute required in _ConsoleException.jsp apart from printing the stack on PrintWriter.
> 2. Create _ConsoleException.jsp which should be included in all portlet, this jsp will be responsible to print a short message and long stack trace. (with a toggle button to view and hide long stack trace)
> 3. All Portlet classes should throw ConsoleException instead of PortletException
> I think this will be nice and cleaner way to handle the console problems. 

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


[jira] Updated: (GERONIMO-2621) Exception handling in Console

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

Donald Woods updated GERONIMO-2621:
-----------------------------------

    Fix Version/s:     (was: 2.0)
                   2.1

Any major rework like this should go in as part of the new pluggable admin portlets in 2.1.

> Exception handling in Console
> -----------------------------
>
>                 Key: GERONIMO-2621
>                 URL: https://issues.apache.org/jira/browse/GERONIMO-2621
>             Project: Geronimo
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: console
>    Affects Versions: 2.0-M5
>            Reporter: Rakesh Midha
>            Assignee: Rakesh Midha
>             Fix For: 2.1
>
>         Attachments: deployExp.patch
>
>
> This improvement is discussed in http://comments.gmane.org/gmane.comp.java.geronimo.devel/41449
> In case I get any exception or error condition in Console, the nothing is printed on web console and huge stack trace is printed on server console. Only thing done in the name of Exception handling in all the portlets is "throw PortletException"
> I somehow don't like this behavior of console. As a console user I don't want to go and see server stacktrace, if there is some error I should atleast be informed in console. I think everytime there is a error or exception in console, it should be printed in either exception page in webconsole, or in header of portlet view page. This is done to some extent in configManager and CA part of console. But not in uniform way.
> This is what I am proposing for Exception handling in console :
> 1. Create a ConsoleException.java which extends PortletException, this class will have overridden printStackTrace(PrintWriter), which will set attribute required in _ConsoleException.jsp apart from printing the stack on PrintWriter.
> 2. Create _ConsoleException.jsp which should be included in all portlet, this jsp will be responsible to print a short message and long stack trace. (with a toggle button to view and hide long stack trace)
> 3. All Portlet classes should throw ConsoleException instead of PortletException
> I think this will be nice and cleaner way to handle the console problems. 

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