4 Replies Latest reply on Apr 12, 2006 10:57 AM by Max Rydahl Andersen

    generating seam files with hibernate tools prob.

    daniel jarrett Newbie

      I'm trying to generate my seam files from existing ejb3 entity pojos but when i go to run the console i get the following.

      org.hibernate.MappingException: An AnnotationConfiguration instance is required to use <mapping class="mypackage.persistence.myclassA"/>
       <No message>
      


      Plus i also get this in the error list. Even though I am not generating the code from a database connection..

      Problem while executing Create SessionFactory(org.hibernate.HibernateException: Hibernate Dialect must be explicitly set)
      



      org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
       at org.hibernate.dialect.DialectFactory.determineDialect(DialectFactory.java:57)
       at org.hibernate.dialect.DialectFactory.buildDialect(DialectFactory.java:39)
       at org.hibernate.cfg.SettingsFactory.determineDialect(SettingsFactory.java:378)
       at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:110)
       at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:1881)
       at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1174)
       at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:265)
       at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:35)
       at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:68)
       at org.hibernate.console.ConsoleConfiguration.buildSessionFactory(ConsoleConfiguration.java:260)
       at org.hibernate.eclipse.console.actions.BuildSessionFactoryAction.doRun(BuildSessionFactoryAction.java:38)
       at org.hibernate.eclipse.console.actions.ConsoleConfigurationBasedAction.run(ConsoleConfigurationBasedAction.java:46)
       at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:167)
       at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538)
       at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488)
       at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400)
       at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
       at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
       at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
       at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
       at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699)
       at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663)
       at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367)
       at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143)
       at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103)
       at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376)
       at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334)
       at org.eclipse.core.launcher.Main.basicRun(Main.java:278)
       at org.eclipse.core.launcher.Main.run(Main.java:973)
       at org.eclipse.core.launcher.Main.main(Main.java:948)
      


      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE hibernate-configuration PUBLIC
       "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
       "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
      <hibernate-configuration>
       <session-factory>
       <mapping class="mypackage.persistence.myclassA"/>
       ...