• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts portlet framework error

 
aparna samireddy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


i am using struts portlet framework, i got error



This is log file



PSPL_PCCTXCSPPCI0006 : Exception thrown while rendering content for portlet window WebApplication6.WebApplication6
com.sun.portal.container.ContentException: PortletContainer.getMarkup(): Exception thrown from render() of WebApplication6|WebApplication6|WebApplication6.WebApplication6 with errorcode MISC_ERROR and exception is java.lang.ClassCastException: com.sun.portal.portletcontainer.portlet.impl.PortletContextImpl cannot be cast to org.apache.pluto.core.impl.PortletContextImpl
at com.sun.portal.portletcontainer.impl.PortletContainer.getMarkup(PortletContainer.java:246)
at com.sun.portal.portletcontainer.invoker.WindowInvoker.getPortletContent(WindowInvoker.java:375)
at com.sun.portal.portletcontainer.invoker.WindowInvoker.render(WindowInvoker.java:249)
at com.sun.portal.portletcontainer.driver.PortletContent.getContent(PortletContent.java:70)
at com.sun.portal.portletcontainer.driver.DesktopServlet.getPortletContents(DesktopServlet.java:296)
at com.sun.portal.portletcontainer.driver.DesktopServlet.getAllPortletContents(DesktopServlet.java:242)
at com.sun.portal.portletcontainer.driver.DesktopServlet.doGetPost(DesktopServlet.java:121)
at com.sun.portal.portletcontainer.driver.DesktopServlet.doGet(DesktopServlet.java:90)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
java.lang.ClassCastException: com.sun.portal.portletcontainer.portlet.impl.PortletContextImpl cannot be cast to org.apache.pluto.core.impl.PortletContextImpl
at com.test.PortalServletContextProvider.getServletContext(PortalServletContextProvider.java:24)
at org.apache.portals.bridges.struts.StrutsPortlet.getServletContext(StrutsPortlet.java:202)
at org.apache.portals.bridges.struts.StrutsPortlet.processRequest(StrutsPortlet.java:286)
at org.apache.portals.bridges.struts.StrutsPortlet.doView(StrutsPortlet.java:274)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.sun.portal.portletcontainer.appengine.PortletAppEngineServlet.service(PortletAppEngineServlet.java:393)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at com.sun.portal.portletcontainer.appengine.PortletAppEngineFilter.doFilter(PortletAppEngineFilter.java:105)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:873)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:679)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:594)
at com.sun.portal.portletcontainer.impl.PortletContainer.invokePAE(PortletContainer.java:818)
at com.sun.portal.portletcontainer.impl.PortletContainer.invokePAE(PortletContainer.java:695)
at com.sun.portal.portletcontainer.impl.PortletContainer.getMarkup(PortletContainer.java:209)
at com.sun.portal.portletcontainer.invoker.WindowInvoker.getPortletContent(WindowInvoker.java:375)
at com.sun.portal.portletcontainer.invoker.WindowInvoker.render(WindowInvoker.java:249)
at com.sun.portal.portletcontainer.driver.PortletContent.getContent(PortletContent.java:70)
at com.sun.portal.portletcontainer.driver.DesktopServlet.getPortletContents(DesktopServlet.java:296)
at com.sun.portal.portletcontainer.driver.DesktopServlet.getAllPortletContents(DesktopServlet.java:242)
at com.sun.portal.portletcontainer.driver.DesktopServlet.doGetPost(DesktopServlet.java:121)
at com.sun.portal.portletcontainer.driver.DesktopServlet.doGet(DesktopServlet.java:90)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
PSPL_PCCTXCSPPCI0006 : Exception thrown while rendering content for portlet window Content Exception
PSPCD_CSPPD0022 : Number for Portlet Windows Displayed - thin: 0, thick: 3





And PortalServletContextProvider.java is


package com.test;

import javax.portlet.GenericPortlet;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletRequestWrapper;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;

import org.apache.pluto.core.impl.PortletContextImpl;
import org.apache.portals.bridges.common.ServletContextProvider;

/**
* PortalServletContextProvider supplies access to the Servlet context of uPortal Portlet.
*
* @author Satish Sekharan
*/
public class PortalServletContextProvider implements ServletContextProvider {

public ServletContext getServletContext(GenericPortlet portlet)
{
return ((PortletContextImpl) portlet.getPortletContext()).getServletContext();
}

public HttpServletRequest getHttpServletRequest(GenericPortlet portlet, PortletRequest request)
{
return (HttpServletRequest) ((HttpServletRequestWrapper) request).getRequest();
}


public HttpServletResponse getHttpServletResponse(GenericPortlet portlet, PortletResponse response) {
return (HttpServletResponse) ((HttpServletResponseWrapper) response).getResponse();
}
}


and portlet.xml is



<?xml version='1.0' encoding='UTF-8' ?>
<portlet-app xmlns='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd' version='2.0'>
<portlet>
<description>WebApplication6</description>
<portlet-name>WebApplication6</portlet-name>
<display-name>WebApplication6</display-name>
<portlet-class>org.apache.portals.bridges.struts.StrutsPortlet</portlet-class>

<init-param>
<name>ViewPage</name>
<value>index.jsp</value>
</init-param>
<init-param>
<name>ServletContextProvider</name>
<value>com.test.PortalServletContextProvider</value>
</init-param>


<init-param>
<name>helpPage</name>
<value>/tour.htm</value>
</init-param>
<init-param>
<name>editPage</name>
<value>/edit.jsp</value>
</init-param>

<init-param>
<name>config</name>
<value>/WEB-INF/struts-config.xml</value>
</init-param>
<init-param>
<name>servletPage</name>
<value>*.do</value>
</init-param>

<expiration-cache>-1</expiration-cache>
<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
<portlet-mode>EDIT</portlet-mode>
<portlet-mode>HELP</portlet-mode>
</supports>
<resource-bundle>com.test.messages</resource-bundle>
<portlet-info>
<title>WebApplication6</title>
<short-title>WebApplication6</short-title>
</portlet-info>

</portlet>
</portlet-app>


i am using jsr 168 portlets with sun portal application server 7.1 and open portal portletcontainer 2.x in netBeans 6.5

please help me if any body knows the solution for this error

Thanks.
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
com.sun.portal.portletcontainer.portlet.impl.PortletContextImpl cannot be cast to org.apache.pluto.core.impl.PortletContextImpl


This looks to me like you have a Pluto runtime file that you're linking to in a war, but a Sun runtime file you're linking to at runtime or something. I'm not sure if these two environments should co-exist in one environment.

Find out which jar/zip file contains these sun and pluto files, and where these jar files are on the runtime classpath. I'm wondering if one of these jar files isn't needed.

What's you're development and runtime environement?

-Cameron McKenzie
 
aparna samireddy
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your response

i am using jsr 168 portlets with sun portal application server 7.1 and open portal portletcontainer 2.x in netBeans 6.5

i have a doubt, how to get com.sun.portal.portletcontainer.portlet.impl.PortletContextImpl file and which jar file contians this file



Thanks


 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic