org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags

Stack Overflow | i'm a user | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Hibernate cannot simultaneously fetch multiple bags two Lists

    Stack Overflow | 4 years ago | i'm a user
    org.hibernate.loader.MultipleBagFetchException: cannot simultaneously fetch multiple bags

Root Cause Analysis

  1. org.hibernate.loader.MultipleBagFetchException

    cannot simultaneously fetch multiple bags

    at org.hibernate.loader.BasicLoader.postInstantiate()
  2. Hibernate
    SessionImpl.createQuery
    1. org.hibernate.loader.BasicLoader.postInstantiate(BasicLoader.java:93)
    2. org.hibernate.loader.hql.QueryLoader.<init>(QueryLoader.java:121)
    3. org.hibernate.hql.internal.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:204)
    4. org.hibernate.hql.internal.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
    5. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:105)
    6. org.hibernate.engine.query.spi.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
    7. org.hibernate.engine.query.spi.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:168)
    8. org.hibernate.internal.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:221)
    9. org.hibernate.internal.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:199)
    10. org.hibernate.internal.SessionImpl.createQuery(SessionImpl.java:1778)
    10 frames
  3. edu.demidov.dao
    EducationWebDaoImpl.fetchByName
    1. edu.demidov.dao.EducationWebDaoImpl.fetchByName(EducationWebDaoImpl.java:67)
    1 frame
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:601)
    4 frames
  5. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    3 frames
  6. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
    2. org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
    3. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
    3 frames
  7. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    2 frames
  8. Unknown
    $Proxy24.fetchByName
    1. $Proxy24.fetchByName(Unknown Source)
    1 frame
  9. edu.demidov.dao
    AppOut.main
    1. edu.demidov.dao.AppOut.main(AppOut.java:52)
    1 frame