myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RobertGary1 <robert_g...@sbcglobal.net>
Subject My Faces 2.0.4 generates NullPointer if bean scope is "view"
Date Mon, 28 Mar 2011 17:46:22 GMT

If I change my bean scope to be "view". If I change it to be "request" it
works ok. Looking at the MyFaces source code it appears that its looking for
a viewroot; however, the view hasn't yet be created.

    <managed-bean>
        <managed-bean-name>faces$DiscoveryStatus</managed-bean-name>
       
<managed-bean-class>com.xxx.client.jsf.DiscoveryStatusBackingBean</managed-bean-class>
        <managed-bean-scope>view</managed-bean-scope>
    </managed-bean>
I get an exception

javax.faces.FacesException: java.lang.NullPointerException
	at
org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241)
	at
org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156)
	at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:191)
	at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at
org.apache.myfaces.custom.ppr.PPRLifecycleWrapper.execute(PPRLifecycleWrapper.java:68)
	at
org.apache.myfaces.custom.ppr.PPRLifecycleWrapper.execute(PPRLifecycleWrapper.java:68)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:189)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:206)
	at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
	at
org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
	at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
com.appiq.client.jsf.filter.SingleThreadFilter.doFilter(SingleThreadFilter.java:99)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:285)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:286)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at com.appiq.client.jsf.filter.LoginFilter.doFilter(LoginFilter.java:47)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
org.apache.myfaces.custom.conversation.ConversationServletFilter.doFilter(ConversationServletFilter.java:78)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
org.apache.myfaces.custom.requestParameterProvider.RequestParameterServletFilter.doFilter(RequestParameterServletFilter.java:66)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
com.appiq.client.NotificationTimeoutFilter.doFilter(NotificationTimeoutFilter.java:133)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
com.appiq.security.client.SecurityRestrictionFilter.doFilter(SecurityRestrictionFilter.java:120)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
com.xxx.security.client.SecurityContextFilter.doFilter(SecurityContextFilter.java:77)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:392)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
	at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
	at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at
org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NullPointerException
	at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver$5.put(ManagedBeanResolver.java:101)
	at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.putInScope(ManagedBeanResolver.java:335)
	at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.createManagedBean(ManagedBeanResolver.java:310)
	at
org.apache.myfaces.el.unified.resolver.ManagedBeanResolver.getValue(ManagedBeanResolver.java:266)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
	at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142)
	at
org.apache.myfaces.el.VariableResolverImpl.resolveVariable(VariableResolverImpl.java:65)
	at
org.apache.myfaces.custom.redirectTracker.RedirectTrackerVariableResolver.resolveVariable(RedirectTrackerVariableResolver.java:41)
	at
org.apache.myfaces.custom.security.SecurityContextVariableResolver.resolveVariable(SecurityContextVariableResolver.java:45)
	at
org.apache.shale.faces.ShaleVariableResolver.resolveVariable(ShaleVariableResolver.java:152)
	at
org.apache.myfaces.custom.redirectTracker.RedirectTrackerVariableResolver.resolveVariable(RedirectTrackerVariableResolver.java:41)
	at
org.apache.myfaces.custom.security.SecurityContextVariableResolver.resolveVariable(SecurityContextVariableResolver.java:45)
	at
org.jboss.jsfunit.seam.ConversationScopeVariableResolver.resolveVariable(ConversationScopeVariableResolver.java:66)
	at
org.springframework.web.jsf.DelegatingVariableResolver.resolveOriginal(DelegatingVariableResolver.java:122)
	at
org.springframework.web.jsf.DelegatingVariableResolver.resolveVariable(DelegatingVariableResolver.java:107)
	at
org.apache.myfaces.el.convert.VariableResolverToELResolver.getValue(VariableResolverToELResolver.java:116)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
	at
org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142)
	at
org.apache.myfaces.el.VariableResolverToApplicationELResolverAdapter.resolveVariable(VariableResolverToApplicationELResolverAdapter.java:45)
	at
org.apache.shale.view.faces.ViewViewHandler.setupViewController(ViewViewHandler.java:233)
	at
org.apache.shale.view.faces.ViewViewHandler.createView(ViewViewHandler.java:126)
	at
org.jenia.faces.template.handler.ViewHandler.createView(ViewHandler.java:251)
	at
com.sun.facelets.FaceletViewHandler.createView(FaceletViewHandler.java:799)
	at
org.ajax4jsf.application.ViewHandlerWrapper.createView(ViewHandlerWrapper.java:79)
	at
org.ajax4jsf.application.AjaxViewHandler.createView(AjaxViewHandler.java:93)
	at
org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:195)
	at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:171)
	... 58 more

-- 
View this message in context: http://old.nabble.com/My-Faces-2.0.4-generates-NullPointer-if-bean-scope-is-%22view%22-tp31260576p31260576.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Mime
View raw message