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 ?

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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)
    via by Juergen Zimmermann,
  • 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)
    via by 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 ? 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)
    No Bugmate found.