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)]

GitHub | JWGmeligMeyling | 2 months ago
  1. 0

    Fetch joins in PagedCriteriaBuilder fails with QueryException

    GitHub | 2 months ago | JWGmeligMeyling
    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)]
  2. 0

    Booking is not mapped

    Stack Overflow | 4 months ago | Dylan Gomes
    java.lang.IllegalArgumentException: org.hibernate.hql.internal.ast.QuerySyntaxException: booking is not mapped [select b from booking as b where (b.dag=?1 AND b.uur =?2) ]
  3. 0

    Hibernate Community • View topic - possible bug: query specified join fetching, but the owner..

    hibernate.org | 1 year ago
    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=null,role=null,tableName=Product,tableAlias=product2_,origin=items items1_,colums={items1_.p_id ,className=lab3.Product}}] [select o from lab3.Order o left join fetch o.items i join fetch i.product]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Hibernate Community • View topic - possible bug: query specified join fetching, but the owner..

    hibernate.org | 1 year ago
    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=null,role=null,tableName=Product,tableAlias=product2_,origin=items items1_,colums={items1_.p_id ,className=lab3.Product}}] [select o from lab3.Order o left join fetch o.items i join fetch i.product]
  6. 0

    JPA Criteria multiselect with fetch

    Stack Overflow | 4 months ago | Gazeciarz
    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=generatedAlias1,role=com.sample.SampleModel.model.SampleModel.mentor,tableName=USER_,tableAlias=user1_,origin=SampleModel SampleModel0_,columns={SampleModel0_.MENTOR_ID ,className=com.sample.credential.model.User}}]
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Hibernate
    AbstractSessionImpl.createQuery
    1. org.hibernate.hql.internal.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:214)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    2. org.hibernate.hql.internal.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:991)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    3. org.hibernate.hql.internal.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:759)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    4. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:675)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    5. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:311)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    6. org.hibernate.hql.internal.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:259)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    7. org.hibernate.hql.internal.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:262)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    8. org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:190)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    9. org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:142)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    10. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:115)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    11. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:77)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    12. org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:152)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    13. org.hibernate.internal.AbstractSharedSessionContract.getQueryPlan(AbstractSharedSessionContract.java:521)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    14. org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:623)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    15. org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:647)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    16. org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:23)[hibernate-core-5.2.1.Final.jar:5.2.1.Final]
    16 frames
  3. com.blazebit.persistence
    PaginatedCriteriaBuilderImpl.getResultList
    1. com.blazebit.persistence.impl.PaginatedCriteriaBuilderImpl.getCountQuery(PaginatedCriteriaBuilderImpl.java:139)[classes/:na]
    2. com.blazebit.persistence.impl.PaginatedCriteriaBuilderImpl.getQuery(PaginatedCriteriaBuilderImpl.java:173)[classes/:na]
    3. com.blazebit.persistence.impl.PaginatedCriteriaBuilderImpl.getResultList(PaginatedCriteriaBuilderImpl.java:197)[classes/:na]
    3 frames
  4. com.pallasathenagroup.entitymanagers
    OrderEntryEntityManager.getOrderEntries
    1. com.pallasathenagroup.entitymanagers.OrderEntryEntityManager.getOrderEntries(OrderEntryEntityManager.java:95)[classes/:na]
    1 frame
  5. com.pallasathenagroup.portal
    ScopeController.lambda$routes$103
    1. com.pallasathenagroup.portal.core.controllers.iris.ScopeController.lambda$routes$103(ScopeController.java:273)[classes/:na]
    1 frame
  6. Spark
    JettyHandler.doHandle
    1. spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47)[spark-core-2.3.jar:na]
    2. spark.webserver.MatcherFilter.doFilter(MatcherFilter.java:162)[spark-core-2.3.jar:na]
    3. spark.webserver.JettyHandler.doHandle(JettyHandler.java:61)[spark-core-2.3.jar:na]
    3 frames
  7. Jetty
    SelectChannelEndPoint$2.run
    1. org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    2. org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    3. org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:119)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    4. org.eclipse.jetty.server.Server.handle(Server.java:517)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    5. org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:302)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    6. org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:242)[jetty-server-9.3.2.v20150730.jar:9.3.2.v20150730]
    7. org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:245)[jetty-io-9.3.2.v20150730.jar:9.3.2.v20150730]
    8. org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)[jetty-io-9.3.2.v20150730.jar:9.3.2.v20150730]
    9. org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:75)[jetty-io-9.3.2.v20150730.jar:9.3.2.v20150730]
    9 frames
  8. org.eclipse.jetty
    ExecuteProduceConsume.run
    1. org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)[jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730]
    2. org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:147)[jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730]
    2 frames
  9. Jetty
    QueuedThreadPool$3.run
    1. org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)[jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730]
    2. org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)[jetty-util-9.3.2.v20150730.jar:9.3.2.v20150730]
    2 frames
  10. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:745)[na:1.8.0_60]
    1 frame