Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Does doView() calls service() method?

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the following exception when viewing the portlet first time:

Could not invoke the service() method on servlet LoginPortlet. Exception thrown : javax.servlet.ServletException

doView() method is getting called for sure. Why its not rendering the JSP included in doView()?

Why it's trying to call service() method of servlet LoginPortlet?

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
Which API are you using? Are you using the JetSpeed API or the JRS168 API for portlet development?

Which portal server are you using? Pluto? Liferay? WebSphere Portal Server? JetSpeed? BEA?

Which development environment are you using?

-Cameron McKenzie
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Cameron McKenzie:
Which API are you using? Are you using the JetSpeed API or the JRS168 API for portlet development?

Which portal server are you using? Pluto? Liferay? WebSphere Portal Server? JetSpeed? BEA?

Which development environment are you using?

-Cameron McKenzie


Thanks Cameron.

API - ? (I guess Websphere Portal API which follows JSR 168 specificaitons, right?)
Server - Websphere Portal Server 6.0
IDE - RAD
 
PS Ashwin
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I also get similar error when deploying a simple portlet

API - jsr168
Server - Websphere Portal Server 6.0.1.1
IDE - RAD 7.0 (7.0.0.3)

I created a Basic Portlet based on JSR168 API and published on the portal server. when i open the portal, it throws this exception.

The stack trace is as follows :-
SRVE0068E: Could not invoke the service() method on servlet /_MyPortlet/jsp/html/MyPortletView.jsp. Exception thrown : java.lang.NullPointerException
at com.ibm._jsp._MyPortletView._jspService(_MyPortletView.java:111)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:762)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:204)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:254)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:633)
at org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:112)
at dai.itpde.rap.myportlet.MyPortlet.doView(MyPortlet.java:44)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
....
Could not invoke the service() method on servlet MyPortlet. Exception thrown : javax.servlet.ServletException
at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.convertException(PortletServlet.java:230)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.dispatch(PortletServlet.java:208)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.doGet(PortletServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at com.ibm.wps.pe.pc.std.cache.CacheablePortlet.service(CacheablePortlet.java:393)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:762)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:633)
at com.ibm.wps.pe.om.definition.impl.ServletDefinitionImpl$RDWrapper.include(ServletDefinitionImpl.java:419)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:206)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:168)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:97)
at com.ibm.wps.pe.pc.std.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:110)
at com.ibm.wps.pe.pc.PortletContainerImpl.doRenderPortlet(PortletContainerImpl.java:587)
at com.ibm.wps.pe.ext.render.AbstractRenderManager.performService(AbstractRenderManager.java:247)
at com.ibm.wps.pe.pc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:115)
at com.ibm.wps.engine.tags.PortletRenderTag.doStartTag(PortletRenderTag.java:161)
at com.ibm._jsp._Control._jspx_meth_portal$1skin_portletRender_0(_Control.java:953)
at com.ibm._jsp._Control._jspx_meth_portal$1logic_if_4(_Control.java:985)
at com.ibm._jsp._Control._jspService(_Control.java:582)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1572)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1521)



and it goes on and on....

I am very new to portal development.

any kinda help is appreciated.

Thanks in advance
 
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
A JSR168 portlet shouldn't be throwing a ServletException.

I'm guessing, but I think your environment, when they deploy, is treating your resources as Servlets/JSPs. As a result, the environment is looking for a service method, and throwing a ServletException.

Check your server configuration, or how your project is associated with the server. There is a portlet.xml file in the WEB-INF folder, right?

-Cameron McKenzie
 
Neil And
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Am just facing the same problem. My project do have portlet.xml How it be resolved?
 
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
How are you configuring WebSphere authorization. Are you trying to do a custom authentication against LDAP or a custom user registry?

This is a pretty old thread. If your situation or environment is unique, you might want to start a new thread, and reference this thread in it.

-Cameron McKEnzie
 
Neil And
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At this moment I didnot configure any authorisation and at a latter stage I will be using the the Users and Groups in Websphere Portal to give access to different users. Am getting the same exception as below:

API - JSR 168
Server - Websphere Portal Server 6.0.1.3
IDE - RAD 7.0.0.8


SRVE0068E: Could not invoke the service() method on servlet /_LHNavigation/jsp/html/LHNavPortletView.jsp. Exception thrown : java.util.NoSuchElementException
at java.util.LinkedList$ListItr.next(LinkedList.java(Compiled Code))
at com.ibm._jsp._LHNavPortletView._jspService(_LHNavPortletView.java:129)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1697)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java(Compiled Code))
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:221)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:670)
at org.apache.pluto.core.impl.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:112)
at uk.ui.LHNavPortlet.doView(LHNavPortlet.java:118)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
at com.ibm.wps.pe.pc.std.cmpf.impl.PortletFilterChainImpl.render(PortletFilterChainImpl.java:144)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.dispatch(PortletServlet.java:130)
at com.ibm.wps.pe.pc.std.invoker.impl.PortletServlet.doGet(PortletServlet.java:69)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
 
Amit Ghorpade
Bartender
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Neil And " welcome to Javaranch
please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic