jsf – com.sun.faces.mgbean.ManagedBeanCreationException:在托管bean上执行资源注入时发生错误

前端之家收集整理的这篇文章主要介绍了jsf – com.sun.faces.mgbean.ManagedBeanCreationException:在托管bean上执行资源注入时发生错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个JSF管理的大豆

当从WebSphere AppServer中的JSF页面引用托管bean时,我收到错误.

<h:inputText value=#{bean}/>

bean在faces-config.xml中定义为

<managed-bean>
  <managed-bean-name>bean</managed-bean-name>
  <managed-bean-class>com.test.Bean</managed-bean-class>
  <managed-bean-scope>session</managed-bean-scope>
</managed-bean>

这是例外:

com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean mailingCitySuggestions

更新:这是堆栈跟踪:

com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean mailingCitySuggestions
[5/31/11 13:37:10:506 CDT] 00000126 SystemErr     R     at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:213)
[5/31/11 13:37:10:506 CDT] 00000126 SystemErr     R     at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:108)
[5/31/11 13:37:10:506 CDT] 00000126 SystemErr     R     at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:374)
[5/31/11 13:37:10:506 CDT] 00000126 SystemErr     R     at com.sun.faces.mgbean.BeanManager.create(BeanManager.java:222)
[5/31/11 13:37:10:506 CDT] 00000126 SystemErr     R     at com.sun.faces.el.ManagedBeanELResolver.getValue(ManagedBeanELResolver.java:88)
[5/31/11 13:37:10:506 CDT] 00000126 SystemErr     R     at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
[5/31/11 13:37:10:506 CDT] 00000126 SystemErr     R     at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
[5/31/11 13:37:10:506 CDT] 00000126 SystemErr     R     at com.sun.faces.el.ChainAwareVariableResolver.resolveVariable(ChainAwareVariableResolver.java:107)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.ibm.faces.portlet.PortletVariableResolver.resolveVariable(PortletVariableResolver.java:91)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.sun.faces.el.VariableResolverChainWrapper.getValue(VariableResolverChainWrapper.java:112)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:73)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:45)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:185)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.sun.faces.application.ValueBindingValueExpressionAdapter.getValue(ValueBindingValueExpressionAdapter.java:113)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.ibm.faces.renderkit.html_extended.TypeaheadRenderer.doAnswer(TypeaheadRenderer.java:278)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.ibm.faces.renderkit.html_extended.TypeaheadRenderer.encodeBegin(TypeaheadRenderer.java:81)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeBegin(DefaultAjaxRenderer.java:64)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:802)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:934)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeChildren(DefaultAjaxRenderer.java:73)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234)
[5/31/11 13:37:10:507 CDT] 00000126 SystemErr     R     at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:118)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeChildren(DefaultAjaxRenderer.java:73)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:118)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeChildren(DefaultAjaxRenderer.java:73)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:234)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:118)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeChildren(DefaultAjaxRenderer.java:73)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at com.ibm.faces.renderkit.DefaultAjaxRenderer.encodeChildren(DefaultAjaxRenderer.java:73)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:826)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
[5/31/11 13:37:10:508 CDT] 00000126 SystemErr     R     at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:289)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:220)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.ibm.faces.portlet.PortletViewHandlerImpl.renderView(PortletViewHandlerImpl.java:79)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at hhsc.it.mtp.core.listner.InterceptingLifecycle.render(InterceptingLifecycle.java:84)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.ibm.faces.portlet.FacesPortlet.doRender(FacesPortlet.java:374)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.ibm.faces.portlet.FacesPortlet.doView(FacesPortlet.java:415)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at hhsc.it.mtp.portlet.IndividualSearchPortlet.doView(IndividualSearchPortlet.java:36)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.ibm.faces.portlet.FacesPortlet.doDispatch(FacesPortlet.java:303)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:128)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.ibm.wps.propertybroker.standard.filter.C2APortletFilter.doFilter(C2APortletFilter.java:183)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletFilterChainImpl.doFilter(PortletFilterChainImpl.java:120)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:573)
[5/31/11 13:37:10:509 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:114)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doRender(RRDServerPortletServletCollaborator.java:123)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doRender(CacheCollaborator.java:92)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.wps.pe.pc.waspc.core.impl.PortletServletCollaboratorImpl.doRender(PortletServletCollaboratorImpl.java:156)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:105)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.doDispatch(PortletServlet.java:273)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:82)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.rrd.RRDServerPortletServletCollaborator.doDispatch(RRDServerPortletServletCollaborator.java:60)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.cache.CacheCollaborator.doDispatch(CacheCollaborator.java:74)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.wps.pe.pc.waspc.core.impl.PortletServletCollaboratorImpl.doDispatch(PortletServletCollaboratorImpl.java:121)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServletCollaboratorChainImpl.doCollaborator(PortletServletCollaboratorChainImpl.java:74)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.dispatch(PortletServlet.java:208)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletServlet.service(PortletServlet.java:165)
[5/31/11 13:37:10:510 CDT] 00000126 SystemErr     R     at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:104)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:895)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:121)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.include(WebAppRequestDispatcher.java:673)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:214)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:78)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.cache.PortletInvokerCacheCollaborator.doRender(PortletInvokerCacheCollaborator.java:58)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:67)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.invoke(PortletInvokerPerformanceCollaborator.java:313)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.doInvoke(PortletInvokerPerformanceCollaborator.java:101)
[5/31/11 13:37:10:511 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.invokePMI(PortletInvokerPerformanceCollaborator.java:163)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.doInvoke(PortletInvokerPerformanceCollaborator.java:91)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.ext.PortletInvokerPerformanceCollaborator.doRender(PortletInvokerPerformanceCollaborator.java:74)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerCollaboratorChainImpl.doCollaborator(PortletInvokerCollaboratorChainImpl.java:67)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.invoker.impl.PortletInvokerImpl.render(PortletInvokerImpl.java:97)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.PortletContainerImpl.doRender(PortletContainerImpl.java:119)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.PortletContainerInvokerCollaboratorChainImpl.doCollaborator(PortletContainerInvokerCollaboratorChainImpl.java:80)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.ext.ExtCollaborator.doRender(ExtCollaborator.java:74)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.PortletContainerInvokerCollaboratorChainImpl.doCollaborator(PortletContainerInvokerCollaboratorChainImpl.java:67)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.cache.CacheInvokerCollaborator.doRender(CacheInvokerCollaborator.java:66)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.PortletContainerInvokerCollaboratorChainImpl.doCollaborator(PortletContainerInvokerCollaboratorChainImpl.java:67)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:89)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.pcinvoker.PortletInvokerImpl$2.run(PortletInvokerImpl.java:100)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at java.security.AccessController.doPrivileged(AccessController.java:251)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.ws.portletcontainer.pcinvoker.PortletInvokerImpl.invokeRender(PortletInvokerImpl.java:96)
[5/31/11 13:37:10:512 CDT] 00000126 SystemErr     R     at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl$1.invoke(PortletInvokerImpl.java:98)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl.invoke(PortletInvokerImpl.java:182)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.pe.pc.waspc.core.impl.PortletInvokerImpl.invokeRender(PortletInvokerImpl.java:96)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.pe.pc.waspc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:116)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.pe.pc.PortletContainerImpl.doRenderPortlet(PortletContainerImpl.java:641)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.pe.ext.render.AbstractRenderManager.performService(AbstractRenderManager.java:264)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.pe.pc.PortletContainerImpl.renderPortlet(PortletContainerImpl.java:132)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.extension.render.PortletFragmentRenderer.render(PortletFragmentRenderer.java:218)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.extension.render.PortletFragmentRenderer.render(PortletFragmentRenderer.java:166)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.phases.WPFragmentRenderPhase.processRendering(WPFragmentRenderPhase.java:248)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.phases.WPFragmentRenderPhase.processRendering(WPFragmentRenderPhase.java:186)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.phases.WPBaseRenderPhase.execute(WPBaseRenderPhase.java:194)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.state.phases.AbstractRenderPhase.next(AbstractRenderPhase.java:106)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.phases.WPAbstractRenderPhase.next(WPAbstractRenderPhase.java:97)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.Servlet.callPortal(Servlet.java:860)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.Servlet.doGet(Servlet.java:617)
[5/31/11 13:37:10:513 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.Servlet.doPost(Servlet.java:888)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.Servlet.doFilter(Servlet.java:1257)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.wps.resolver.servlet.ContentHandlerCleanup.doFilter(ContentHandlerCleanup.java:648)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.wps.resolver.servlet.AbstractFilter.doFilter(AbstractFilter.java:93)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.Servlet.service(Servlet.java:1248)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1655)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.ExtendedLocaleFilter.doFilter(ExtendedLocaleFilter.java:113)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.wps.resolver.friendly.servlet.FriendlySelectionFilter.doFilter(FriendlySelectionFilter.java:191)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.wps.mappingurl.impl.URLAnalyzer.doFilter(URLAnalyzer.java:381)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
[5/31/11 13:37:10:514 CDT] 00000126 SystemErr     R     at com.ibm.wps.engine.VirtualPortalFilter.doFilter(VirtualPortalFilter.java:88)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.wps.state.filter.StateCleanup.doFilter(StateCleanup.java:94)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:184)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:895)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3810)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:183)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
[5/31/11 13:37:10:515 CDT] 00000126 SystemErr     R     at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
[5/31/11 13:37:10:516 CDT] 00000126 SystemErr     R     at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[5/31/11 13:37:10:516 CDT] 00000126 SystemErr     R     at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[5/31/11 13:37:10:516 CDT] 00000126 SystemErr     R     at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[5/31/11 13:37:10:516 CDT] 00000126 SystemErr     R     at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[5/31/11 13:37:10:516 CDT] 00000126 SystemErr     R     at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[5/31/11 13:37:10:516 CDT] 00000126 SystemErr     R     at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[5/31/11 13:37:10:516 CDT] 00000126 SystemErr     R     at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[5/31/11 13:37:10:516 CDT] 00000126 SystemErr     R     at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
[5/31/11 13:37:10:516 CDT] 00000126 SystemErr     R Caused by: com.sun.faces.spi.InjectionProviderException: java.lang.NullPointerException
[5/31/11 13:37:10:517 CDT] 00000126 SystemErr     R     at com.sun.faces.vendor.WebSphereInjectionProvider.inject(WebSphereInjectionProvider.java:51)
[5/31/11 13:37:10:517 CDT] 00000126 SystemErr     R     at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:207)
[5/31/11 13:37:10:517 CDT] 00000126 SystemErr     R     ... 168 more
[5/31/11 13:37:10:517 CDT] 00000126 SystemErr     R Caused by: java.lang.NullPointerException
[5/31/11 13:37:10:518 CDT] 00000126 SystemErr     R     at java.lang.String.valueOf(String.java:1511)
[5/31/11 13:37:10:518 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.annotation.WASAnnotationHelper.inject(WASAnnotationHelper.java:261)
[5/31/11 13:37:10:518 CDT] 00000126 SystemErr     R     at com.ibm.ws.webcontainer.annotation.WASAnnotationHelper.inject(WASAnnotationHelper.java:248)
[5/31/11 13:37:10:518 CDT] 00000126 SystemErr     R     at com.sun.faces.vendor.WebSphereInjectionProvider.inject(WebSphereInjectionProvider.java:49)
[5/31/11 13:37:10:518 CDT] 00000126 SystemErr     R     ... 169 more
[5/31/11 13:37:10:562 CDT] 00000126 SystemErr     R FATAL ERROR:  'java.lang.IllegalStateException: prepareThread not called for Thread Thread[WebContainer : 23,5,main]'

解决方法

com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean

这个异常仅仅意味着托管bean创建失败,因为在管理bean的资源注入期间发生错误.哦,等等,这是例外情况已经告诉了.

那么想象一下,在bean的构造过程中,要注入的bean上有一个@Resource,@EJB,ManagedProperty等注释.当构建该资源时出现异常,那么您将获得此异常.

但是,在堆栈跟踪的底部,您应该找到在创建该资源期间发生的异常的原因的详细信息.解决相应的原因,它应该正常工作.

更新:最后,这里是答案,最底层的痕迹:

Caused by: java.lang.NullPointerException
     at java.lang.String.valueOf(String.java:1511)
     at com.ibm.ws.webcontainer.annotation.WASAnnotationHelper.inject(WASAnnotationHelper.java:261)
     at com.ibm.ws.webcontainer.annotation.WASAnnotationHelper.inject(WASAnnotationHelper.java:248)
     at com.sun.faces.vendor.WebSphereInjectionProvider.inject(WebSphereInjectionProvider.java:49)
     ... 169 more

这显然是com.ibm.ws.webcontainer.annotation.WASAnnotationHelper类中的一个错误.然而,这不在您的控制之下,因此您需要咨询IBM以进行修复.在Google中挖掘这个例外的some hits,其中包括official IBM bug report.您可以下载修订包here.

原文链接:https://www.f2er.com/java/121735.html

猜你在找的Java相关文章