You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by David Schlotfeldt <tc...@plauditdesign.com> on 2006/02/15 22:13:35 UTC

exception when using an EAR

I have attached a zip... (well attached if it isn't removed by the
mailing list) that contains the source and EAR file I am having an issue
with. This is a very very simple example I put together to show the issue.

The EAR contains a WAR and a JAR. The problem is myfaces finds the
backing bean that are in the JAR when a page from the WAR is accessed
but for some reason throws the exception below when its creating the
table. If I put what is in the JAR currently into WEB-INF/classes of the
WAR I have no problems.

How do I get it so I can have the classes in the JAR?
(I need this because in my actual project the JAR is an EAR and I don't
want those classes in the WAR.)
Also just to note, I am not using the myfaces that comes with jboss
because version 1.1.1 of myfaces that comes with jboss has 2 bugs that I
need fixed and the bugs are fixed in the nightly build. I have removed
faces from jboss and packaged the nightly builds of myfaces with the WAR.

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.test_jspx._jspx_meth_t_dataTable_0(org.apache.jsp.test_jspx:169)
     at
org.apache.jsp.test_jspx._jspx_meth_h_form_0(org.apache.jsp.test_jspx:131)
     at
org.apache.jsp.test_jspx._jspx_meth_f_view_0(org.apache.jsp.test_jspx:106)
     at org.apache.jsp.test_jspx._jspService(org.apache.jsp.test_jspx:74)
     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.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,
David


Re: exception when using an EAR

Posted by David Schlotfeldt <tc...@plauditdesign.com>.
Thanks for trying to look at it. I got it working :-)

I placed the myfaces JARs in the EAR. At first it didn't work because 
they were also in WEB-INF/lib which was causing an issue. After removing 
them from WEB-INF/lib it now works.

(FYI Since I got it working I did move the myfaces JARs back in to the 
WAR. There were some classes in the EJB JAR that were using a class from 
faces and that is why I had to do what i was doing. I moved those 
classes to WEB-INF/classes since they were backing beans -- not EJBs.)

So.. if someone is to have this problem -- Move myfaces JARs into the 
EAR and remove them from the WAR.

Thanks,
David

Adam Brod wrote:

>
> I can't open the zip. Can you include the source for the offending 
> JSP, the Backing Bean and part of faces-config.xml where the backing 
> bean is configured?
> *
> Adam Brod*/
> Product Development Team/
>
> *David Schlotfeldt <tc...@plauditdesign.com>*
>
> 02/15/2006 04:13 PM
> Please respond to
> "MyFaces Discussion" <us...@myfaces.apache.org>
>
>
> 	
> To
> 	users@myfaces.apache.org
> cc
> 	
> Subject
> 	exception when using an EAR
>
>
>
> 	
>
>
>
>
>
> I have attached a zip... (well attached if it isn't removed by the
> mailing list) that contains the source and EAR file I am having an issue
> with. This is a very very simple example I put together to show the issue.
>
> The EAR contains a WAR and a JAR. The problem is myfaces finds the
> backing bean that are in the JAR when a page from the WAR is accessed
> but for some reason throws the exception below when its creating the
> table. If I put what is in the JAR currently into WEB-INF/classes of the
> WAR I have no problems.
>
> How do I get it so I can have the classes in the JAR?
> (I need this because in my actual project the JAR is an EAR and I don't
> want those classes in the WAR.)
> Also just to note, I am not using the myfaces that comes with jboss
> because version 1.1.1 of myfaces that comes with jboss has 2 bugs that I
> need fixed and the bugs are fixed in the nightly build. I have removed
> faces from jboss and packaged the nightly builds of myfaces with the WAR.
>
> 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.test_jspx._jspx_meth_t_dataTable_0(org.apache.jsp.test_jspx:169)
>     at
> org.apache.jsp.test_jspx._jspx_meth_h_form_0(org.apache.jsp.test_jspx:131)
>     at
> org.apache.jsp.test_jspx._jspx_meth_f_view_0(org.apache.jsp.test_jspx:106)
>     at org.apache.jsp.test_jspx._jspService(org.apache.jsp.test_jspx:74)
>     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.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,
> David
>
> [attachment "test.zip" deleted by Adam Brod/RnD/Intralinks_NY] 


Re: exception when using an EAR

Posted by Adam Brod <AB...@intralinks.com>.
I can't open the zip. Can you include the source for the offending JSP, 
the Backing Bean and part of faces-config.xml where the backing bean is 
configured?

Adam Brod
Product Development Team


David Schlotfeldt <tc...@plauditdesign.com> 
02/15/2006 04:13 PM
Please respond to
"MyFaces Discussion" <us...@myfaces.apache.org>


To
users@myfaces.apache.org
cc

Subject
exception when using an EAR






I have attached a zip... (well attached if it isn't removed by the
mailing list) that contains the source and EAR file I am having an issue
with. This is a very very simple example I put together to show the issue.

The EAR contains a WAR and a JAR. The problem is myfaces finds the
backing bean that are in the JAR when a page from the WAR is accessed
but for some reason throws the exception below when its creating the
table. If I put what is in the JAR currently into WEB-INF/classes of the
WAR I have no problems.

How do I get it so I can have the classes in the JAR?
(I need this because in my actual project the JAR is an EAR and I don't
want those classes in the WAR.)
Also just to note, I am not using the myfaces that comes with jboss
because version 1.1.1 of myfaces that comes with jboss has 2 bugs that I
need fixed and the bugs are fixed in the nightly build. I have removed
faces from jboss and packaged the nightly builds of myfaces with the WAR.

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.test_jspx._jspx_meth_t_dataTable_0(org.apache.jsp.test_jspx:169)
     at
org.apache.jsp.test_jspx._jspx_meth_h_form_0(org.apache.jsp.test_jspx:131)
     at
org.apache.jsp.test_jspx._jspx_meth_f_view_0(org.apache.jsp.test_jspx:106)
     at org.apache.jsp.test_jspx._jspService(org.apache.jsp.test_jspx:74)
     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.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,
David

[attachment "test.zip" deleted by Adam Brod/RnD/Intralinks_NY]