-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Mapping / search problem - please help
PostPosted: Tue Mar 07, 2006 6:03 pm 
Beginner
Beginner

Joined: Thu Jun 30, 2005 5:07 am
Posts: 33
Hi, I have Class Employee and class EmployeeRootParam. they are in many to many relationship. EmployeeRootParam has ParamType class with boolean member name enabled and userViewRight as Integer.

I try to find all the EmployeeRootParam that has ParamType.enabled equal true and userViewRight greater than 2.
I use the query as follow:

Criteria paramCriteria = HibernateSessionFilter.getSession().createCriteria(EmployeeRootParam.class);

paramCriteria.add( Restrictions.eq("paramType.enabled", Boolean.TRUE))
.add( Restrictions.gt("paramType.userViewRight", ParamType.ADMIN_ONLY_VIEW_RIGHT))
.addOrder( Order.asc("paramType.priority"));


Criteria empCriteria = paramCriteria.createCriteria("supportedEmployees")
.add( Restrictions.eq("id", getEmployee().getId() ) );

res = paramCriteria.list();


I get the foolowing exception:
javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'employeeTab
le' from bean of type com.gemInfo.cp.webapp.beans.EmployeeBean: org.hibernate.QueryException: could not res
olve property: paramType.enabled of: com.gemInfo.cp.repository.hibernate.license.EmployeeRootParam
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:386)
at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1009)
at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1036)
at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:749)
at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)
at com.sun.faces.taglib.html_basic.PanelGridTag.doStartTag(PanelGridTag.java:442)
at org.apache.jsp.jsp.user.employee_jsp._jspx_meth_h_panelGrid_0(org.apache.jsp.jsp.user.employee_j
sp:308)
at org.apache.jsp.jsp.user.employee_jsp._jspx_meth_h_form_0(org.apache.jsp.jsp.user.employee_jsp:25
6)
at org.apache.jsp.jsp.user.employee_jsp._jspx_meth_f_view_0(org.apache.jsp.jsp.user.employee_jsp:17
0)
at org.apache.jsp.jsp.user.employee_jsp._jspService(org.apache.jsp.jsp.user.employee_jsp:85)
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 com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.gemInfo.cp.repository.hibernate.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:
269)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
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: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:153)

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:534)
Caused by: javax.faces.el.EvaluationException: Error getting property 'employeeTable' from bean of type com
.gemInfo.cp.webapp.beans.EmployeeBean: org.hibernate.QueryException: could not resolve property: paramType.
enabled of: com.gemInfo.cp.repository.hibernate.license.EmployeeRootParam
at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:89)
at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
... 54 more
Caused by: org.hibernate.QueryException: could not resolve property: paramType.enabled of: com.gemInfo.cp.r
epository.hibernate.license.EmployeeRootParam
at org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMa
pping.java:43)
at org.hibernate.persister.entity.AbstractPropertyMapping.toColumns(AbstractPropertyMapping.java:63
)
at org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.j
ava:33)
at org.hibernate.persister.entity.BasicEntityPersister.toColumns(BasicEntityPersister.java:1086)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumns(CriteriaQueryTranslator.java:40
2)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumnsUsingProjection(CriteriaQueryTra
nslator.java:368)
at org.hibernate.criterion.SimpleExpression.toSqlString(SimpleExpression.java:42)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.
java:313)
at org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:92)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1287)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)
at com.gemInfo.cp.webapp.beans.EmployeeBean.getEmployeeDetails(EmployeeBean.java:513)
at com.gemInfo.cp.webapp.beans.EmployeeBean.getEmployeeTable(EmployeeBean.java:574)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
... 58 more
22:46:10,125 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'employeeTab
le' from bean of type com.gemInfo.cp.webapp.beans.EmployeeBean: org.hibernate.QueryException: could not res
olve property: paramType.enabled of: com.gemInfo.cp.repository.hibernate.license.EmployeeRootParam
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:386)
at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1009)
at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1036)
at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:749)
at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)
at com.sun.faces.taglib.html_basic.PanelGridTag.doStartTag(PanelGridTag.java:442)
at org.apache.jsp.jsp.user.employee_jsp._jspx_meth_h_panelGrid_0(org.apache.jsp.jsp.user.employee_j
sp:308)
at org.apache.jsp.jsp.user.employee_jsp._jspx_meth_h_form_0(org.apache.jsp.jsp.user.employee_jsp:25
6)
at org.apache.jsp.jsp.user.employee_jsp._jspx_meth_f_view_0(org.apache.jsp.jsp.user.employee_jsp:17
0)
at org.apache.jsp.jsp.user.employee_jsp._jspService(org.apache.jsp.jsp.user.employee_jsp:85)
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 com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.gemInfo.cp.repository.hibernate.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:
269)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
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: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:153)

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:534)
Caused by: javax.faces.el.EvaluationException: Error getting property 'employeeTable' from bean of type com
.gemInfo.cp.webapp.beans.EmployeeBean: org.hibernate.QueryException: could not resolve property: paramType.
enabled of: com.gemInfo.cp.repository.hibernate.license.EmployeeRootParam
at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:89)
at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
... 54 more
Caused by: org.hibernate.QueryException: could not resolve property: paramType.enabled of: com.gemInfo.cp.r
epository.hibernate.license.EmployeeRootParam
at org.hibernate.persister.entity.AbstractPropertyMapping.throwPropertyException(AbstractPropertyMa
pping.java:43)
at org.hibernate.persister.entity.AbstractPropertyMapping.toColumns(AbstractPropertyMapping.java:63
)
at org.hibernate.persister.entity.BasicEntityPropertyMapping.toColumns(BasicEntityPropertyMapping.j
ava:33)
at org.hibernate.persister.entity.BasicEntityPersister.toColumns(BasicEntityPersister.java:1086)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumns(CriteriaQueryTranslator.java:40
2)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getColumnsUsingProjection(CriteriaQueryTra
nslator.java:368)
at org.hibernate.criterion.SimpleExpression.toSqlString(SimpleExpression.java:42)
at org.hibernate.loader.criteria.CriteriaQueryTranslator.getWhereCondition(CriteriaQueryTranslator.
java:313)
at org.hibernate.loader.criteria.CriteriaLoader.<init>(CriteriaLoader.java:92)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1287)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)
at com.gemInfo.cp.webapp.beans.EmployeeBean.getEmployeeDetails(EmployeeBean.java:513)
at com.gemInfo.cp.webapp.beans.EmployeeBean.getEmployeeTable(EmployeeBean.java:574)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:79)
... 58 more
22:51:16,468 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'employeeTab
le' from bean of type com.gemInfo.cp.webapp.beans.EmployeeBean: org.hibernate.QueryException: could not res
olve property: paramType.enabled of: com.gemInfo.cp.repository.hibernate.license.EmployeeRootParam
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:206)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:154)
at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:386)
at javax.faces.webapp.UIComponentTag.createComponent(UIComponentTag.java:1009)
at javax.faces.webapp.UIComponentTag.createChild(UIComponentTag.java:1036)
at javax.faces.webapp.UIComponentTag.findComponent(UIComponentTag.java:749)
at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:429)
at com.sun.faces.taglib.html_basic.PanelGridTag.doStartTag(PanelGridTag.java:442)
at org.apache.jsp.jsp.user.employee_jsp._jspx_meth_h_panelGrid_0(org.apache.jsp.jsp.user.employee_j
sp:308)
at org.apache.jsp.jsp.user.employee_jsp._jspx_meth_h_form_0(org.apache.jsp.jsp.user.employee_jsp:25
6)
at org.apache.jsp.jsp.user.employee_jsp._jspx_meth_f_view_0(org.apache.jsp.jsp.user.employee_jsp:17
0)
at org.apache.jsp.jsp.user.employee_jsp._jspService(org.apache.jsp.jsp.user.employee_jsp:85)
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 com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at com.gemInfo.cp.repository.hibernate.HibernateSessionFilter.doFilter(HibernateSessionFilter.java:
269)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202
)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.myfaces.component.html.util.ExtensionsFilter.doFilter(ExtensionsFilter.java:122)
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: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:153)

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:534)
Caused by: javax.faces.el.EvaluationException: Error getting property 'employeeTable' from bean of type com
.gemInfo.cp.webapp.beans.EmployeeBean: org.hibernate.QueryException: could not resolve property: paramType.
enabled of: com.gemInfo.cp.repository.hibernate.license.EmployeeRootParam
at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:89)
at com.sun.faces.el.impl.ArraySuffix.evaluate(ArraySuffix.java:167)
at com.sun.faces.el.impl.ComplexValue.evaluate(ComplexValue.java:151)
at com.sun.faces.el.impl.ExpressionEvaluatorImpl.evaluate(ExpressionEvaluatorImpl.java:243)
at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:173)
... 54 more

