Portal Server 7 Swallows Up Portlet Exceptions: The Useless MISC_ERROR

Portal Server 7 Swallows Up Portlet Exceptions: The Useless MISC_ERROR
Alert to portlet developers using Sun Portal Server 7!  There is a pretty serious bug in the 7.0 release that will make it appear the Portal Server is swallowing up exceptions thrown by your portlet.  This will make debugging your portlet very difficult.

For instance, have you been debugging a portlet in PS7 only to find a useless message like "Exception thrown - EntityID = TestPortletTestPortletTestPortletChannel, Error Code = MISC_ERROR"?  Not very helpful. :(  Well the problem is the Portal Server is actually capturing the portlet's exception in the portlet container and failing to log it at a level that will be presented by default in the Portal Server logs.  The bug will be fixed in PS7.1 (as part of Java ES 5).

To workaround in the short-term, you will have to set the logging level correctly for the portlet container so that the portlet's exception is logged to the Portal Server log file.  This can be done with the psadmin command-line tool, like so:

/opt/sun/portal/bin/psadmin set-logger -v -u amadmin -f <password-file>  -m portal -p <portal-id> -i <instance-id> -80 --name debug.com.sun.portal.portletappengine --level FINEST

The other option is to use the Portal Server Console.

Choose your portal, and instance and the Logging tab.
Choose the Specific Logger Settings tab.
Choose your instance.
Scroll down to find debug.com.sun.portal.portletappengine.
Set Log Level to FINEST.
Choose Apply to Selected Instance.

If you are viewing the portal log in the Portal Server Console, you should log out and log back into the console.  When you go to view the log (Log Viewer), you will now have to select Log Level FINEST to view the portlet exceptions.  You will see them listed near the useless MISC_ERROR message and they will be labeled something like "Error occured while processing portlet request. javax.portlet.PortletException..."
原文地址:https://www.cnblogs.com/kentyshang/p/1237957.html