[ 
https://issues.apache.org/jira/browse/TRINIDAD-1520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12758042#action_12758042
 ] 

Blake Sullivan commented on TRINIDAD-1520:
------------------------------------------

The patch attempts to make Locale, AccessibilityProfile, and Version optional 
in the cache key.  It is not clear that this is what we want to do.  And it is 
especially unclear that we want to do so without any discussion.  I would 
prefer that we looked at why these are null and whether there are suitable 
defaults in the cases where this information is unavailable

> NPE from Google Bot (unknown agent)
> -----------------------------------
>
>                 Key: TRINIDAD-1520
>                 URL: https://issues.apache.org/jira/browse/TRINIDAD-1520
>             Project: MyFaces Trinidad
>          Issue Type: Bug
>    Affects Versions:  1.2.11-core
>         Environment: myfaces 1.2.6
> facelets 1.1.14
> trinidad 1.2.11
> jetty  6.1.5
>            Reporter: Joe Rossi
>            Assignee: Bruno Aranda
>            Priority: Minor
>             Fix For:  1.2.12-core
>
>
> This seems like a duplicate of [Trinidad-1146], though the stack trace I'm 
> seeing is different. 
> SEVERE: Error Rendering View[/public/contact.xhtml]
> java.lang.NullPointerException
>       at 
> org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache$Key.hashCode(FileSystemStyleCache.java:1213)
>       at java.util.Hashtable.get(Hashtable.java:334)
>       at 
> org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache._getEntry(FileSystemStyleCache.java:456)
>       at 
> org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache._getEntry(FileSystemStyleCache.java:428)
>       at 
> org.apache.myfaces.trinidadinternal.style.cache.FileSystemStyleCache.getStyleSheetURIs(FileSystemStyleCache.java:160)
>       at 
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.StyleSheetRenderer.encodeAll(StyleSheetRenderer.java:90)
>       at 
> org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:446)
>       at 
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.HeadRenderer.encodeBegin(HeadRenderer.java:80)
>       at 
> org.apache.myfaces.trinidad.render.CoreRenderer.delegateRendererBegin(CoreRenderer.java:467)
>       at 
> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRenderer.encodeAll(DocumentRenderer.java:74)
>       at 
> org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
>       at 
> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:751)
>       at 
> org.apache.myfaces.trinidad.component.UIXComponentBase.__encodeRecursive(UIXComponentBase.java:1494)
>       at 
> org.apache.myfaces.trinidad.component.UIXComponentBase.encodeAll(UIXComponentBase.java:771)
>       at javax.faces.component.UIComponent.encodeAll(UIComponent.java:257)
>       at 
> com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
>       at 
> javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:48)
>       at 
> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:188)
>       at 
> org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
>       at 
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
>       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:155)
>       at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>       at 
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>       at 
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:245)
>       at 
> org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:155)
>       at 
> org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>       at 
> tn.view.error.UncaughtExceptionInterceptor.doFilter(UncaughtExceptionInterceptor.java:57)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>       at 
> net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:292)
>       at 
> net.sf.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:108)
>       at 
> net.sf.acegisecurity.intercept.web.SecurityEnforcementFilter.doFilter(SecurityEnforcementFilter.java:197)
>       at 
> net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
>       at 
> net.sf.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:143)
>       at 
> net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
>       at 
> net.sf.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:214)
>       at 
> net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
>       at 
> net.sf.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:324)
>       at 
> net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
>       at 
> net.sf.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:220)
>       at 
> net.sf.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:303)
>       at 
> net.sf.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:173)
>       at 
> net.sf.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:120)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>       at 
> net.sf.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:50)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>       at 
> tn.view.filter.StaticContentCachingFilter.doFilter(StaticContentCachingFilter.java:58)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>       at 
> tn.view.error.UncaughtExceptionFilter.doFilter(UncaughtExceptionFilter.java:70)
>       at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>       at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>       at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>       at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>       at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>       at 
> org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
>       at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>       at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>       at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
>       at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>       at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>       at org.mortbay.jetty.Server.handle(Server.java:313)
>       at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
>       at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
>       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>       at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
>       at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
> I can reproduce it with the following junit test case:
>   public void testWebCrawlerCrash()
>     throws HttpException, IOException
>   {
>     String applicationUrl = "http://localhost/app";;
>     
>     // Create a http request for the contacts page
>     HttpClient client = new HttpClient();
>     HttpMethod method = new GetMethod(applicationUrl + "/public/contact.jsf");
>     
>     // Adjust the header so it appears to be the google web crawler
>     method.addRequestHeader("User-Agent", "Mozilla/5.0 (compatible; 
> Googlebot/2.1; +http://www.google.com/bot.html)");
>     
>     try
>     {
>       // Invoke the http request
>       int statusCode = client.executeMethod(method);
>       assertEquals(HttpStatus.SC_OK, statusCode);
>     }
>     finally
>     {
>       method.releaseConnection();
>     }
>   }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to