APAR status
Closed as program error.
Error description
A ClassCastException can occur when using the render method of the WCM API with a JSR 168 portlet: [8/23/07 7:20:22:101 EDT] 0000005e Cmpnt W IWKPC1087X: Exception while rendering embedded inlined component type class com.aptrix.pluto.cmpnt.ArrayCmpnt. Inline Component class is: class com.aptrix.pluto.cmpnt.CmpntReference - Exception: java. lang.ClassCastException: org.apache.pluto.core.impl. RenderResponseImpl. Will continue rendering. java.lang.ClassCastException: org. apache.pluto.core.impl.RenderResponseImpl at com.aptrix.pluto.cmpnt.IndexCmpnt.getCurrentPage (IndexCmpnt.java:582) at com.aptrix.pluto.cmpnt.MenuCmpnt.resolve(MenuCmpnt.java:183 at com.aptrix.pluto.cmpnt.CmpntUtils.resolveToText (CmpntUtils.java:179) at com.aptrix.pluto.cmpnt.BaseReferenceCmpnt.resolve (BaseReferenceCmpnt.java(Compiled Code)) at com.aptrix.pluto.cmpnt.Cmpnt.resolveCmpnt(Cmpnt.java (Compiled Code)) at com.aptrix.pluto.renderer.PlutoRenderer.renderCmpnt (PlutoRenderer.java(Compiled Code)) at com.aptrix.pluto.renderer.PlutoRenderer.render (PlutoRenderer.java:86) at com.aptrix.pluto.renderer.PageRequestProcessor.processReque (PageRequestProcessor.java:76) at com.aptrix.pluto.renderer.RendererModule.processCacheable Request(RendererModule.java:914) at com.aptrix.pluto.renderer.RendererModule.processPageRequest (RendererModule.java:780) at com.ibm.workplace.wcm.api.WCM_Workspace.render (WCM_Workspace.java:2371) at com.WCMAPI.renderertest.RendererTestPortlet.doView (RendererTestPortlet.java:48) .... The RendererTestPortlet is a test portlet that makes the following calls: getRepository public static com.ibm.workplace.wcm.api.Repository getReposi getWorkspace Returns a Workspace object representing a view of the reposi for the specified Principal. createRenderingContext Creates a new rendering context. setRenderedContent Sets the full path of the Content to render. This is of the /Library/Site/SiteArea/SiteArea/Content render Renders the content, according to the RenderingContext that is in ( set above by setRenderedContent) .. This issue only appears to happen on v6011 and is only happening when the portlet is coded using the JSR 168 spec using the IBM Portlet API the issue is not recreated.
Local fix
None ( use IBM Portlet API if possible ).
Problem summary
Problem Summary: ClassCastException is seen when a request is made from a JSR168 portlet . Detailed Problem Description: A ClassCastException can occur when using the render method of the WCM API with a JSR 168 portlet: [8/23/07 7:20:22:101 EDT] 0000005e Cmpnt W IWKPC1087X: Exception while rendering embedded inlined component type class com.aptrix.pluto.cmpnt.ArrayCmpnt. Inline Component class is: class com.aptrix.pluto.cmpnt.CmpntReference - Exception: java.lang.ClassCastException: org.apache.pluto.core.impl. RenderResponseImpl. Will continue rendering. java.lang.ClassCastException: org.apache.pluto.core.impl.RenderResponseImpl at com.aptrix.pluto.cmpnt.IndexCmpnt.getCurrentPage (IndexCmpnt.java:582) at com.aptrix.pluto.cmpnt.MenuCmpnt.resolve(MenuCmpnt.java:183) at com.aptrix.pluto.cmpnt.CmpntUtils.resolveToText (CmpntUtils.java:179) at com.aptrix.pluto.cmpnt.BaseReferenceCmpnt.resolve (BaseReferenceCmpnt.java(Compiled Code)) at com.aptrix.pluto.cmpnt.Cmpnt.resolveCmpnt(Cmpnt.java (Compiled Code)) at com.aptrix.pluto.renderer.PlutoRenderer.renderCmpnt (PlutoRenderer.java(Compiled Code)) at com.aptrix.pluto.renderer.PlutoRenderer.render (PlutoRenderer.java:86) at com.aptrix.pluto.renderer.PageRequestProcessor.processRequest (PageRequestProcessor.java:76) at com.aptrix.pluto.renderer.RendererModule.processCacheableRequest (RendererModule.java:914) at com.aptrix.pluto.renderer.RendererModule.processPageRequest(Rend ererModule.java:780) at com.ibm.workplace.wcm.api.WCM_Workspace.render(WCM_Workspace.jav a:2371) at com.WCMAPI.renderertest.RendererTestPortlet.doView(RendererTestP ortlet.java:48)
Problem conclusion
Problem Analysis: The call to obtain the PortletResponse object in the code makes the assumption that the request came from an IBM Portlet API portlet. Failing Module: WCM - Web Content Management (General) Problem Solution: Modified the code to cast the object to the parent class so that no ClassCastException would be thrown. An interim fix is available for this APAR from Fix Central at: http://www.ibm.com/eserver/support/fixes/fixcentral/swgquickorde r?brandid=2&productid=Workplace%20Web%20Content%20Management&fix es=6.0.1.2-WCM-PK52040 You will need to cut/paste the entire URL into a browser to resolve the address.
Temporary fix
Comments
APAR Information
APAR number
PK52040
Reported component name
WRKPLC WEB CON
Reported component ID
5724I2900
Reported release
60E
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2007-08-30
Closed date
2007-09-20
Last modified date
2008-02-01
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WRKPLC WEB CON
Fixed component ID
5724I2900
Applicable component levels
R60D PSY
UP
R60E PSY
UP
[{"Business Unit":{"code":null,"label":null},"Product":{"code":"SUPPORT","label":"IBM Worldwide Support"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0.1.1","Edition":"","Line of Business":{"code":null,"label":null}}]
Document Information
Modified date:
10 September 2020