Hi

It seems to be a bug on UIComponentClassicTagBase.getViewComponentIds(). It
was fixed on 2.0.x branch but not on 1.2.x in this way:

before:

    private Map<String,Object> getViewComponentIds()
    {
        Map<String, Object> requestMap =
_facesContext.getExternalContext().getRequestMap();
        Map<String, Object> viewComponentIds;

        if (_parent == null)
        {
            // top level _componentInstance
            viewComponentIds = new HashMap<String,Object>();
            requestMap.put(VIEW_IDS, viewComponentIds);
        }
        else
        {
            viewComponentIds = (Map<String, Object>)
requestMap.get(VIEW_IDS);
        }

        return viewComponentIds;
    }

After:

    private Map<String, Object> getViewComponentIds()
    {
        Map<String, Object> requestMap =
_facesContext.getExternalContext().getRequestMap();
        Map<String, Object> viewComponentIds;

        if (_parent == null)
        {
            // top level _componentInstance
            viewComponentIds = new HashMap<String, Object>();
            requestMap.put(VIEW_IDS, viewComponentIds);
        }
        else
        {
            viewComponentIds = (Map<String,
Object>)requestMap.get(VIEW_IDS);

            // Check if null, this can happen if someone programatically
tries to do an include of a
            // JSP fragment. This code will prevent NullPointerException
from happening in such cases.
            if (viewComponentIds == null)
            {
                viewComponentIds = new HashMap<String, Object>();
                requestMap.put(VIEW_IDS, viewComponentIds);
            }
        }

        return viewComponentIds;
    }

Could you file a issue on myfaces jira, so we can commit this solution?

http://issues.apache.org/jira/browse/MYFACES

First sign up before create the issue

https://issues.apache.org/jira/secure/Signup!default.jspa

regards

Leonardo Uribe

2009/9/22 Asuka_l2 <asuka...@yahoo.fr>

>
> Hi,
>
> I'm tired to fight with an update of myFaces. I used Myfaces 1.1.5 with
> Tomcat 5.5 and JDK 1.5.
> I need to update it and use MyFaces 1.2.7 with Tomcat 6.0 and JDK 1.6.
>
> The problem is that I have a nullPointerException that occurs everytime I
> try to access a to a .jsp page that includes the tag <f:subview>.
>
> Does anybody have an idea?
> Thank you very much.
>
> This is the stack trace :
>
> java.lang.NullPointerException
>        at
>
> javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:450)
>        at
>
> org.apache.jsp.index_005fsecure_jsp._jspx_meth_f_005fsubview_005f0(index_005fsecure_jsp.java:493)
>        at
>
> org.apache.jsp.index_005fsecure_jsp._jspx_meth_f_005fview_005f0(index_005fsecure_jsp.java:385)
>        at
>
> org.apache.jsp.index_005fsecure_jsp._jspx_meth_sec_005fauthorize_005f1(index_005fsecure_jsp.java:294)
>        at
>
> org.apache.jsp.index_005fsecure_jsp._jspService(index_005fsecure_jsp.java:140)
>        at
> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>        at
>
> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
>        at
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
>        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:359)
>        at
>
> org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
>        at
>
> org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:52)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:173)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:271)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:192)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.concurrent.ConcurrentSessionFilter.doFilterHttp(ConcurrentSessionFilter.java:99)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
>        at
>
> org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
>        at
>
> org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
>        at
>
> org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
>        at
>
> org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
>        at
>
> org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:341)
>        at
>
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.buildView(JspViewHandlerImpl.java:486)
>        at
>
> org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:337)
>        at
>
> org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
>        at
>
> org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
>        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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
> org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
>        at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
>        at
>
> org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
>        at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:359)
>        at
>
> org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
>        at
>
> org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:173)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:271)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.concurrent.ConcurrentSessionFilter.doFilterHttp(ConcurrentSessionFilter.java:99)
>        at
>
> org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
>        at
>
> org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:371)
>        at
>
> org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:174)
>        at
>
> org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> com.tixeo.rs.web.jsf.ResponseHeaderFilter.doFilter(ResponseHeaderFilter.java:41)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> com.tixeo.rs.web.jsf.SessionExpiredFilter.doFilter(SessionExpiredFilter.java:47)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
>        at
>
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
> com.tixeo.rs.web.jsf.DebugInfoFilter.doFilter(DebugInfoFilter.java:73)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
>        at
>
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
>
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at
>
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>        at
>
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>        at
>
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at
>
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
>        at
>
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>        at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
>        at java.lang.Thread.run(Thread.java:619)
> --
> View this message in context:
> http://www.nabble.com/NullPointerException-with-subview-tag-tp25530664p25530664.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Reply via email to