JBoss not picking up JSF Managed Bean properly duing deploym
smithbstl Jan 25, 2007 3:32 PMI have a weird problem that seems to occur at random. When deploying a JavaServer Faces web application, JBoss seems to not properly load a managed bean from the faces-config.xml file in the web app.
{Note this app is using
JBoss 4.0.5GA
MyFaces 1.1.3
Facelets 1.1.11
Apache Trinidad - fairly recent build
Netbeans 5.5 - Development Environ}
I get this error message
javax.faces.el.PropertyNotFoundException: /WEB-INF/facelets/AddressLookupSingleAddress.xhtml @12,61
value="#{AddressLookup.addressNumber}": Target Unreachable, identifier 'AddressLookup' resolved to nullIn looking at the server logs, when the bean gets properly loaded,
this is the relevant output duing deployment
DEBUG [com.sun.faces.config.beans.FacesConfigBean] addManagedBean(mypackage.backing.AddressLookup)
when it does not load properly,
this is the output
DEBUG [com.sun.faces.config.beans.FacesConfigBean] addManagedBean(AddressLookup)
Here is my faces-config.xml (located in WEB-INF)
<?xml version='1.0' encoding='UTF-8'?> <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd"> <!-- =========== FULL CONFIGURATION FILE ================================== --> <faces-config> <application> <default-render-kit-id> org.apache.myfaces.trinidad.core </default-render-kit-id> <locale-config> <default-locale>en</default-locale> </locale-config> <message-bundle>com.stlouiscity.csb.jsf.ErrorMessages</message-bundle> </application> <managed-bean> <managed-bean-name>AddressLookup</managed-bean-name> <managed-bean-class>mypackage.backing.AddressLookup</managed-bean-class> <managed-bean-scope>request</managed-bean-scope> </managed-bean> </faces-config>
This is the stack trace I get
2007-01-25 13:59:30,984 ERROR [STDERR] Jan 25, 2007 1:59:30 PM com.sun.facelets.FaceletViewHandler handleRenderException
SEVERE: Error Rendering View[/AddressLookup.xhtml]
javax.faces.el.PropertyNotFoundException: /WEB-INF/facelets/AddressLookupSingleAddress.xhtml @12,61 value="#{AddressLookup.addressNumber}": Target Unreachable, identifier 'AddressLookup' resolved to null
at com.sun.facelets.el.LegacyValueBinding.isReadOnly(LegacyValueBinding.java:84)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.EditableValueRenderer.getReadOnly(EditableValueRenderer.java:233)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.FormElementRenderer.renderAsElement(FormElementRenderer.java:174)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.getLabelFor(InputLabelAndMessageRenderer.java:75)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer$Label.getForId(LabelAndMessageRenderer.java:597)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.OutputLabelRenderer.encodeAll(OutputLabelRenderer.java:84)
at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:297)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer._renderLabelCell(LabelAndMessageRenderer.java:339)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:253)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.InputLabelAndMessageRenderer.encodeAll(InputLabelAndMessageRenderer.java:117)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:700)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:263)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:280)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelLabelAndMessageRenderer.renderFieldCellContents(PanelLabelAndMessageRenderer.java:102)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer._renderFieldCell(LabelAndMessageRenderer.java:367)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.LabelAndMessageRenderer.encodeAll(LabelAndMessageRenderer.java:263)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:700)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:263)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:741)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelFormLayoutRenderer._encodeFormColumns(PanelFormLayoutRenderer.java:667)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:309)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:195)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:700)
at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode._renderComponent(UIComponentUINode.java:329)
at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UIComponentUINode.java:273)
at org.apache.myfaces.trinidadinternal.uinode.UIComponentUINode.render(UIComponentUINode.java:250)
at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderChild(BaseRenderer.java:423)
at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:341)
at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderIndexedChild(BaseRenderer.java:233)
at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.renderContent(BaseRenderer.java:140)
at org.apache.myfaces.trinidadinternal.ui.laf.base.desktop.PanelTabbedRenderer.renderContent(PanelTabbedRenderer.java:108)
at org.apache.myfaces.trinidadinternal.ui.BaseRenderer.render(BaseRenderer.java:91)
at org.apache.myfaces.trinidadinternal.ui.laf.base.xhtml.XhtmlLafRenderer.render(XhtmlLafRenderer.java:79)
at org.apache.myfaces.trinidadinternal.uinode.UIXComponentUINode.renderInternal(UIXComponentUINode.java:189)
at org.apache.myfaces.trinidadinternal.uinode.UINodeRendererBase.encodeEnd(UINodeRendererBase.java:66)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:700)
at org.apache.myfaces.trinidad.render.RenderUtils.encodeRecursive(RenderUtils.java:70)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:258)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:280)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.renderContent(PanelPartialRootRenderer.java:70)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.renderContent(BodyRenderer.java:134)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PanelPartialRootRenderer.encodeAll(PanelPartialRootRenderer.java:150)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.BodyRenderer.encodeAll(BodyRenderer.java:76)
at org.apache.myfaces.trinidad.render.CoreRenderer.delegateRenderer(CoreRenderer.java:297)
at org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.DocumentRenderer.encodeAll(DocumentRenderer.java:78)
at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:184)
at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:700)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:178)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:367)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:327)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:291)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:214)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:93)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector
2007-01-25 13:59:30,984 ERROR [STDERR] .CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)
2007-01-25 13:59:31,000 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,015 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,015 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,015 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,031 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,046 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,046 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,093 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,093 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,093 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,093 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,093 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,093 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,093 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,109 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,109 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,109 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,109 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,109 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,109 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,109 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,109 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,109 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:null
2007-01-25 13:59:31,125 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,125 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22
2007-01-25 13:59:31,140 DEBUG [com.sun.faces.el.VariableResolverImpl] resolveVariable: Resolved variable:com.sun.facelets.tag.jsf.core.LoadBundleHandler$ResourceBundleMap@1721e22Its weird because sometimes all I have to do is rebuild the application (no changes) and it works (until the next rebuild ;) )