Foren
Problem with Custom Portlet
crovers crovers, geändert vor 19 Jahren.
Problem with Custom Portlet
Junior Member Beiträge: 26 Beitrittsdatum: 10.12.04 Neueste Beiträge
I'm writing a 'FindPeople' portlet (just as it sounds - a directory lookup to our corporate directory). All is working well and it runs and works nicely... except I'm having some irritating problems with the last few polishes.<br /><br />Now that I've got it working, I want to limit how much data it'll send, but only if it is in 'normal' window state. I'm doing all the work in my JSP - I'm using a form bean for the search data, but that's all.<br /><br />So, in my JSP I have : <br /><br />
<%
WindowState wst = renderRequest.getWindowState();
out.println(wst.toString());
%>
<br /><br />Which should just print the window state to the screen. I try this, it works - ONCE. I hit maximize on the portlet, to see what will happen there and instead of my portlet I get 'findpeople is temporarily unavailable'<br /><br />Hum. Ok, I've had that before - code problems, whatever. I go look in the catalina.out for the stack trace. This is what I get : <br /><br />
org.apache.jasper.JasperException
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
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:696)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:585)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:510)
at com.liferay.portlet.PortletRequestDispatcherImpl.include(PortletRequestDispatcherImpl.java:210)
at com.liferay.portal.struts.PortletRequestProcessor.doInclude(PortletRequestProcessor.java:326)
<br />etc<br />
at java.lang.Thread.run(Thread.java:534)
javax.portlet.PortletException
at com.liferay.portlet.StrutsPortlet.include(StrutsPortlet.java:154)
at com.liferay.portlet.StrutsPortlet.doView(StrutsPortlet.java:100)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:235)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
at com.liferay.portlet.CachePortlet.render(CachePortlet.java:153)
at org.apache.jsp.html.portal.layout_jsp._jspService(layout_jsp.java:1270)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
<br />etc<br /><br />So, uh, I guess for some reason my portlet (or whatever is calling it) is throwing an exception. But I don't see any reason why it should or what is different from 30 seconds ago when it worked.<br /><br />What's weird is that if I remove the offending line and redeploy, the portlet STILL doesn't work. I fool around awhile and eventually the code starts working again, nice and solid... until I try to go with the WindowState again.<br /><br />Am I on crack? What should I be looking for?<br /><br />-cdr
crovers crovers, geändert vor 19 Jahren.
Problem with Custom Portlet
Junior Member Beiträge: 26 Beitrittsdatum: 10.12.04 Neueste Beiträge
*embarrassed shuffle* I had a null pointer error in my code that only showed up in certain situations. Sigh. Never mind.<br /><br />-cdr