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

时间:2011-05-31 19:09:49

标签: jsf dependency-injection resources managed-bean

我有一个JSF managedbean

当从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:在托管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]'

2 个答案:

答案 0 :(得分:20)

  

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

此异常仅表示托管bean创建失败,因为在托管bean的资源注入期间发生了错误。哦等等,这就是异常已经说明的了。

好吧,想象一下你在bean构造过程中注入的bean上有@Resource@EJBManagedProperty等注释。在构造该资源期间发生异常时,您将获得此异常。

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


更新:最后,这是答案,跟踪的最底部:

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

答案 1 :(得分:1)

我最近在Weblogic 12c上运行的Java EE 6 / JSF应用程序上遇到了类似的错误。

每当我尝试编辑JSF支持bean,&#34; UsersController&#34;,然后使用maven重建时,我会得到这个:

com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean usersController
    at com.sun.faces.mgbean.BeanBuilder.injectResources(BeanBuilder.java:211)
    at com.sun.faces.mgbean.BeanBuilder.build(BeanBuilder.java:103)
    at com.sun.faces.mgbean.BeanManager.createAndPush(BeanManager.java:408)

...

weblogic.servlet.internal.WebComponentContributor.inject(WebComponentContributor.java:299)
    at com.bea.faces.WeblogicInjectionProvider.inject(WeblogicInjectionProvider.java:29)
    ... 62 more
**Caused by**: com.bea.core.repackaged.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [jpa.session.UsersFacade] is defined: No beans of type jpa.session.UsersFacade; 

我的解决方案是这样的:在Netbeans中构建应用程序后,我不得不进入Weblogic控制台并更新Web应用程序。这似乎消除了错误。

我发布了症状和治疗方法。如果有人知道&#34;为什么&#34;对于这个问题,请随意加入。