13 Replies Latest reply on Apr 21, 2009 12:57 PM by jaya kemmannu

    Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:

    jaya kemmannu Newbie
      hi, im my new to seam application.can anyone please help me to solve this error, I'm grateful to you In my application  when i click button i will get an error
      like this
      :
      10:28:31,257 ERROR [viewhandler] Error Rendering View[/ClaimList.xhtml]
      javax.faces.FacesException: javax.el.PropertyNotFoundException: /ClaimList.xhtml @21,78 value="#{claimSearch.find}": Property 'find' not found on type org.javassist.tmp.java.lang.Object_$$_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:936)
              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:936)
              at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
              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:109)
              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:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
              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:241)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
              at java.lang.Thread.run(Unknown Source)
      Caused by: javax.el.PropertyNotFoundException: /ClaimList.xhtml @21,78 value="#{claimSearch.find}": Property 'find' not found on type org.javassist.tmp.java.lang.Object_$$_javassist_2
              at com.sun.facelets.el.TagValueExpression.getValue(TagValueExpression.java:73)
              at javax.faces.component.UIOutput.getValue(UIOutput.java:184)
              ... 69 more


      _My xhtml file is_


      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
          xmlns:s="http://jboss.com/products/seam/taglib"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:rich="http://richfaces.org/rich"
          xmlns:a="http://richfaces.org/a4j"
          template="layout/template.xhtml"
                      xmlns:a4j="http://richfaces.org/a4j">

      <ui:define name="body">

          <h:form id="searchCriteria" styleClass="edit">

              <rich:simpleTogglePanel label="Search Claims" switchType="ajax">

                  <s:decorate template="layout/display.xhtml">
                     
                      <h:inputText id="searchString" value="#{claimSearch.find}" />
                        <a:support id="onkeyup" event="onkeyup" actionListener="#{claimSearch.find}"   reRender="searchResults">                                        
                        </a:support>
                        <a:commandButton id="findClaims" value="Find Claims" action="#{claimSearch.find}" reRender="searchResults"></a:commandButton>
                  </s:decorate>
                  <s:decorate template="layout/display.xhtml">
                    <h:outputLabel id="maximumResultsLabel" for="pageSize" > Maximum Results </h:outputLabel>
                      <h:selectOneMenu id="pageSize" value="#{claimSearch.pageSize}">
                                      <f:selectItem id="PageSize5" itemLabel="5" itemValue="5"/>
                                      <f:selectItem id="PageSize10" itemLabel="10" itemValue="10"/>
                                      <f:selectItem id="PageSize20" itemLabel="20" itemValue="20"/>
                              </h:selectOneMenu></s:decorate>
                    </rich:simpleTogglePanel>
              
               
               <rich:panel id="searchResults">
                        <h:outputLabel id="NoClaimsFoundMessage" value="No Claims Found" rendered="#{claims !=null  and claims.rowCount==0}" />
                       
                        <rich:dataTable id="claims" value="#{claims}" var="cla" rendered="#{claims.rowCount>0}">
                                  <!-- <h:column id="column1">
                                         <f:facet id="ClaimIDFacet" name="header">ClaimID</f:facet>
                                            #{cla.instance.claimId}
                                  </h:column> -->
                                  <h:column id="column2">
                                         <f:facet id="ClaimAmountFacet" name="header">ClaimAmount</f:facet>
                                           #{cla.instance.claimAmount}
                                      </h:column>
                                  <h:column id="column3">
                                  <f:facet id="ClaimReasonFacet" name="header">Claim Reason</f:facet>
                                      #{cla.instance.claimReason}
                                  </h:column>
                                   
                                   <h:column id="column4">
                                          <f:facet id="PolicyIDFacet" name="header">PolicyID</f:facet>
                                              #{cla.instance.policy.policyId}
                                              </h:column>
                                  <h:column id="column5">
                                          <f:facet id="customerIDFacet" name="header">CustomerID</f:facet>
                                              #{cla.instance.customer.customerId}
                                              </h:column>
                                          <h:column id="column6">
                                         <f:facet id="LegalHeirIDFacet" name="header">LegalHeirID</f:facet>
                                              #{cla.instance.legalheir.legalHeirId}
                                              </h:column>
                                              <h:column id="column7">
                                          <f:facet id="statusIDFacet" name="header">ClaimStatusTypeID</f:facet>
                                              #{cla.instance.claimstatustype.claimStatusTypeId}
                                               </h:column>
                                    
                           </rich:dataTable>
                           <s:link id="MoreResultsLink" value="More results" action="#{claimSearch.nextPage}" rendered="#{claimSearch.nextPageAvailable}"/>
                       
                </rich:panel></h:form>
      </ui:define>

      </ui:composition>
             
      java file is like this

      package org.jboss.seam.wasteProject;
      import java.util.ArrayList;
      import java.util.List;

      import javax.ejb.Remove;
      import javax.ejb.Stateful;
      import javax.persistence.EntityManager;
      import javax.persistence.PersistenceContext;

      import org.jboss.seam.ScopeType;
      import org.jboss.seam.annotations.Factory;
      import org.jboss.seam.annotations.Name;
      import org.jboss.seam.annotations.Scope;
      import org.jboss.seam.annotations.datamodel.DataModel;
      import org.jboss.seam.annotations.security.Restrict;

      @Stateful
      @Name("claimSearch")
      @Scope(ScopeType.SESSION)
      @Restrict("#{identity.loggedIn}")

      public class ClaimSearchingAction implements ClaimSearching {
              @PersistenceContext
          private EntityManager em;
         
          private String searchString;
          private int pageSize = 10;
          private int page;
          private boolean nextPageAvailable;
         
          @DataModel
          private List<Claim> claims;
        
          @Remove
              public void destroy() {
                      // TODO Auto-generated method stub

              }

              public void find() {
                      page = 0;
              queryClaims();

              }
             
              private void queryClaims() {
              List<Claim> results = em.createQuery("select c from Claim c where lower(c.claimAmount) like #{pattern} or lower(c.claimReason) like #{pattern} or lower(c.policyId) like #{pattern} or lower(c.customerId) like #{pattern} or lower(c.legalHeirId) like #{pattern} or lower(statusTypeId) like #{pattern}")
                                      .setMaxResults(pageSize+1)
                                      .setFirstResult(page * pageSize)
                                      .getResultList();
             
              nextPageAvailable = results.size() > pageSize;
              if (nextPageAvailable)
              {
                  claims = new ArrayList<Claim>(results.subList(0,pageSize));
              } else {
                  claims = results;
              }
          }

              public int getPageSize() {
                      return pageSize;
              }
              @Factory(value="pattern", scope=ScopeType.EVENT)
              public String getSearchPattern() {
                      return searchString==null ?
                          "%" : '%' + searchString.toLowerCase().replace('*', '%') + '%';
              }

              public String getSearchString() {
                      return searchString;
              }

              public boolean isNextPageAvailable() {
                      return nextPageAvailable;
              }

              public void nextPage() {
                      page++;
              queryClaims();

              }

              public void setPageSize(int pageSize) {
                      this.pageSize = pageSize;

              }

              public void setSearchString(String searchString) {
                      this.searchString = searchString;

              }

      }

         
         
           
             


        • 1. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
          Stuart Douglas Master

          Is the find method declared on the local interface ClaimSearching?

          • 2. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
            jaya kemmannu Newbie

            Hi Stuart, I have already declared find mathed in Local interface ClaimSearching. thanks for your Reply, could you please find out the Error?

            • 3. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
              Stuart Douglas Master

              The error is here:



              <h:inputText id="searchString" value="#{claimSearch.find}" />
              



              find is a method, inputText needs it value to b a property. It should probably be:


              <h:inputText id="searchString" value="#{claimSearch.searchString}" />
              

              • 4. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                jaya kemmannu Newbie
                Hi Stuart, I have made the modifications suggested by you, thanks for your valuable information as i'm new to the Seam.Now the Error is Like this as shown below, do i need to modify my .xml files ie pages.xml or web.xml etc. Once again Thanks for valuable Information.
                The Error is


                12:26:42,052 ERROR [application] /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                javax.faces.el.EvaluationException: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
                        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
                        at javax.faces.component.UICommand.broadcast(UICommand.java:387)
                        at org.ajax4jsf.component.AjaxActionComponent.broadcast(AjaxActionComponent.java:55)
                ...........
                ...........
                Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
                        at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
                        at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
                ........
                ........
                ........
                Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:616)
                        at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:95)
                ........
                ........
                ........
                Caused by: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:44)
                ........
                ........
                12:26:42,052 WARN  [lifecycle] #{claimSearch.find}: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                javax.faces.FacesException: #{claimSearch.find}: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
                .........
                .........
                Caused by: javax.faces.el.EvaluationException: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
                        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
                        ... 51 more
                Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
                ......
                ......
                Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:616)
                .......
                ......
                Caused by: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:44)
                ......
                12:26:42,068 ERROR [lifecycle] JSF1054: (Phase ID: INVOKE_APPLICATION 5, View ID: /ClaimList.xhtml) Exception thrown during phase execution: javax.faces.event.PhaseEvent[source=com.sun.faces.lifecycle.LifecycleImpl@1cf1d17]
                12:26:42,068 WARN  [ExceptionFilter] handling uncaught exception
                javax.servlet.ServletException: #{claimSearch.find}: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
                        at.........
                ...
                Caused by: javax.faces.FacesException: #{claimSearch.find}: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
                ..........
                Caused by: javax.faces.el.EvaluationException: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
                        at com.
                ..........
                Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
                ........
                Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:616)
                ......
                Caused by: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:44)
                .....
                12:26:42,083 WARN  [ExceptionFilter] exception root cause
                javax.faces.FacesException: #{claimSearch.find}: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:118)
                .......
                Caused by: javax.faces.el.EvaluationException: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73)
                        at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
                        ... 51 more
                Caused by: javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:87)
                .......
                Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:616)
                .......
                Caused by: org.hibernate.QueryException: could not resolve property: policyId of: org.jboss.seam.wasteProject.Claim [select c from org.jboss.seam.wasteProject.Claim c where lower(c.claimAmount) like :el1 or lower(c.claimReason) like :el2 or lower(c.policyId) like :el3 or lower(c.customerId) like :el4 or lower(c.legalHeirId) like :el5 or lower(statusTypeId) like :el6]
                        at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:44)
                ....
                12:26:42,083 WARN  [ExceptionFilter] running exception handlers
                12:26:42,380 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jboss-seam-excel.jar!/META-INF/seam-excel.taglib.xml
                12:26:42,380 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
                12:26:42,380 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
                12:26:42,396 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jboss-seam-rss.jar!/META-INF/seam-rss.taglib.xml
                12:26:42,396 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/s.taglib.xml
                12:26:42,396 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
                12:26:42,396 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
                12:26:42,396 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
                12:26:42,396 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
                12:26:42,396 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
                12:26:42,396 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/a4j.taglib.xml
                12:26:42,411 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/ajax4jsf.taglib.xml
                12:26:42,411 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/jsp.taglib.xml
                12:26:42,411 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/rich.taglib.xml
                12:26:42,411 INFO  [compiler] Added Library from: jar:file:/C:/Eprojects/EnterprisePlatform-4.3.0.GA_CP03/jboss-as/server/default/deploy/wasteProject.ear/wasteProject.war/WEB-INF/lib/richfaces-ui.jar!/META-INF/richfaces.taglib.xml
                • 5. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                  Stuart Douglas Master

                  You do not have a property policyId on Claim. Can you post the Claim object?


                  I am just guessing here but do you have a Policy object that the claim object is linked to? If so then you probably want something like:


                  lower(c.policy.policyId) like #{pattern} 
                  

                  • 6. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                    jaya kemmannu Newbie
                    My claim Object look like this, I hope you have asked for this one only. One more thing i would like to specify the attributes "policyId" "legalHeirId" and "customerId" are Foreign keys in my "Claim" table.(they are primary keys in policy,legalheir,customer tables)

                    Claim.java:

                    package org.jboss.seam.wasteProject;
                    // Generated Apr 16, 2009 8:06:11 PM by Hibernate Tools 3.2.2.GA

                    import java.util.HashSet;
                    import java.util.Set;
                    import javax.persistence.CascadeType;
                    import javax.persistence.Column;
                    import javax.persistence.Entity;
                    import javax.persistence.FetchType;
                    import javax.persistence.Id;
                    import javax.persistence.JoinColumn;
                    import javax.persistence.ManyToOne;
                    import javax.persistence.OneToMany;
                    import javax.persistence.Table;
                    import org.hibernate.validator.Length;
                    import org.hibernate.validator.NotNull;

                    /**
                    * Claim generated by hbm2java
                    */
                    @Entity
                    @Table(name = "claim", catalog = "life")
                    public class Claim implements java.io.Serializable {

                         private String claimId;
                         private Customer customer;
                         private Policy policy;
                         private Claimstatustype claimstatustype;
                         private Legalheir legalheir;
                         private double claimAmount;
                         private String claimReason;
                         private Set<Workassignment> workassignments = new HashSet<Workassignment>(0);
                         private Set<Workassignment> workassignments_1 = new HashSet<Workassignment>(
                                   0);
                         private Set<Voucher> vouchers = new HashSet<Voucher>(0);
                         private Set<Workassignment> workassignments_2 = new HashSet<Workassignment>(
                                   0);
                         private Set<Voucher> vouchers_1 = new HashSet<Voucher>(0);
                         private Set<Voucher> vouchers_2 = new HashSet<Voucher>(0);

                         public Claim() {
                         }

                         public Claim(String claimId, Customer customer, Policy policy,
                                   Claimstatustype claimstatustype, Legalheir legalheir,
                                   double claimAmount, String claimReason) {
                              this.claimId = claimId;
                              this.customer = customer;
                              this.policy = policy;
                              this.claimstatustype = claimstatustype;
                              this.legalheir = legalheir;
                              this.claimAmount = claimAmount;
                              this.claimReason = claimReason;
                         }
                         public Claim(String claimId, Customer customer, Policy policy,
                                   Claimstatustype claimstatustype, Legalheir legalheir,
                                   double claimAmount, String claimReason,
                                   Set<Workassignment> workassignments,
                                   Set<Workassignment> workassignments_1, Set<Voucher> vouchers,
                                   Set<Workassignment> workassignments_2, Set<Voucher> vouchers_1,
                                   Set<Voucher> vouchers_2) {
                              this.claimId = claimId;
                              this.customer = customer;
                              this.policy = policy;
                              this.claimstatustype = claimstatustype;
                              this.legalheir = legalheir;
                              this.claimAmount = claimAmount;
                              this.claimReason = claimReason;
                              this.workassignments = workassignments;
                              this.workassignments_1 = workassignments_1;
                              this.vouchers = vouchers;
                              this.workassignments_2 = workassignments_2;
                              this.vouchers_1 = vouchers_1;
                              this.vouchers_2 = vouchers_2;
                         }

                         @Id
                         @Column(name = "ClaimID", unique = true, nullable = false, length = 30)
                         @NotNull
                         @Length(max = 30)
                         public String getClaimId() {
                              return this.claimId;
                         }

                         public void setClaimId(String claimId) {
                              this.claimId = claimId;
                         }
                         @ManyToOne(fetch = FetchType.LAZY)
                         @JoinColumn(name = "CustomerID", nullable = false)
                         @NotNull
                         public Customer getCustomer() {
                              return this.customer;
                         }

                         public void setCustomer(Customer customer) {
                              this.customer = customer;
                         }
                         @ManyToOne(fetch = FetchType.LAZY)
                         @JoinColumn(name = "PolicyID", nullable = false)
                         @NotNull
                         public Policy getPolicy() {
                              return this.policy;
                         }

                         public void setPolicy(Policy policy) {
                              this.policy = policy;
                         }
                         @ManyToOne(fetch = FetchType.LAZY)
                         @JoinColumn(name = "ClaimStatusTypeID", nullable = false)
                         @NotNull
                         public Claimstatustype getClaimstatustype() {
                              return this.claimstatustype;
                         }

                         public void setClaimstatustype(Claimstatustype claimstatustype) {
                              this.claimstatustype = claimstatustype;
                         }
                         @ManyToOne(fetch = FetchType.LAZY)
                         @JoinColumn(name = "LegalHeirID", nullable = false)
                         @NotNull
                         public Legalheir getLegalheir() {
                              return this.legalheir;
                         }

                         public void setLegalheir(Legalheir legalheir) {
                              this.legalheir = legalheir;
                         }

                         @Column(name = "ClaimAmount", nullable = false, precision = 22, scale = 0)
                         @NotNull
                         public double getClaimAmount() {
                              return this.claimAmount;
                         }

                         public void setClaimAmount(double claimAmount) {
                              this.claimAmount = claimAmount;
                         }

                         @Column(name = "ClaimReason", nullable = false, length = 45)
                         @NotNull
                         @Length(max = 45)
                         public String getClaimReason() {
                              return this.claimReason;
                         }

                         public void setClaimReason(String claimReason) {
                              this.claimReason = claimReason;
                         }
                         @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "claim")
                         public Set<Workassignment> getWorkassignments() {
                              return this.workassignments;
                         }

                         public void setWorkassignments(Set<Workassignment> workassignments) {
                              this.workassignments = workassignments;
                         }
                         @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "claim")
                         public Set<Workassignment> getWorkassignments_1() {
                              return this.workassignments_1;
                         }

                         public void setWorkassignments_1(Set<Workassignment> workassignments_1) {
                              this.workassignments_1 = workassignments_1;
                         }
                         @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "claim")
                         public Set<Voucher> getVouchers() {
                              return this.vouchers;
                         }

                         public void setVouchers(Set<Voucher> vouchers) {
                              this.vouchers = vouchers;
                         }
                         @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "claim")
                         public Set<Workassignment> getWorkassignments_2() {
                              return this.workassignments_2;
                         }

                         public void setWorkassignments_2(Set<Workassignment> workassignments_2) {
                              this.workassignments_2 = workassignments_2;
                         }
                         @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "claim")
                         public Set<Voucher> getVouchers_1() {
                              return this.vouchers_1;
                         }

                         public void setVouchers_1(Set<Voucher> vouchers_1) {
                              this.vouchers_1 = vouchers_1;
                         }
                         @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "claim")
                         public Set<Voucher> getVouchers_2() {
                              return this.vouchers_2;
                         }

                         public void setVouchers_2(Set<Voucher> vouchers_2) {
                              this.vouchers_2 = vouchers_2;
                         }

                    }




                    • 7. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                      jaya kemmannu Newbie

                      hi stuart, one more dought regarding this, do i need modify anything in web.xml, pages.xml,components.xml ??. thanks.

                      • 8. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                        Stuart Douglas Master

                        You do not need to modify anything in pages.xml or components.xml, all you need to modify is your HQL query.


                        Even though the database table has a policyId field, there is not one on the Claim object. There are two ways around this, either do a join like I said in the post above (c.policy.policyId) or add a policyId String field to Claim mapped like so:


                        String policyId;
                        
                        @Column(insertable=false, updatable=false)
                        public String getPolicyId()
                        {
                           return policyId;
                        }
                        
                        

                        • 9. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                          jaya kemmannu Newbie
                          first of all i would like to ask sorry for troubling u lot throughout the day, i modified it as told by you, the problem is the field claimAmount is of type Double in claim, whch gives an error like this

                          15:34:16,499 ERROR [application] /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: java.lang.String cannot be cast to java.lang.Double
                          javax.faces.el.EvaluationException: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: java.lang.String cannot be cast to java.lang.Double
                          ......
                          ......
                          Caused by: javax.ejb.EJBTransactionRolledbackException: java.lang.String cannot be cast to java.lang.Double
                          ........
                          Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Double
                          .......
                               ... 96 more
                          15:34:16,499 WARN  [lifecycle] #{claimSearch.find}: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: java.lang.String cannot be cast to java.lang.Double
                          javax.faces.FacesException: #{claimSearch.find}: /ClaimList.xhtml @24,126 action="#{claimSearch.find}": javax.ejb.EJBTransactionRolledbackException: java.lang.String cannot be cast to java.lang.Double
                          .....
                          .....
                          .....
                          ....
                          ......
                          • 10. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                            Stuart Douglas Master

                            try str(c.claimAmount) to cast it to a string, but are people really going to be searching on the claim amount?

                            • 11. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                              jaya kemmannu Newbie

                              thanks dear stuart, now it is fine, i troubled u a lot, im great full to your patience.thanks once again.simple doubt, as i am new to SEAM i am confused with where to start with seam? can i get any suggestion from you?

                              • 12. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                                Stuart Douglas Master

                                Just have a look at the examples and the reference manual, there are plenty of resources around.

                                • 13. Re: Help please, on javax.ejb.EJBTransactionRolledbackException: org.hibernate.QueryException:
                                  jaya kemmannu Newbie

                                  hello staurt,I have a xhtml file in my seam application say policy.xhtml.I have a field in that called as  CustomerID,which is a drop-down listbox.CustomerId is primary key in Customer table,and foreign key in Policy table, how can i populate these customerId values in listbox? how will be my policy.xhtml file and .java file? is there any necessity to write query to generate customer id in that list box? can you give suggestion?