portals-pluto-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MINTH...@aol.com
Subject Need Help
Date Tue, 08 Nov 2005 09:05:37 GMT
 
I am a beginner of portlets. I tried a very very simple HelloWorld portlet  ( 
the source from onjava.com) like this:
 
package com.test;
 
import javax.portlet.*;
 
import java.io.IOException;
 
public class HelloWorld extends  GenericPortlet{
 
 protected void doView(RenderRequest request,  RenderResponse response)
throws PortletException,  IOException{
response.setContentType("text/html");
response.getWriter().println("Hello  Portlet");
}
 
}
 
portlet.xml file :
 
<?xml version="1.0"  encoding="UTF-8"?>
<portlet-app
xmlns="_http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd_ 
(http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd) "
version="1.0"
xmlns:xsi="_http://www.w3.org/2001/XMLSchema-instance_ 
(http://www.w3.org/2001/XMLSchema-instance) "
xsi:schemaLocation="_http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd_ 
(http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd) 
_http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd_ 
(http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd) ">

<portlet-app-name>HelloWold</portlet-app-name>

<portlet>
<description>HelloWorldDescription</description>

<portlet-name>HelloWorld</portlet-name>

<display-name>Hello  World</display-name>

<portlet-class>com.test.HelloWorld</portlet-class>

<expiration-cache>-1</expiration-cache>

<supports>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
</supports>
 
         <supported-locale>en</supported-locale>        
 
  <portlet-info>
<title>Hello  World</title>
<short-title>Hello  World</short-title>
<keywords>Hello</keywords>
</portlet-info>
</portlet>
</portlet-app>

web.xml is:
 
<?xml version="1.0"  encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems,  Inc.//DTD Web Application  
2.3//EN"
"_http://java.sun.com/dtd/web-app_2_3.dtd_ 
(http://java.sun.com/dtd/web-app_2_3.dtd) ">
<web-app>
<display-name>HelloWorld</display-name>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>


I installed the Pluto-1.0.1,  the deployment from the admin is successful. 
But if I'd like to open the  HelloWorld portlet, it says always 'error occured 
in portlet'. I checked  the log file, it shows sth like this:
 
08.11.2005 10:09:26  org.apache.pluto.portalImpl.services.log.LoggerImpl error
SCHWERWIEGEND:  PortletInvokerImpl.render() - Error while dispatching  
portlet.
java.lang.ClassCastException: com.test.HelloWorld
at  org.apache.pluto.core.PortletServlet.init(PortletServlet.java:66)
at  
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
at  
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120)
at  
org.apache.pluto.invoker.impl.PortletInvokerImpl.load(PortletInvokerImpl.java:80)
at  
org.apache.pluto.PortletContainerImpl.portletLoad(PortletContainerImpl.java:218)
at  
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.portletLoad(PortletContainerWrapperImpl.java:94)
at  org.apache.pluto.portalImpl.aggregation.Portle
tFragment.service(PortletFragment.java:120)
at  
org.apache.jsp.WEB_002dINF.aggregation.ColumnFragment_jsp._jspService(org.apache.jsp.WEB_002dINF.aggregation.ColumnFragment_jsp:65)
at  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(AbstractFragment.java:112)
at  
org.apache.jsp.WEB_002dINF.aggregation.RowFragment_jsp._jspService(org.apache.jsp.WEB_002dINF.aggregation.RowFragment_jsp:65)
at  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(AbstractFragment.java:112)
at  
org.apache.jsp.WEB_002dINF.aggregation.PageFragment_jsp._jspService(org.apache.jsp.WEB_002dINF.aggregation.PageFragment_jsp:74)
at  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(AbstractFragment.java:112)
at  
org.apache.jsp.WEB_002dINF.aggregation.RootFragment_jsp._jspService(org.apache.jsp.WEB_002dINF.aggregation.RootFragment_jsp:136)
at  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(AbstractFragment.java:112)
at  org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:254)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at  
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at  
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
at  
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at  
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at  
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at  
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at  
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at  java.lang.Thread.run(Thread.java:595)
08.11.2005 10:09:26  org.apache.pluto.portalImpl.services.log.LoggerImpl error
SCHWERWIEGEND:  Error in  Portlet
javax.portlet.PortletException
at  
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:146)
at  
org.apache.pluto.invoker.impl.PortletInvokerImpl.load(PortletInvokerImpl.java:80)
at  
org.apache.pluto.PortletContainerImpl.portletLoad(PortletContainerImpl.java:218)
at  
org.apache.pluto.portalImpl.core.PortletContainerWrapperImpl.portletLoad(PortletContainerWrapperImpl.java:94)
at  
org.apache.pluto.portalImpl.aggregation.PortletFragment.service(PortletFragment.java:120)
at  
org.apache.jsp.WEB_002dINF.aggregation.ColumnFragment_jsp._jspService(org.apache.jsp.WEB_002dINF.aggregation.ColumnFragment_jsp:65)
at  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(AbstractFragment.java:112)
at  
org.apache.jsp.WEB_002dINF.aggregation.RowFragment_jsp._jspService(org.apache.jsp.WEB_002dINF.aggregation.RowFragment_jsp:65)
at  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(AbstractFragment.java:112)
at  
org.apache.jsp.WEB_002dINF.aggregation.PageFragment_jsp._jspService(org.apache.jsp.WEB_002dINF.aggregation.PageFragment_jsp:74)
at  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(AbstractFragment.java:112)
at  
org.apache.jsp.WEB_002dINF.aggregation.RootFragment_jsp._jspService(org.apache.jsp.WEB_002dINF.aggregation.RootFragment_jsp:136)
at  org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at  org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
at  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.portalImpl.aggregation.AbstractFragment.service(AbstractFragment.java:112)
at  org.apache.pluto.portalImpl.Servlet.doGet(Servlet.java:254)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at  javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at  
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at  
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at  
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at  
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at  
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
at  
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at  
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at  
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at  
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at  org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at  
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at  
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at  
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at  
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at  java.lang.Thread.run(Thread.java:595)
Caused by:  java.lang.ClassCastException: com.test.HelloWorld
at  org.apache.pluto.core.PortletServlet.init(PortletServlet.java:66)
at  
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
at  
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750)
at  
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:641)
at  
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at  
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
at  
org.apache.pluto.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:120)
...  74 more
...
 
Could somebody help me?   Please!!! I am going to getting crazy. Thank you!
 
regards,  Min

Mime
View raw message