org.hibernate.MappingException

@ManyToMany defining filter or where without join fetching not valid within collection using join fetching[model.strutcture.functions.levels]

Solutions on the web662

  • via Hibernate JIRA by Filippo Guerzoni, 1 year ago
    @ManyToMany defining filter or where without join fetching not valid within collection using join fetching[model.strutcture.functions.levels]
  • via Hibernate JIRA by Filippo Guerzoni, 1 year ago
    @ManyToMany defining filter or where without join fetching not valid within collection using join fetching[model.strutcture.functions.levels]
  • Unknown entity: java.util.HashSet. The exception is caused on calling getHibernateTemplate().saveOrUpdate(collection); where collection is a Set of entities that application is looking to save. The mapping configuration of these entities in the
  • Stack trace

    • org.hibernate.MappingException: @ManyToMany defining filter or where without join fetching not valid within collection using join fetching[model.strutcture.functions.levels] at org.hibernate.cfg.annotations.CollectionBinder.checkFilterConditions(CollectionBinder.java:863) at org.hibernate.cfg.annotations.CollectionBinder.bindManyToManySecondPass(CollectionBinder.java:849) at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:421) at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:382) at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:35) at org.hibernate.cfg.annotations.CollectionBinder.bind(CollectionBinder.java:331) at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1296) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:629) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:276) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:210) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:997) at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:722) at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:161) at org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(Ejb3Configuration.java:567) at org.hibernate.ejb.Ejb3Configuration.createContainerEntityManagerFactory(Ejb3Configuration.java:245) at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:108) at org.jboss.ejb3.entity.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:260) 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:585) at org.jboss.joinpoint.plugins.reflect.ReflectMethodJoinPoint.dispatch(ReflectMethodJoinPoint.java:72) at org.jboss.kernel.plugins.dependency.KernelControllerContextActions.dispatchJoinPoint(KernelControllerContextActions.java:96) at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$LifecycleAction.installAction(KernelControllerContextActions.java:476) at org.jboss.kernel.plugins.dependency.KernelControllerContextActions$KernelControllerContextAction.install(KernelControllerContextActions.java:171) at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:226) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:593) at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:346) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:438) at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:379) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:225) at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:151) at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:79) at org.jboss.kernel.plugins.dependency.AbstractKernelController.install(AbstractKernelController.java:73) at org.jboss.ejb3.MCKernelAbstraction.install(MCKernelAbstraction.java:86) at org.jboss.ejb3.Ejb3Deployment.startPersistenceUnits(Ejb3Deployment.java:599) at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:452) at org.jboss.ejb3.embedded.EJB3StandaloneDeployer.start(EJB3StandaloneDeployer.java:450) at AllModelTests.startupEmbeddedJboss(AllModelTests.java:49) at AllModelTests$1.setUp(AllModelTests.java:25) at junit.extensions.TestSetup$1.protect(TestSetup.java:18) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.extensions.TestSetup.run(TestSetup.java:23) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

    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
    2 times, 1 year ago