MyFaces Core
  1. MyFaces Core
  2. MYFACES-3208

When searching tag handler names space is not checked in case of composite library, incorrect detection on repeated tag name on different name spaces

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.6, 2.1.1
    • Fix Version/s: 2.0.8, 2.1.2
    • Component/s: JSR-314
    • Labels:
      None
    • Environment:
      jboss 6

      Description

      TagLibraryConfig.containsTagHandler search a composite component file like:

      ResourceHandler resourceHandler =
      FacesContext.getCurrentInstance().getApplication().getResourceHandler();

      Resource compositeComponentResource = resourceHandler.createResource(
      localName +".xhtml", _compositeLibraryName);

      But never checks if the name space is the same as requested, so method returns 'true' if same tag name exist on different name space.
      Then null pointer is thrown when building component tree:

      11:47:31,191 FATAL [org.apache.myfaces.renderkit.ErrorPageWriter] An exception occurred: javax.faces.FacesException: java.lang.NullPointerException
      at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) [:2.0.1]
      at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) [:2.0.1]
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:258) [:2.0.1]
      at org.springframework.faces.mvc.JsfView.renderMergedOutputModel(JsfView.java:85) [:2.3.0.RELEASE]
      at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250) [:3.0.5.RELEASE]
      at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047) [:3.0.5.RELEASE]
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817) [:3.0.5.RELEASE]
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) [:3.0.5.RELEASE]
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) [:3.0.5.RELEASE]
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) [:3.0.5.RELEASE]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) [:3.0.5.RELEASE]
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [:3.0.5.RELEASE]
      at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
      at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) [:3.0.5.RELEASE]
      at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [:3.0.5.RELEASE]
      at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [:3.0.5.RELEASE]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
      at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [:3.0.5.RELEASE]
      at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [:3.0.5.RELEASE]
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
      at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
      at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
      at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
      at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
      at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
      Caused by: java.lang.NullPointerException
      at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:59) [:2.0.1]
      at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:263) [:2.0.1]
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:54) [:2.0.1]
      at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:59) [:2.0.1]
      at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:263) [:2.0.1]
      at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:54) [:2.0.1]
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51) [:2.0.1]
      at org.apache.myfaces.view.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:156) [:2.0.1]
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51) [:2.0.1]
      at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:57) [:2.0.1]
      at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51) [:2.0.1]
      at org.apache.myfaces.view.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:45) [:2.0.1]
      at org.apache.myfaces.view.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:143) [:2.0.1]
      at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.buildView(FaceletViewDeclarationLanguage.java:310) [:2.0.1]
      at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:66) [:2.0.1]
      at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239) [:2.0.1]
      ... 59 more

      A check like:
      if ( ! _namespace.equals(ns) ) return false;
      Is not needed previous to facelet file search?

        Activity

        Pablo Morales Mombiela created issue -
        Pablo Morales Mombiela made changes -
        Field Original Value New Value
        Status Open [ 1 ] Patch Available [ 10002 ]
        Pablo Morales Mombiela made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Pablo Morales Mombiela made changes -
        Description TagLibraryConfig.containsTagHandler search a composite component file like:

                        ResourceHandler resourceHandler =
                            FacesContext.getCurrentInstance().getApplication().getResourceHandler();

                        Resource compositeComponentResource = resourceHandler.createResource(
                                localName +".xhtml", _compositeLibraryName);

        But never check of name space is the same as requested, so method returns 'true' if same tag name exist on different name space.
        Then null pointer is thrown when building component tree:

        11:47:31,191 FATAL [org.apache.myfaces.renderkit.ErrorPageWriter] An exception occurred: javax.faces.FacesException: java.lang.NullPointerException
           at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) [:2.0.1]
           at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) [:2.0.1]
           at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:258) [:2.0.1]
           at org.springframework.faces.mvc.JsfView.renderMergedOutputModel(JsfView.java:85) [:2.3.0.RELEASE]
           at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) [:3.0.5.RELEASE]
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) [:3.0.5.RELEASE]
           at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [:3.0.5.RELEASE]
           at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) [:3.0.5.RELEASE]
           at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [:3.0.5.RELEASE]
           at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [:3.0.5.RELEASE]
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
           at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [:3.0.5.RELEASE]
           at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [:3.0.5.RELEASE]
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
           at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
           at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
        Caused by: java.lang.NullPointerException
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:59) [:2.0.1]
           at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:263) [:2.0.1]
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:54) [:2.0.1]
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:59) [:2.0.1]
           at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:263) [:2.0.1]
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:54) [:2.0.1]
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51) [:2.0.1]
           at org.apache.myfaces.view.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:156) [:2.0.1]
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51) [:2.0.1]
           at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:57) [:2.0.1]
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51) [:2.0.1]
           at org.apache.myfaces.view.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:45) [:2.0.1]
           at org.apache.myfaces.view.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:143) [:2.0.1]
           at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.buildView(FaceletViewDeclarationLanguage.java:310) [:2.0.1]
           at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:66) [:2.0.1]
           at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239) [:2.0.1]
           ... 59 more


        A check like:
            if ( ! _namespace.equals(ns) ) return false;
        Is not needed previous to facelet file search?


        TagLibraryConfig.containsTagHandler search a composite component file like:

                        ResourceHandler resourceHandler =
                            FacesContext.getCurrentInstance().getApplication().getResourceHandler();

                        Resource compositeComponentResource = resourceHandler.createResource(
                                localName +".xhtml", _compositeLibraryName);

        But never checks if the name space is the same as requested, so method returns 'true' if same tag name exist on different name space.
        Then null pointer is thrown when building component tree:

        11:47:31,191 FATAL [org.apache.myfaces.renderkit.ErrorPageWriter] An exception occurred: javax.faces.FacesException: java.lang.NullPointerException
           at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) [:2.0.1]
           at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) [:2.0.1]
           at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:258) [:2.0.1]
           at org.springframework.faces.mvc.JsfView.renderMergedOutputModel(JsfView.java:85) [:2.3.0.RELEASE]
           at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1047) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:817) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644) [:3.0.5.RELEASE]
           at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549) [:3.0.5.RELEASE]
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) [:3.0.5.RELEASE]
           at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [:3.0.5.RELEASE]
           at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) [:3.0.5.RELEASE]
           at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) [:3.0.5.RELEASE]
           at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [:3.0.5.RELEASE]
           at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [:3.0.5.RELEASE]
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
           at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) [:3.0.5.RELEASE]
           at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) [:3.0.5.RELEASE]
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274) [:6.0.0.Final]
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
           at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
           at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
           at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
           at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
        Caused by: java.lang.NullPointerException
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:59) [:2.0.1]
           at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:263) [:2.0.1]
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:54) [:2.0.1]
           at javax.faces.view.facelets.DelegatingMetaTagHandler.applyNextHandler(DelegatingMetaTagHandler.java:59) [:2.0.1]
           at org.apache.myfaces.view.facelets.tag.jsf.ComponentTagHandlerDelegate.apply(ComponentTagHandlerDelegate.java:263) [:2.0.1]
           at javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:54) [:2.0.1]
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51) [:2.0.1]
           at org.apache.myfaces.view.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:156) [:2.0.1]
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51) [:2.0.1]
           at org.apache.myfaces.view.facelets.compiler.NamespaceHandler.apply(NamespaceHandler.java:57) [:2.0.1]
           at javax.faces.view.facelets.CompositeFaceletHandler.apply(CompositeFaceletHandler.java:51) [:2.0.1]
           at org.apache.myfaces.view.facelets.compiler.EncodingHandler.apply(EncodingHandler.java:45) [:2.0.1]
           at org.apache.myfaces.view.facelets.impl.DefaultFacelet.apply(DefaultFacelet.java:143) [:2.0.1]
           at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.buildView(FaceletViewDeclarationLanguage.java:310) [:2.0.1]
           at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:66) [:2.0.1]
           at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239) [:2.0.1]
           ... 59 more


        A check like:
            if ( ! _namespace.equals(ns) ) return false;
        Is not needed previous to facelet file search?


        Leonardo Uribe made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Leonardo Uribe [ lu4242 ]
        Fix Version/s 2.0.8 [ 12316514 ]
        Fix Version/s 2.1.2 [ 12316512 ]
        Resolution Fixed [ 1 ]
        Leonardo Uribe made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Leonardo Uribe
            Reporter:
            Pablo Morales Mombiela
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development