Bug 130166
Summary: | NullPointerException thrown by Sitemesh. | ||||||
---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Network | Reporter: | Jesus M. Rodriguez <jesusr> | ||||
Component: | RHN/R&D | Assignee: | Jesus M. Rodriguez <jesusr> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Fanny Augustin <fmoquete> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | medium | ||||||
Version: | RHN Devel | ||||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2004-09-02 18:42:33 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 125080 | ||||||
Attachments: |
|
Description
Jesus M. Rodriguez
2004-08-17 17:29:00 UTC
Here's the getPage method from PageResponseWrapper from sitemesh: public Page getPage() throws IOException { getBufferStream().flush(); Factory factory = Factory.getInstance(config); if (!parseablePage) { // just in case setContentType was never called, or called before content was written to output getBufferStream().discardBuffer(); return null; } if (aborted) return null; if (page == null) { PageParser parser = factory.getPageParser(contentType); // jesusr: the following line is 263 return parser.parse(getBufferStream().getBuffer(encoding)); } return page; } During my debugging the factory returned a null parser because the contentType was null. But then magically it stopped. And Mike couldn't get it to happen either. I've tried everything, ant clean, stopping/starting tomcat. I even got a previous version of rhnjava from 2004-08-17 and did an ant clean, followed by a full restart of tomcat. No NullPointer. So I'm clueless to what happened to the problem. I'm reluctant to close this bug since problems aren't supposed to "disappear". I recommened keeping it open until Monday 8/23/2004, if it doesn't reappear first. Closing now instead of Monday. If it occurs again, we look at it some more. It's BACK! 2004-09-02 12:10:03 StandardWrapperValve[default]: Servlet.service() for servlet default threw exception java.lang.NullPointerException at com.opensymphony.module.sitemesh.filter.PageResponseWrapper.getPage(PageResponseWrapper.java:263) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:147) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:58) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:567) Created attachment 103393 [details]
Full Tomcat webapp log
I put in the some debug into the sitemesh filters and found out that the contenttype was null, which caused sitemesh to return a null parser causing the above exception. I also printed out the request url which was coming through the null occurred: http://transam.devel.redhat.com:8080/images/favicon.ico So I added an exclude to Sitemesh's decorator.xml: <excludes> <pattern>/images/*</pattern> </excludes> This keeps anything in the /images directory from trying to be decorated. |