java.lang.IllegalArgumentException

org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=order_1,role=com.pallasathenagroup.entities.hermes.OrderEntry.order,tableName=client_order,tableAlias=order1_,origin=order_entry orderentry0_,columns={orderentry0_.order_id ,className=com.pallasathenagroup.entities.hermes.Order}}] [SELECT COUNT(* ) FROM com.pallasathenagroup.entities.hermes.OrderEntry orderentry JOIN FETCH orderentry.order order_1 WHERE orderentry.product IN (SELECT s.id FROM com.pallasathenagroup.cte.ScopeCte s) AND (orderentry.paidPrice = :param_1 OR order_1.status = :param_2)]

Samebug tips0

We couldn't find tips for this exception.

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

Solutions on the web8

  • via Stack Overflow by geneqew
    ,
  • Stack trace

    • java.lang.IllegalArgumentException: org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=order_1,role=com.pallasathenagroup.entities.hermes.OrderEntry.order,tableName=client_order,tableAlias=order1_,origin=order_entry orderentry0_,columns={orderentry0_.order_id ,className=com.pallasathenagroup.entities.hermes.Order}}] [SELECT COUNT(* ) FROM com.pallasathenagroup.entities.hermes.OrderEntry orderentry JOIN FETCH orderentry.order order_1 WHERE orderentry.product IN (SELECT s.id FROM com.pallasathenagroup.cte.ScopeCte s) AND (orderentry.paidPrice = :param_1 OR order_1.status = :param_2)] at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:131)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:631)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:647)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:23)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at com.blazebit.persistence.impl.PaginatedCriteriaBuilderImpl.getCountQuery(PaginatedCriteriaBuilderImpl.java:139)[classes/:na] at com.blazebit.persistence.impl.PaginatedCriteriaBuilderImpl.getQuery(PaginatedCriteriaBuilderImpl.java:173)[classes/:na] at com.blazebit.persistence.impl.PaginatedCriteriaBuilderImpl.getResultList(PaginatedCriteriaBuilderImpl.java:197)[classes/:na] at com.pallasathenagroup.entitymanagers.OrderEntryEntityManager.getOrderEntries(OrderEntryEntityManager.java:95)[classes/:na] at com.pallasathenagroup.portal.core.controllers.iris.ScopeController.lambda$routes$103(ScopeController.java:273)[classes/:na] at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)[spark-core-2.3.jar:na] at spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)[spark-core-2.3.jar:na] at spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)[spark-core-2.3.jar:na] at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.server.Server.handle(Server.java:517)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)[jetty-io-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)[jetty-io-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)[jetty-io-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)[jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)[jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)[jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730] at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)[jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_60] Caused by: org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=order_1,role=com.pallasathenagroup.entities.hermes.OrderEntry.order,tableName=client_order,tableAlias=order1_,origin=order_entry orderentry0_,columns={orderentry0_.order_id ,className=com.pallasathenagroup.entities.hermes.Order}}] [SELECT COUNT(* ) FROM com.pallasathenagroup.entities.hermes.OrderEntry orderentry JOIN FETCH orderentry.order order_1 WHERE orderentry.product IN (SELECT s.id FROM com.pallasathenagroup.cte.ScopeCte s) AND (orderentry.paidPrice = :param_1 OR order_1.status = :param_2)] at org.hibernate.QueryException.generateQueryException(QueryException.java:120)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.QueryException.wrapWithQueryString(QueryException.java:103)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:218)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:77)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:152)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:521)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:623)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] ... 24 more Caused by: org.hibernate.QueryException: query specified join fetching, but the owner of the fetched association was not present in the select list [FromElement{explicit,not a collection join,fetch join,fetch non-lazy properties,classAlias=order_1,role=com.pallasathenagroup.entities.hermes.OrderEntry.order,tableName=client_order,tableAlias=order1_,origin=order_entry orderentry0_,columns={orderentry0_.order_id ,className=com.pallasathenagroup.entities.hermes.Order}}] at org.hibernate.hql.internal.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:214)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.hql.internal.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:991)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.hql.internal.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:759)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:675)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:311)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:259)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:262)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] at org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190)[hibernate-core-5.2.1.Final.jar:5.2.1.Final] ... 30 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

    marcbouvierdavmarcbouvierdav
    68 times, last one
    PilleoPilleo
    18 times, last one
    tvrmsmithtvrmsmith
    11 times, last one
    MoYaproMoYapro
    7 times, last one