0 Replies Latest reply on Mar 25, 2007 4:04 PM by ir vega

    seam-gen generated code gives: SEVERE: Error Rendering View[

    ir vega Newbie

      I run the script below to generate some simple tables and insert a bit of data.
      I use seam-gen to create my project settings and then generate a project (m2m) and the entities.
      I use the generated ant script to deploy.
      I open the browser at the m2m home page.
      I click on the "A List" menu and see my A record.
      I click on the "B List" menu and see my B records.

      All good up to this point.

      I click on the "AB List" menu and ... not so good.


      The db script I use to create/populate the database looks like ...

      CREATE MEMORY TABLE A(ID_ BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,DEFN VARCHAR(11));
      
      CREATE MEMORY TABLE B(ID_ BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,DEFN VARCHAR(11));
      
      CREATE MEMORY TABLE A_B(ID_ BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) NOT NULL PRIMARY KEY,A_ID BIGINT NOT NULL,B_ID BIGINT NOT NULL,CONSTRAINT VALID_A FOREIGN KEY(A_ID) REFERENCES A(ID_),CONSTRAINT VALID_B FOREIGN KEY(B_ID) REFERENCES B(ID_));
      
      INSERT INTO A VALUES(1,'a01');
      INSERT INTO B VALUES(1,'b01');
      INSERT INTO B VALUES(2,'b02');
      INSERT INTO A_B VALUES(1,1,1);
      
      


      ... and here's the stack trace.

      
      20:38:20,781 INFO [STDOUT] Hibernate: select top ? a0_.ID_ as ID1_0_, a0_.DEFN as DEFN0_ from PUBLIC.A a0_
      20:38:22,937 INFO [STDOUT] Hibernate: select top ? ab0_.ID_ as ID1_1_, ab0_.B_ID as B2_1_, ab0_.A_ID as A3_1_ from PUBLIC.A_B ab0_
      20:38:23,093 ERROR [STDERR] 25-Mar-2007 20:38:23 com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/ABList.xhtml]
      javax.faces.el.PropertyNotFoundException: Bean: m2m.BHome$$EnhancerByCGLIB$$c9f31ea1, property: bId
       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.jboss.seam.core.Expressions$1.getValue(Expressions.java:57)
       at org.jboss.seam.pages.Param.getValueFromModel(Param.java:93)
       at org.jboss.seam.core.Pages.getPageParameterValue(Pages.java:582)
       at org.jboss.seam.core.Pages.getConvertedParameters(Pages.java:558)
       at org.jboss.seam.ui.HtmlButton.encodeBegin(HtmlButton.java:135)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:242)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
       at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
       at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:221)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
       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.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
       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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       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.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)
      20:38:23,234 INFO [STDOUT] Hibernate: select count(*) as col_0_0_ from PUBLIC.A_B ab0_
      20:41:58,062 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
      20:42:04,203 INFO [STDOUT] Hibernate: select top ? b0_.ID_ as ID1_2_, b0_.DEFN as DEFN2_ from PUBLIC.B b0_
      20:42:04,218 INFO [STDOUT] Hibernate: select top ? b0_.ID_ as ID1_2_, b0_.DEFN as DEFN2_ from PUBLIC.B b0_
      20:42:04,687 INFO [STDOUT] Hibernate: select top ? b0_.ID_ as ID1_2_, b0_.DEFN as DEFN2_ from PUBLIC.B b0_
      20:42:09,796 INFO [STDOUT] Hibernate: select top ? b0_.ID_ as ID1_2_, b0_.DEFN as DEFN2_ from PUBLIC.B b0_
      20:42:10,015 INFO [STDOUT] Hibernate: select top ? b0_.ID_ as ID1_2_, b0_.DEFN as DEFN2_ from PUBLIC.B b0_
      20:42:13,078 INFO [STDOUT] Hibernate: select top ? b0_.ID_ as ID1_2_, b0_.DEFN as DEFN2_ from PUBLIC.B b0_
      20:42:13,203 INFO [STDOUT] Hibernate: select top ? b0_.ID_ as ID1_2_, b0_.DEFN as DEFN2_ from PUBLIC.B b0_
      20:42:16,031 INFO [STDOUT] Hibernate: select top ? a0_.ID_ as ID1_0_, a0_.DEFN as DEFN0_ from PUBLIC.A a0_
      20:42:17,531 INFO [STDOUT] Hibernate: select top ? b0_.ID_ as ID1_2_, b0_.DEFN as DEFN2_ from PUBLIC.B b0_
      20:42:18,609 INFO [STDOUT] Hibernate: select top ? ab0_.ID_ as ID1_1_, ab0_.B_ID as B2_1_, ab0_.A_ID as A3_1_ from PUBLIC.A_B ab0_
      20:42:18,640 ERROR [STDERR] 25-Mar-2007 20:42:18 com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/ABList.xhtml]
      javax.faces.el.PropertyNotFoundException: Bean: m2m.BHome$$EnhancerByCGLIB$$c9f31ea1, property: bId
       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.jboss.seam.core.Expressions$1.getValue(Expressions.java:57)
       at org.jboss.seam.pages.Param.getValueFromModel(Param.java:93)
       at org.jboss.seam.core.Pages.getPageParameterValue(Pages.java:582)
       at org.jboss.seam.core.Pages.getConvertedParameters(Pages.java:558)
       at org.jboss.seam.ui.HtmlLink.encodeBegin(HtmlLink.java:127)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:433)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:419)
       at org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:440)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.renderColumnBody(HtmlTableRendererBase.java:332)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeColumnChild(HtmlTableRendererBase.java:301)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:277)
       at org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:123)
       at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:244)
       at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:573)
       at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
       at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:221)
       at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
       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.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
       at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
       at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
       at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
       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.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       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.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)
      20:42:18,937 INFO [STDOUT] Hibernate: select count(*) as col_0_0_ from PUBLIC.A_B ab0_