4 Replies Latest reply on Jun 9, 2009 1:02 AM by Alan Santos

    Seam 2.1.2 ejbql

    Alan Santos Newbie
      Hello!

      I'm trying to upgrade my Seam framework to version 2.1.2CR2, but my queries (ejbql) doesn't work anymore. It works normally in 2.1.1 version.

      The query is on the style "select new ProductHelper(product, details) from Product product right join product.details details..."

      I have the following error when access the page that uses this query:

      |19:31:34,707 ERROR [STDERR] 04/06/2009 19:31:34 com.sun.facelets.FaceletViewHandler handleRenderException
      SEVERE: Error Rendering View[/products/browse.xhtml]
      javax.faces.FacesException: javax.el.ELException: /WEB-INF/components/extensions/data-table-browse.xhtml @26,38 value="(#{value.firstResult + 1} - #{value.nextFirstResult} de #{value.resultCount})": Error reading 'resultCount' on type br.com.riskoffice.products.ui.web.NumeracaProductsQuery_$$_javassist_seam_62
              at javax.faces.component.UIOutput.getValue(UIOutput.java:176)
              at com.sun.faces.renderkit.html_basic.HtmlBasicInputRenderer.getValue(HtmlBasicInputRenderer.java:189)
              at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.getCurrentValue(HtmlBasicRenderer.java:320)
              at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeEnd(HtmlBasicRenderer.java:200)
              at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
              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.FragmentRendererBase.doEncodeChildren(FragmentRendererBase.java:29)
              at org.jboss.seam.ui.util.cdk.RendererBase.encodeChildren(RendererBase.java:92)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
              at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:812)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:886)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
              at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
              at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
              at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
              at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
              at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
              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:178)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
              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:60)
              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:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              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:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:856)
              at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:566)
              at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
              at java.lang.Thread.run(Thread.java:636)
      Caused by: javax.el.ELException: /WEB-INF/components/extensions/data-table-browse.xhtml @26,38 value="(#{value.firstResult + 1} - #{value.nextFirstResult} de #{value.resultCount})": Error reading 'resultCount' on type br.com.riskoffice.products.ui.web.NumeracaProductsQuery_$$_javassist_seam_62
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:76)
              at javax.faces.component.UIOutput.getValue(UIOutput.java:173)
              ... 64 more
      Caused by: java.lang.IllegalStateException: invalid select clause for query
              at org.jboss.seam.framework.Query.getCountEjbql(Query.java:319)

      There some changes in new version to user ejbql queries? Other ejbql queries in my system (that not use "select new") still works normally.

      Thanks for help!