my hbm.xml file is:
<hibernate-mapping
>
<class
name="com.gemInfo.cp.repository.hibernate.license.ParamType"
table="PARAM_TYPES"
lazy="false"
>

<id
name="id"
type="java.lang.Long"
>
<column
name="PARAM_TYPE_ID"
/>
<generator class="assigned">
<!--
To add non XDoclet generator parameters, create a file named
hibernate-generator-params-ParamType.xml
containing the additional parameters and place it in your merge dir.
-->
</generator>
</id>

<property
name="name"
type="java.lang.String"
update="true"
insert="true"
>
<column
name="NAME"
unique="true"
/>
</property>

<property
name="editableByUser"
type="boolean"
update="true"
insert="true"
>
<column
name="EDITABLE_BY_USER"
/>
</property>

<property
name="enabled"
type="java.lang.Boolean"
update="true"
insert="true"
>
<column
name="ENABLED"
/>
</property>

<many-to-one
name="paramUiType"
class="com.gemInfo.cp.repository.hibernate.license.ParamUiType"
cascade="none"
outer-join="false"
update="true"
insert="true"
column="PARAM_UI_TYPE_ID"
not-null="true"
/>

<property
name="priority"
type="java.lang.Integer"
update="true"
insert="true"
>
<column
name="PRIORITY"
not-null="true"
unique="true"
/>
</property>

