Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
crovers crovers
Problem with Custom Portlet
13 de enero de 2005 15:55
Respuesta

crovers crovers

Ranking: Junior Member

Mensajes: 26

Fecha de incorporación: 9 de diciembre de 2004

Mensajes recientes

I&#39;m writing a &#39;FindPeople&#39; portlet (just as it sounds - a directory lookup to our corporate directory). All is working well and it runs and works nicely... except I&#39;m having some irritating problems with the last few polishes.<br /><br />Now that I&#39;ve got it working, I want to limit how much data it&#39;ll send, but only if it is in &#39;normal&#39; window state. I&#39;m doing all the work in my JSP - I&#39;m using a form bean for the search data, but that&#39;s all.<br /><br />So, in my JSP I have : <br /><br />
1 
2 <%       
3          WindowState wst = renderRequest.getWindowState&#40;&#41;;
4          out.println&#40;wst.toString&#40;&#41;&#41;;
5  %>
<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 &#39;findpeople is temporarily unavailable&#39;<br /><br />Hum. Ok, I&#39;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 />
 1
 2org.apache.jasper.JasperException
 3        at org.apache.jasper.servlet.JspServletWrapper.service&#40;JspServletWrapper.java&#58;372&#41;
 4        at org.apache.jasper.servlet.JspServlet.serviceJspFile&#40;JspServlet.java&#58;292&#41;
 5        at org.apache.jasper.servlet.JspServlet.service&#40;JspServlet.java&#58;236&#41;
 6        at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;802&#41;
 7        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter&#40;ApplicationFilterChain.java&#58;252&#41;
 8        at org.apache.catalina.core.ApplicationFilterChain.doFilter&#40;ApplicationFilterChain.java&#58;173&#41;
 9        at org.apache.catalina.core.ApplicationDispatcher.invoke&#40;ApplicationDispatcher.java&#58;696&#41;
10        at org.apache.catalina.core.ApplicationDispatcher.doInclude&#40;ApplicationDispatcher.java&#58;585&#41;
11        at org.apache.catalina.core.ApplicationDispatcher.include&#40;ApplicationDispatcher.java&#58;510&#41;
12        at com.liferay.portlet.PortletRequestDispatcherImpl.include&#40;PortletRequestDispatcherImpl.java&#58;210&#41;
13        at com.liferay.portal.struts.PortletRequestProcessor.doInclude&#40;PortletRequestProcessor.java&#58;326&#41;
<br />etc<br />
 1
 2        at java.lang.Thread.run&#40;Thread.java&#58;534&#41;
 3javax.portlet.PortletException
 4        at com.liferay.portlet.StrutsPortlet.include&#40;StrutsPortlet.java&#58;154&#41;
 5        at com.liferay.portlet.StrutsPortlet.doView&#40;StrutsPortlet.java&#58;100&#41;
 6        at javax.portlet.GenericPortlet.doDispatch&#40;GenericPortlet.java&#58;235&#41;
 7        at javax.portlet.GenericPortlet.render&#40;GenericPortlet.java&#58;163&#41;
 8        at com.liferay.portlet.CachePortlet.render&#40;CachePortlet.java&#58;153&#41;
 9        at org.apache.jsp.html.portal.layout_jsp._jspService&#40;layout_jsp.java&#58;1270&#41;
10        at org.apache.jasper.runtime.HttpJspBase.service&#40;HttpJspBase.java&#58;94&#41;
11        at javax.servlet.http.HttpServlet.service&#40;HttpServlet.java&#58;802&#41;
<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&#39;t see any reason why it should or what is different from 30 seconds ago when it worked.<br /><br />What&#39;s weird is that if I remove the offending line and redeploy, the portlet STILL doesn&#39;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
Problem with Custom Portlet
13 de enero de 2005 18:27
Respuesta

crovers crovers

Ranking: Junior Member

Mensajes: 26

Fecha de incorporación: 9 de diciembre de 2004

Mensajes recientes

*embarrassed shuffle* I had a null pointer error in my code that only showed up in certain situations. Sigh. Never mind.<br /><br />-cdr