java.lang.IllegalStateException: Property myClass has an unbound type and no explicit target entity.

Hibernate JIRA | Michael Kantarovich | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    The following: @Embedded MyClass<MyGeneric> getMyClass(){ return myClass; } will result and exception: java.lang.IllegalStateException: Property myClass has an unbound type and no explicit target entity. at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:938) at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:788) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:614) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:353) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:265) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034) at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:56) at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:226) at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:160) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) at org.apache.tools.ant.Project.executeTarget(Project.java:1185) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1068) at org.apache.tools.ant.Main.runBuild(Main.java:668) at org.apache.tools.ant.Main.startAnt(Main.java:187) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) 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 com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)

    Hibernate JIRA | 1 decade ago | Michael Kantarovich
    java.lang.IllegalStateException: Property myClass has an unbound type and no explicit target entity.
  2. 0

    The following: @Embedded MyClass<MyGeneric> getMyClass(){ return myClass; } will result and exception: java.lang.IllegalStateException: Property myClass has an unbound type and no explicit target entity. at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:938) at org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:788) at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:614) at org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:353) at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:265) at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034) at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:56) at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:226) at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:160) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at org.apache.tools.ant.Task.perform(Task.java:364) at org.apache.tools.ant.Target.execute(Target.java:341) at org.apache.tools.ant.Target.performTasks(Target.java:369) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) at org.apache.tools.ant.Project.executeTarget(Project.java:1185) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1068) at org.apache.tools.ant.Main.runBuild(Main.java:668) at org.apache.tools.ant.Main.startAnt(Main.java:187) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67) 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 com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)

    Hibernate JIRA | 1 decade ago | Michael Kantarovich
    java.lang.IllegalStateException: Property myClass has an unbound type and no explicit target entity.

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Property myClass has an unbound type and no explicit target entity.

      at org.hibernate.cfg.AnnotationBinder.addElementsOfAClass()
    2. Hibernate
      Configuration.buildMappings
      1. org.hibernate.cfg.AnnotationBinder.addElementsOfAClass(AnnotationBinder.java:938)
      2. org.hibernate.cfg.AnnotationBinder.getElementsToProcess(AnnotationBinder.java:788)
      3. org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:614)
      4. org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:353)
      5. org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:265)
      6. org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1034)
      6 frames
    3. A Hibernate O/RM Module
      HibernateToolTask.execute
      1. org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:56)
      2. org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:226)
      3. org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45)
      4. org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:160)
      4 frames
    4. Ant
      Main.startAnt
      1. org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      2. org.apache.tools.ant.Task.perform(Task.java:364)
      3. org.apache.tools.ant.Target.execute(Target.java:341)
      4. org.apache.tools.ant.Target.performTasks(Target.java:369)
      5. org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
      6. org.apache.tools.ant.Project.executeTarget(Project.java:1185)
      7. org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      8. org.apache.tools.ant.Project.executeTargets(Project.java:1068)
      9. org.apache.tools.ant.Main.runBuild(Main.java:668)
      10. org.apache.tools.ant.Main.startAnt(Main.java:187)
      10 frames
    5. Apache Ant Launcher
      Launcher.main
      1. org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
      2. org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
      2 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:585)
      4 frames
    7. IDEA
      AntMain2.main
      1. com.intellij.rt.ant.execution.AntMain2.main(AntMain2.java:17)
      1 frame