<property
name="required"
type="boolean"
update="true"
insert="true"
>
<column
name="REQUIRED"
/>
</property>

<property
name="userViewRight"
type="java.lang.Integer"
update="true"
insert="true"
>
<column
name="VIEW_RIGHT"
not-null="true"
/>
</property>

<property
name="vcardName"
type="java.lang.String"
update="true"
insert="true"
>
<column
name="VCARD"
/>
</property>

<property
name="propertyName"
type="java.lang.String"
update="true"
insert="true"
>
<column
name="PROPERTY_NAME"
/>
</property>

<property
name="commonPropertyValue1"
type="java.lang.String"
update="true"
insert="true"
>
<column
name="COMMON_PROPERTY_ONE"
/>
</property>

<property
name="commonPropertyValue2"
type="java.lang.String"
update="true"
insert="true"
>
<column
name="COMMON_PROPERTY_TWO"
/>
</property>

<property
name="systemParam"
type="boolean"
update="true"
insert="true"
>
<column
name="SYSTEM_PARAM"
/>
</property>

<!--
To add non XDoclet property mappings, create a file named
hibernate-properties-ParamType.xml
containing the additional properties and place it in your merge dir.
-->

</class>

</hibernate-mapping>


What is wrong? Thanks in advance for your help


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 07, 2006 9:50 pm 
Expert
Expert

Joined: Thu Dec 23, 2004 9:08 pm
Posts: 2008
You need to use an alias to get at nested values.
Code:
Criteria paramCriteria = HibernateSessionFilter.getSession().createCriteria(EmployeeRootParam.class);

paramCriteria.createAlias("paramType", "pt");
paramCriteria.add( Restrictions.eq("pt.enabled", Boolean.TRUE))
.add( Restrictions.gt("pt.userViewRight", ParamType.ADMIN_ONLY_VIEW_RIGHT))
.addOrder( Order.asc("pt.priority"));


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 09, 2006 6:14 pm 
Beginner
Beginner

Joined: Thu Jun 30, 2005 5:07 am
Posts: 33
Thanks, it works.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.