[ http://issues.apache.org/jira/browse/PLUTO-254?page=all ]

Elliot Metsger resolved PLUTO-254.
----------------------------------

    Fix Version/s: 1.1.0
       Resolution: Fixed

In my portlet I had an improperly encoded url, which resulted in HTML like this:
  <img height="1" width="1" 
src="media/org/jasig/portal/channels/CGenericXSLT/RSS/transparent.gif" alt=""/>

RenderConfig now returns the default page ID when the requested page cannot be 
found.  If their is no default page found, PortalDriverServlet and RenderConfig 
log at the error level.

Committed r439719.

> NPE in PortalDriverServlet when requesting a resource that doesn't exist
> ------------------------------------------------------------------------
>
>                 Key: PLUTO-254
>                 URL: http://issues.apache.org/jira/browse/PLUTO-254
>             Project: Pluto
>          Issue Type: Bug
>          Components: portal driver
>    Affects Versions: Current CVS, 1.1.0-beta1
>         Environment: Pluto 1.1 HEAD, Tomcat 5.5.17
>            Reporter: Elliot Metsger
>         Assigned To: Elliot Metsger
>            Priority: Minor
>             Fix For: 1.1.0
>
>
> I have a portlet which attempts to load a resource that doesn't exist, and 
> the PortalDriverServlet throws an NPE.  getPageConfig returns null:
>         else {
>               if (LOG.isDebugEnabled()) {
>                       LOG.debug("Processing render request.");
>               }
>             PageConfig pageConfig = getPageConfig(portalURL); // 
> getPageConfig returns null
>             request.setAttribute(AttributeKeys.CURRENT_PAGE, pageConfig);
>             String uri = (pageConfig.getUri() != null) // NPE thrown
>                       ? pageConfig.getUri() : DEFAULT_PAGE_URI;
>             if (LOG.isDebugEnabled()) {
>               LOG.debug("Dispatching to: " + uri);
>             }
> From catalina.out 
> (/media/org/jasig/portal/channels/CGenericXSLT/RSS/transparent.gif doesn't 
> exist)
> [DEBUG] PortalURLParser - Parsing URL: 
> /pluto/portal/media/org/jasig/portal/channels/CGenericXSLT/RSS/transparent.gif
> [DEBUG] PortalURLParser - Parsing request pathInfo: 
> /media/org/jasig/portal/channels/CGenericXSLT/RSS/transparent.gif
> [DEBUG] PortalDriverServlet - Processing render request.
> [DEBUG] PortalDriverServlet - Rendering Portal: Requested Page: 
> /media/org/jasig/portal/channels/CGenericXSLT/RSS/transparent.gif
> [ERROR] [plutoPortalDriver] - Servlet.service() for servlet plutoPortalDriver 
> threw exception <java.lang.NullPointerException>java.lang.NullPointerException
>         at 
> org.apache.pluto.driver.PortalDriverServlet.doGet(PortalDriverServlet.java:121)
>         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:524)
>         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:869)
>         at 
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>         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)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to