Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 973716

Summary: There is a bug in Gatein-Portal code of UIPortletActionListener class.
Product: [JBoss] JBoss Enterprise Portal Platform 6 Reporter: indrajit <iingawal>
Component: PortalAssignee: Nobody <nobody>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: epp-bugs
Target Milestone: ER02   
Target Release: 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-02-10 03:27:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description indrajit 2013-06-12 14:39:28 UTC
Gatein-Portal code bug which is causing the following error:

++++++++++++++++++++++++
11:22:01,452 ERROR [portal:UIPortletLifecycle] (http-/127.0.0.1:8080-1) Error processing the action: java.lang.NoClassDefFoundError cannot be cast to java.lang.Exception: java.lang.ClassCastException: java.lang.NoClassDefFoundError cannot be cast to java.lang.Exception
	at org.exoplatform.portal.webui.application.UIPortletActionListener$ProcessActionActionListener.handleErrorResponse(UIPortletActionListener.java:241) [exo.portal.webui.portal-3.5.2.Final-redhat-4.jar:3.5.2.Final-redhat-4]
	at org.exoplatform.portal.webui.application.UIPortletActionListener$ProcessActionActionListener.execute(UIPortletActionListener.java:140) [exo.portal.webui.portal-3.5.2.Final-redhat-4.jar:3.5.2.Final-redhat-4]
	at org.exoplatform.webui.event.Event.broadcast(Event.java:97) [exo.portal.webui.framework-3.5.2.Final-redhat-4.jar:3.5.2.Final-redhat-4]
+++++++++++++++++++++++++



Notice the class [1] where the method is trying to cast the (Throwable) object into an Exception.. as in runtime it can be any thing like Error/Exception so everything Should *not* be  casted to Exception.


_+++++++++++++++ Notice following Method +++++++++++++++_
        private void handleErrorResponse(ErrorResponse response) throws Exception {
            throw (Exception) response.getCause();
        }


Which means suppose if the [response.getCause()] returns NoClassDefFoundError (rather than an Exception) then definitely it can not be Casted to an Exception.




[1] https://github.com/gatein/gatein-portal/blob/master/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java

Comment 1 JBoss JIRA Server 2013-06-14 10:34:01 UTC
Martin Weiler <mweiler> made a comment on jira GTNPORTAL-3122

Attaching a reproducer for this issue. The portlet is calling a helper class in processAction method. This helper class is using MVEL to evaluate an expression. The mvel libraries are not being included into the build, to force the NoClassDefFoundError at runtime.

Without the fix, the NoClassDefFoundError is masked by the ClassCastException, thus giving no clue that the missing mvel library is the actual root cause.

Comment 2 Lucas Ponce 2013-06-17 14:05:51 UTC
PR sent by Martin discussed and verified.

Comment 4 Dominik Pospisil 2013-08-01 12:34:58 UTC
Verified on ER3 using the reproducer from GTNPORTAL-3122.

Comment 8 Red Hat Bugzilla 2025-02-10 03:27:55 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.