java.lang.NoSuchMethodException: org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(java.lang.String, java.util.Map) C:\Daten\eclipse-workspace\hskaDB\postgresql\build.xml:239: Problems in creating a Ejb3Configuration. Have you remembered to add it to the classpath ?

Hibernate JIRA | Juergen Zimmermann | 1 decade 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

    The DDL should be generated with this ANT task <hibernatetool destdir="${gen.dir}"> <classpath refid="hbm2ddl.classpath"/> <ejb3configuration/> <hbm2ddl outputfilename="create-tables.sql" drop="false" export="false"/> </hibernatetool> However, I get this stack trace: [hibernatetool] java.lang.NoSuchMethodException: org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(java.lang.String, java.util.Map) C:\Daten\eclipse-workspace\hskaDB\postgresql\build.xml:239: Problems in creating a Ejb3Configuration. Have you remembered to add it to the classpath ? at org.hibernate.tool.ant.EJB3ConfigurationTask.createConfiguration(EJB3ConfigurationTask.java:37) at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:54) at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:278) at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:162) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:104) at org.apache.tools.ant.Task.perform(Task.java:375) at org.apache.tools.ant.Target.execute(Target.java:356) at org.apache.tools.ant.Target.performTasks(Target.java:384) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1268) at org.apache.tools.ant.Project.executeTarget(Project.java:1237) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1120) at org.apache.tools.ant.Main.runBuild(Main.java:697) at org.apache.tools.ant.Main.startAnt(Main.java:198) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:299) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:105)

    Hibernate JIRA | 1 decade ago | Juergen Zimmermann
    java.lang.NoSuchMethodException: org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(java.lang.String, java.util.Map) C:\Daten\eclipse-workspace\hskaDB\postgresql\build.xml:239: Problems in creating a Ejb3Configuration. Have you remembered to add it to the classpath ?
  2. 0

    The DDL should be generated with this ANT task <hibernatetool destdir="${gen.dir}"> <classpath refid="hbm2ddl.classpath"/> <ejb3configuration/> <hbm2ddl outputfilename="create-tables.sql" drop="false" export="false"/> </hibernatetool> However, I get this stack trace: [hibernatetool] java.lang.NoSuchMethodException: org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(java.lang.String, java.util.Map) C:\Daten\eclipse-workspace\hskaDB\postgresql\build.xml:239: Problems in creating a Ejb3Configuration. Have you remembered to add it to the classpath ? at org.hibernate.tool.ant.EJB3ConfigurationTask.createConfiguration(EJB3ConfigurationTask.java:37) at org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:54) at org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:278) at org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45) at org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:162) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:104) at org.apache.tools.ant.Task.perform(Task.java:375) at org.apache.tools.ant.Target.execute(Target.java:356) at org.apache.tools.ant.Target.performTasks(Target.java:384) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1268) at org.apache.tools.ant.Project.executeTarget(Project.java:1237) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40) at org.apache.tools.ant.Project.executeTargets(Project.java:1120) at org.apache.tools.ant.Main.runBuild(Main.java:697) at org.apache.tools.ant.Main.startAnt(Main.java:198) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:299) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:105)

    Hibernate JIRA | 1 decade ago | Juergen Zimmermann
    java.lang.NoSuchMethodException: org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(java.lang.String, java.util.Map) C:\Daten\eclipse-workspace\hskaDB\postgresql\build.xml:239: Problems in creating a Ejb3Configuration. Have you remembered to add it to the classpath ?

    Root Cause Analysis

    1. java.lang.NoSuchMethodException

      org.hibernate.ejb.Ejb3Configuration.createEntityManagerFactory(java.lang.String, java.util.Map) C:\Daten\eclipse-workspace\hskaDB\postgresql\build.xml:239: Problems in creating a Ejb3Configuration. Have you remembered to add it to the classpath ?

      at org.hibernate.tool.ant.EJB3ConfigurationTask.createConfiguration()
    2. A Hibernate O/RM Module
      HibernateToolTask.execute
      1. org.hibernate.tool.ant.EJB3ConfigurationTask.createConfiguration(EJB3ConfigurationTask.java:37)
      2. org.hibernate.tool.ant.ConfigurationTask.getConfiguration(ConfigurationTask.java:54)
      3. org.hibernate.tool.ant.HibernateToolTask.getConfiguration(HibernateToolTask.java:278)
      4. org.hibernate.tool.ant.Hbm2DDLExporterTask.execute(Hbm2DDLExporterTask.java:45)
      5. org.hibernate.tool.ant.HibernateToolTask.execute(HibernateToolTask.java:162)
      5 frames
    3. Ant
      UnknownElement.execute
      1. org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    5. Ant
      Main.startAnt
      1. org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:104)
      2. org.apache.tools.ant.Task.perform(Task.java:375)
      3. org.apache.tools.ant.Target.execute(Target.java:356)
      4. org.apache.tools.ant.Target.performTasks(Target.java:384)
      5. org.apache.tools.ant.Project.executeSortedTargets(Project.java:1268)
      6. org.apache.tools.ant.Project.executeTarget(Project.java:1237)
      7. org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
      8. org.apache.tools.ant.Project.executeTargets(Project.java:1120)
      9. org.apache.tools.ant.Main.runBuild(Main.java:697)
      10. org.apache.tools.ant.Main.startAnt(Main.java:198)
      10 frames
    6. Apache Ant Launcher
      Launcher.main
      1. org.apache.tools.ant.launch.Launcher.run(Launcher.java:299)
      2. org.apache.tools.ant.launch.Launcher.main(Launcher.java:105)
      2 frames