Generated application throws javax.el.PropertyNotFoundException on runtime on prefixed
table
--------------------------------------------------------------------------------------------
Key: JBSEAM-3931
URL:
https://jira.jboss.org/jira/browse/JBSEAM-3931
Project: Seam
Issue Type: Bug
Components: JSF Integration
Affects Versions: 2.1.1.GA
Environment: WinVista + WinXP; JBoss AS 5.0.0 GA; Java 1.6.; MySql 5.0.51 +
Oracle 9.0.2;
Reporter: Roel Verbunt
Priority: Minor
I generated a seam-project for a company database with prefix 'C_' in table names.
Generate (as EAR), compile and deploy were without errors. I could even start the home
page, but when I clicked on a xxxList from the top row, a
javax.el.PropertyNotFoundException was thrown.
Complete message: javax.faces.FacesException: javax.el.PropertyNotFoundException:
/XPersonsList.xhtml @19,85 value="#{xPersonsList.xPersons.address}": Property
'xPersons' not found on type org.jboss.seam.test.XPersonsList_$$_javassist_2
I was really confused with this message because the XPersonsList class DID have a xPersons
property. Deployment as WAR doesn't make a difference. After some experiments I found
out the same table had no problems when I removed the table prefix, so e.g. X_PERSONS
renamed to just PERSONS.
I generated a sample application with just 2 similar tables on a MySQL DB , one with
prefix and one without.
CREATE TABLE "persons" (
"id" smallint(6) NOT NULL auto_increment,
"city" varchar(50) NOT NULL,
"email" varchar(100) default NULL,
"name" varchar(50) NOT NULL,
"houseno" smallint(6) NOT NULL,
"initials" varchar(10) NOT NULL,
"address" varchar(50) NOT NULL,
"zipcode" varchar(10) default NULL,
PRIMARY KEY ("id"),
UNIQUE KEY "id" ("id")
) ;
CREATE TABLE "x_persons" (
"id" smallint(6) NOT NULL auto_increment,
"city" varchar(50) NOT NULL,
"email" varchar(100) default NULL,
"name" varchar(50) NOT NULL,
"houseno" smallint(6) NOT NULL,
"initials" varchar(10) NOT NULL,
"address" varchar(50) NOT NULL,
"zipcode" varchar(10) default NULL,
PRIMARY KEY ("id"),
UNIQUE KEY "id" ("id")
);
The application showed a Persons List and a XPersons List on the homepage. Entering data
to the PERSONS table works as expected, but clicking the XPersons List throws the
exception.
Full stack trace:
javax.faces.FacesException: javax.el.PropertyNotFoundException: /XPersonsList.xhtml @19,85
value="#{xPersonsList.xPersons.address}": Property 'xPersons' not found
on type org.jboss.seam.test.XPersonsList_$$_javassist_2
at javax.faces.component.UIOutput.getValue(UIOutput.java:187)
at
com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:201)
at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:284)
at
com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:154)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
at org.jboss.seam.ui.util.cdk.RendererBase.renderChild(RendererBase.java:190)
at org.jboss.seam.ui.util.cdk.RendererBase.renderChildren(RendererBase.java:166)
at
org.jboss.seam.ui.renderkit.DecorateRendererBase.doEncodeChildren(DecorateRendererBase.java:146)
at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:282)
at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:262)
at
org.richfaces.renderkit.html.SimpleToggleControlTemplate.doEncodeChildren(SimpleToggleControlTemplate.java:347)
at
org.richfaces.renderkit.html.SimpleToggleControlTemplate.doEncodeChildren(SimpleToggleControlTemplate.java:342)
at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:121)
at
org.richfaces.renderkit.html.SimpleTogglePanelRenderer.encodeChildren(SimpleTogglePanelRenderer.java:208)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:930)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:196)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:177)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:267)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:380)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:507)
at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.web.HotDeployFilter.doFilter(HotDeployFilter.java:53)
at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: javax.el.PropertyNotFoundException: /XPersonsList.xhtml @19,85
value="#{xPersonsList.xPersons.address}": Property 'xPersons' not found
on type org.jboss.seam.test.XPersonsList_$$_javassist_2
at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)
at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
... 71 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira