我canot创建hibernate.cfg.xml,我不能理解这个错误,因为我设置方言数据库oracle 10g但我使用oracle数据库11 xe

错误:org.hibernate.HibernateException:致访问DialectResolutionInfo不能“hibernate.dialect”未设置在org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100)时为空的有机萃.hibernate.service.spi.ServiceException:无法在组织在org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:275)来创建请求的服务[org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] .hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:237)在org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)在org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory.injectServices (DefaultIdentifierGeneratorFactory.java:152)org.hibernate.service.intern上的org.hibernate.service.internal.AbstractServiceRegistryImpl.injectDependencies(AbstractServiceRegistryImpl.java:286) al.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:243)在org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:214)在org.hibernate.boot.internal.InFlightMetadataCollectorImpl . (InFlightMetadataCollectorImpl.java:179)在org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:119)在org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:84)在org.hibernate作为 . boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:474)在org.hibernate.boot.internal.MetadataBuilderImpl.build(MetadataBuilderImpl.java:85)在org.hibernate.boot.MetadataSources.buildMetadata(MetadataSources.java:184)在org.jboss.tools.hibernate.runtime.v_5_3.internal.util.MetadataHelper.buildFromMetadataSources(MetadataHelper.java:49)在org.jboss.tools.hibernate.runtime.v_5_3.internal.util.MetadataHelper.getMetadata(MetadataHelper . java:21)在org.jbo ss.tools.hibernate.runtime.v_5_3.internal.ConfigurationFacadeImpl.getMetadata(ConfigurationFacadeImpl.java:174)在org.jboss.tools.hibernate.runtime.v_5_3.internal.util.ConfigurationMetadataDescriptor.createMetadata(ConfigurationMetadataDescriptor.java:20)在org.hibernate.tool.hbm2x.AbstractExporter.buildMetadata(AbstractExporter.java:207)在org.hibernate.tool.hbm2x.AbstractExporter.getMetadata(AbstractExporter.java:57)在org.hibernate.tool.hbm2x.AbstractExporter.setupContext( AbstractExporter.java:178)在org.hibernate.tool.hbm2x.AbstractExporter.start(AbstractExporter.java:105)在sun.reflect.GeneratedMethodAccessor581.invoke(来源不明)在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 43)atg.jboss.tools.tooloke( orr.hibernate.eclipse中的.runtime.common.AbstractExporterFacade.start(AbstractExporterFacade.java:72) .console.wizards.NewConfigurationWizard.openContentStream(NewConfigurationWizard.java:301)在org.hibernate.eclipse.console.wizards.NewConfigurationWizard.access $ 2(NewConfigurationWizard.java:295)在org.hibernate.eclipse.console.wizards.NewConfigurationWizard $ 1 .getInitialContents(NewConfigurationWizard.java:163)位于org.hibernate.eclipse.console.wizards.NewConfigurationWizard.performFinish(NewConfigurationWizard.java:198)的org.eclipse.ui.dialogs.WizardNewFileCreationPage.createNewFile(WizardNewFileCreationPage.java:380)在org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:411)org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:772)在org.eclipse.jface.dialogs.Dialog.lambda $ 0 (Dialog.java:619)org.eclipse中的org.eclipse.swt.ewts.wt.wts.Letner上的org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)中的org.eclipse.swt.events.SelectionListener $ 1.widgetSelected(SelectionListener.java:81) org.eclipse.swt.wi上的.swt.widgets.EventTable.sendEvent(EventTable.java:86) dgets.Display.sendEvent(Display.java:5686)位于org.eclipse.swt.wts.Wit上的org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1370) . (Display.java:4940)在org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4518)at在org.eclipse.ui.internal.actions.NewWizardShortcutAction的org.eclipse.jface.window.Window.open(Window.java:794)中的org.eclipse.jface.window.Window.runEventLoop(Window.java:818) . 在Org.eclipse上的org.eclipse.jface.action.Action.runWithEvent(Action.java:473)org.eclipse.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)运行(NewWizardShortcutAction.java:133) .jface.action.ActionContributionItem.lambda $ 4(ActionContributionItem.java:397)位于org.eclipse.swt.wts.wts.sendEvent(ord.eclipse.swt.wts.wts.Endplay.sendEvent)的org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86) java:5686)org.eclipse.swt.wt.widget.sendEvent(Widget.java:1370)org.eclipse.swt.wt.Wit上的org.eclipse.swt.wt . .Display.readAndDispatch(Display.java:4518)位于org.eclipse.core.databinding.observable.Realm的org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine $ 5.run(PartRenderingEngine.java:1170) . runWithDefault(Realm.java:336)at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1059)org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)at org . eclipse.ui.internal.Workbench.lambda $ 3(Workbench.java:667)位于org.eclipse.ui.internal.Workbench.createAndRunWorkbench的org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336) (Workbench.java:597)org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)at org . eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)位于org.eclipse.core.runtime的org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) . intr.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)位于org.eclipse.core.runtime.adaptor.EclipseStarter.run的org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388) ECL ipseStarter.java:243)sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java位于org.eclipse.equinox.launcher.Main.basicRun(Main.java)的org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:656)的.lang.reflect.Method.invoke(Method.java:498) :592)org.eclipse.equinox.launcher.Main.run(Main.java:1498)org.eclipse.equinox.launcher.Main.main(Main.java:1471)引起:org.hibernate.HibernateException:当'hibernate.dialect'未在org.hibernate.engine.jdbc.dialect.internal的org.hibernate.engine.jdbc.dialect.internal.DialectFactoryImpl.determineDialect(DialectFactoryImpl.java:100)中设置时,对DialectResolutionInfo的访问不能为null . Org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator)中的DialectFactoryImpl.buildDialect(DialectFactoryImpl.java:54) .java:137)org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator.initiateService(JdbcEnvironmentInitiator.java:35)at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:94)at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:263)... 73更多

public class HibernateUtils {

    private static SessionFactory sessionFactory;
    static {
           try {
            StandardServiceRegistry standardRegistry = 
               new StandardServiceRegistryBuilder().configure("hibernate.cfg.xml").build();
            Metadata metaData = 
                new MetadataSources(standardRegistry).getMetadataBuilder().build();
            sessionFactory = metaData.getSessionFactoryBuilder().build();
           } catch (Throwable th) {
            System.err.println("Enitial SessionFactory creation failed" + th);
            throw new ExceptionInInitializerError(th);
          }
        }

}