java.lang.IllegalArgumentException

org.hibernate.QueryException: could not resolve property: last_name of: com.hibernate.exercise6.model.Employee [FROM com.hibernate.exercise6.model.Employee E ORDER BY E.last_name]

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web18998

  • org.hibernate.QueryException: could not resolve property: last_name of: com.hibernate.exercise6.model.Employee [FROM com.hibernate.exercise6.model.Employee E ORDER BY E.last_name]
  • org.hibernate.QueryException: could not resolve property: region_id_region of: com.springJPA.domain.Actels [Select DISTINCT e from com.springJPA.domain.Actels e where e.region_id_region = ?1 ORDER BY e.id_actels ASC]
  • via Stack Overflow by r.diazgonz
    , 1 year ago
    org.hibernate.QueryException: could not resolve property: empleado_id of: com.raquel.tfg.domain.Cita [SELECT new com.raquel.tfg.web.rest.dto.CitaDTO(c.empleado_id, count(c)) from com.raquel.tfg.domain.Cita c GROUP BY c.empleado_id ORDER BY c.fecha_hora]
  • Stack trace

    • java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: last_name of: com.hibernate.exercise6.model.Employee [FROM com.hibernate.exercise6.model.Employee E ORDER BY E.last_name] at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:131) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155) at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:631) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:101) at com.hibernate.exercise6.service.EmployeeFunctions.listEmployees(EmployeeFunctions.java:208) at com.hibernate.exercise6.app.GUIMain.displayListMenu(GUIMain.java:329) at com.hibernate.exercise6.app.GUIMain.manageRecords(GUIMain.java:140) at com.hibernate.exercise6.app.GUIMain.main(GUIMain.java:62) Caused by: org.hibernate.QueryException: could not resolve property: last_name of: com.hibernate.exercise6.model.Employee [FROM com.hibernate.exercise6.model.Employee E ORDER BY E.last_name] at org.hibernate.QueryException.generateQueryException(QueryException.java:120) at org.hibernate.QueryException.wrapWithQueryString(QueryException.java:103) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:218) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115) at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:77) at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:152) at org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:521) at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:623) ... 5 more Caused by: org.hibernate.QueryException: could not resolve property: last_name of: com.hibernate.exercise6.model.Employee at org.hibernate.persister.entity.AbstractPropertyMapping.propertyException(AbstractPropertyMapping.java:62) at org.hibernate.persister.entity.AbstractPropertyMapping.toType(AbstractPropertyMapping.java:56) at org.hibernate.persister.entity.AbstractEntityPersister.toType(AbstractEntityPersister.java:1801) at org.hibernate.hql.internal.ast.tree.FromElementType.getPropertyType(FromElementType.java:393) at org.hibernate.hql.internal.ast.tree.FromElement.getPropertyType(FromElement.java:505) at org.hibernate.hql.internal.ast.tree.DotNode.getDataType(DotNode.java:660) at org.hibernate.hql.internal.ast.tree.DotNode.prepareLhs(DotNode.java:264) at org.hibernate.hql.internal.ast.tree.DotNode.resolve(DotNode.java:204) at org.hibernate.hql.internal.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:109) at org.hibernate.hql.internal.ast.tree.FromReferenceNode.resolve(FromReferenceNode.java:104) at org.hibernate.hql.internal.ast.HqlSqlWalker.resolve(HqlSqlWalker.java:1013) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.expr(HqlSqlBaseWalker.java:1286) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.orderExpr(HqlSqlBaseWalker.java:1860) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.orderExprs(HqlSqlBaseWalker.java:1657) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.orderClause(HqlSqlBaseWalker.java:1630) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:652) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:311) at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:259) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:262) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190) ... 11 more

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    Once, 10 months ago
    16 times, 18 hours ago
    17930 times, 1 week ago
    68 times, 4 weeks ago
    11 times, 4 months ago
    8 more bugmates