I am using JBoss 4 which comes with myfaces but I don't want to use the
version it comes with (1.1.1) because it has 2 errors in it that I need
fixed. The nightly build has both fixed. I am trying to remove faces
from JBoss and have it use the version of myfaces that is with the
webapp.
This is what I did:
"To use the JSF Reference Implementation instead of the bundled MyFaces
implementation, simply delete the jbossweb-tomcat55.sar/jsf-lib
directory. Then, package the RI in your WEB-INF/lib directory as usual.
Note: You may also need to delete temp directories such as
server/default/tmp and server/default/work. See comment by Geoffery in http://jira.jboss.com/jira/browse/JBAS-1508
"
(From:
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossFaces)
When I deploy a WAR examples from the myfaces website I have no
problems. But my webapp, which I have added the myfaces jars to, is
getting an exception. I am currently trying to use the jars that came
with JBoss (even though they aren't the nightly builds) because I know
the webapp doesn't error in its current state with those JARs. I have
compared the example and my application many times and have looked
around the internet A LOT (2 days! :-/ ). The only real difference I
see is that I am creating a EAR that contains a JAR for my EJBs and a
WAR. The faces jar files are in WEB-INF/lib of the WAR file. The
myfaces example I tried was simple a WAR file.
Here is some of the jsp code from the page that gives the
exception...
------------------------------------------------------------------------------------
<f:view>
<h:form>
<h1>Counties</h1>
<h:commandButton id="countyNew" value="New"
action="" image="/images/new.jpg"/>
<t:dataTable
id="countyList"
value="#{avalonInfoFacade.counties}"
var="county"
forceIdIndexFormula="#{county.id}"
>
<h:column>
<f:facet name="header">
<f:verbatim>County</f:verbatim>
</f:facet>
<h:outputText value="#{county.id}" />
<h:outputText styleClass="countyName"
value="#{county.name}" />
..........
------------------------------------------------------------------------------------
I am pretty sure the exception is when it runs
forceIdIndexFormula="#{county.id}" Weird since 'county' should be a
County object not a ListDataModel, but the exception says its looking
for id on ListDataModel. (This error did NOT appear before I tried
moving the jars from the server's lib to the webapps lib.)
Exception.........
javax.faces.el.PropertyNotFoundException: Bean:
javax.faces.model.ListDataModel, property: id
at
org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:483)
at
org.apache.myfaces.el.PropertyResolverImpl.getPropertyDescriptor(PropertyResolverImpl.java:454)
at
org.apache.myfaces.el.PropertyResolverImpl.getProperty(PropertyResolverImpl.java:417)
at
org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:82)
at
org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
at
org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
at
org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
at
org.apache.myfaces.component.html.ext.HtmlDataTable.getForceIdIndexFormula(HtmlDataTable.java:634)
at
org.apache.myfaces.component.html.ext.HtmlDataTable.getClientId(HtmlDataTable.java:96)
at
org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:275)
at
org.apache.myfaces.component.html.ext.HtmlDataTable.setRowIndex(HtmlDataTable.java:219)
at
org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:147)
at
org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:99)
at
org.apache.myfaces.renderkit.html.ext.HtmlTableRenderer.encodeChildren(HtmlTableRenderer.java:113)
at
javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
at
javax.faces.webapp.UIComponentTag.encodeChildren(UIComponentTag.java:474)
at
javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:361)
at
org.apache.myfaces.taglib.UIComponentBodyTagBase.doEndTag(UIComponentBodyTagBase.java:55)
at
org.apache.jsp.members.index_jspx._jspx_meth_t_dataTable_0(org.apache.jsp.members.index_jspx:230)
at
org.apache.jsp.members.index_jspx._jspx_meth_h_form_0(org.apache.jsp.members.index_jspx:173)
at
org.apache.jsp.members.index_jspx._jspx_meth_f_view_0(org.apache.jsp.members.index_jspx:139)
at
org.apache.jsp.members.index_jspx._jspService(org.apache.jsp.members.index_jspx:107)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
at
org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
at
org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
at
org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
at
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
at
org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:372)
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.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:124)
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:81)
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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
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)
Thanks. Let me know if you need more of the code.
David