5

我正在使用 netbeans、hibernate 和 firebird 开发一个桌面应用程序。

该向导不会给我创建文件 hibernate.cfg.xml 或 HibernateUtil.java 带来麻烦

但是通过尝试:New -> Other -> Hibernate -> Hibernate Mapping Files and POJOs from Database,使用我的 hibernate.cfg.xml 和 hibernate.reveng.xml,向导会抛出异常:

Hibernate 配置失败并显示消息:java.lang.NullPointerException message.log 有关详细信息,请参阅异常。

我正在使用

产品版本:NetBeans IDE 7.2.1(内部版本 201210100934)
Java:1.7.0_11;Java HotSpot(TM) Client VM 23.6-b04
系统:在 x86 上运行的 Windows XP 5.1 版;CP1252; es_ES (nb)
火鸟版本:2.1.1

休眠.cfg.xml

<?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>
    <property name="hibernate.dialect">org.hibernate.dialect.FirebirdDialect</property>
    <property name="hibernate.connection.driver_class">org.firebirdsql.jdbc.FBDriver</property>
    <property name="hibernate.connection.url">jdbc:firebirdsql://ip_from_my_server:3050/path_to_my_database.gdb</property>
    <property name="hibernate.connection.username">sysdba</property>
    <property name="hibernate.connection.password">masterkey</property>
  </session-factory>
</hibernate-configuration>

HibernateUtil.java

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package mypackage.util;

import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.SessionFactory;

/**
 * Hibernate Utility class with a convenient method to get Session Factory
 * object.
 *
 */
public class HibernateUtil {

    private static final SessionFactory sessionFactory;

    static {
        try {
            // Create the SessionFactory from standard (hibernate.cfg.xml) 
            // config file.
            sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
        } catch (Throwable ex) {
            // Log the exception. 
            System.err.println("Initial SessionFactory creation failed." + ex);
            throw new ExceptionInInitializerError(ex);
        }
    }

    public static SessionFactory getSessionFactory() {
        return sessionFactory;
    }
}

休眠.reveng.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC "-//Hibernate/Hibernate Reverse Engineering DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd">
<hibernate-reverse-engineering>
  <schema-selection/>
  <table-filter match-name="atable"/>
</hibernate-reverse-engineering>

这是文件视图,log ide

>Log Session: Thursday, January 24, 2013 12:09:08 PM CET
>System Info: 
  Product Version         = NetBeans IDE 7.2.1 (Build 201210100934) (#a183c5e41a19)
  Operating System        = Windows XP version 5.1 running on x86
  Java; VM; Vendor        = 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04; Oracle Corporation
  Runtime                 = Java(TM) SE Runtime Environment 1.7.0_11-b21
  Java Home               = C:\Archivos de programa\Java\jdk1.7.0_11\jre
  System Locale; Encoding = es_ES (nb); Cp1252
  Home Directory          = C:\Documents and Settings\miusuario
  Current Directory       = C:\Archivos de programa\NetBeans 7.2.1
  User Directory          = C:\Documents and Settings\miusuario\Datos de programa\NetBeans\7.2.1
  Cache Directory         = C:\Documents and Settings\miusuario\Configuraci?n local\Datos de programa\NetBeans\Cache\7.2.1
  Installation            = C:\Archivos de programa\NetBeans 7.2.1\nb
                            C:\Archivos de programa\NetBeans 7.2.1\ide
                            C:\Archivos de programa\NetBeans 7.2.1\java
                            C:\Archivos de programa\NetBeans 7.2.1\apisupport
                            C:\Archivos de programa\NetBeans 7.2.1\webcommon
                            C:\Archivos de programa\NetBeans 7.2.1\websvccommon
                            C:\Archivos de programa\NetBeans 7.2.1\enterprise
                            C:\Archivos de programa\NetBeans 7.2.1\profiler
                            C:\Archivos de programa\NetBeans 7.2.1\harness
                            C:\Archivos de programa\NetBeans 7.2.1\javafx
                            C:\Archivos de programa\NetBeans 7.2.1\platform
  Boot & Ext. Classpath   = C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\resources.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\rt.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\sunrsasign.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\jsse.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\jce.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\charsets.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\jfr.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\classes;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\ext\access-bridge.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\ext\dnsns.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\ext\jaccess.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\ext\localedata.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\ext\sunec.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\ext\sunjce_provider.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\ext\sunmscapi.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\ext\sunpkcs11.jar;C:\Archivos de programa\Java\jdk1.7.0_11\jre\lib\ext\zipfs.jar
  Application Classpath   = C:\Archivos de programa\NetBeans 7.2.1\platform\lib\boot.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\org-openide-modules.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\org-openide-util-lookup.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\org-openide-util.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\boot_ja.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\boot_pt_BR.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\boot_ru.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\boot_zh_CN.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-modules_ja.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-modules_pt_BR.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-modules_ru.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-modules_zh_CN.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-util-lookup_ja.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-util-lookup_pt_BR.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-util-lookup_ru.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-util-lookup_zh_CN.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-util_ja.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-util_pt_BR.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-util_ru.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\lib\locale\org-openide-util_zh_CN.jar;C:\Archivos de programa\Java\jdk1.7.0_11\lib\dt.jar;C:\Archivos de programa\Java\jdk1.7.0_11\lib\tools.jar
  Startup Classpath       = C:\Archivos de programa\NetBeans 7.2.1\platform\core\core.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\core\org-openide-filesystems.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\core\locale\core_ja.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\core\locale\core_pt_BR.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\core\locale\core_ru.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\core\locale\core_zh_CN.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\core\locale\org-openide-filesystems_ja.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\core\locale\org-openide-filesystems_pt_BR.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\core\locale\org-openide-filesystems_ru.jar;C:\Archivos de programa\NetBeans 7.2.1\platform\core\locale\org-openide-filesystems_zh_CN.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\org-netbeans-upgrader.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\locale\core_nb.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\locale\core_nb_ja.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\locale\core_nb_pt_BR.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\locale\core_nb_ru.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\locale\core_nb_zh_CN.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\locale\org-netbeans-upgrader_ja.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\locale\org-netbeans-upgrader_pt_BR.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\locale\org-netbeans-upgrader_ru.jar;C:\Archivos de programa\NetBeans 7.2.1\nb\core\locale\org-netbeans-upgrader_zh_CN.jar
-------------------------------------------------------------------------------
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: file:/C:/proyectos/NetBeans.7.1.2/HibernateFirebird/build/classes/
INFO [org.hibernate.cfg.Configuration]: configuring from file: hibernate.cfg.xml
INFO [org.hibernate.cfg.Configuration]: Configured SessionFactory: null
INFO [org.hibernate.cfg.reveng.OverrideRepository]: Override file: C:\proyectos\NetBeans.7.1.2\HibernateFirebird\src\hibernate.reveng.xml
INFO [org.netbeans.modules.hibernate.util.HibernateUtil]: Found pre-existing database connection.
INFO [org.netbeans.modules.hibernate.util.HibernateUtil]: Database Connection is pre-established. Returning the conneciton.
INFO [org.hibernate.connection.ConnectionProviderFactory]: Initializing connection provider: org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider
INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]: Loaded JDBC driver 
INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]: Got connection.. returning
INFO [org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor]: access to hibernate fails.
java.lang.NullPointerException
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:86)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2005)
    at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
    at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor.checkConfig(HibernateCodeGenWizardDescriptor.java:282)
[catch] at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor.isValid(HibernateCodeGenWizardDescriptor.java:177)
    at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:900)
    at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:844)
    at org.openide.loaders.TemplateWizard.updateState(TemplateWizard.java:732)
    at org.netbeans.modules.project.ui.NewFileWizard.updateState(NewFileWizard.java:122)
    at org.openide.WizardDescriptor$Listener.stateChanged(WizardDescriptor.java:2094)
    at org.openide.util.WeakListenerImpl$Change.stateChanged(WeakListenerImpl.java:329)
    at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:133)
    at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:119)
    at org.netbeans.modules.project.ui.TemplateChooserPanel.stateChanged(TemplateChooserPanel.java:182)
    at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:133)
    at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:119)
    at org.netbeans.modules.project.ui.TemplateChooserPanelGUI.fireChange(TemplateChooserPanelGUI.java:164)
    at org.netbeans.modules.project.ui.TemplateChooserPanelGUI.access$500(TemplateChooserPanelGUI.java:78)
    at org.netbeans.modules.project.ui.TemplateChooserPanelGUI$FileChooserBuilder.fireChange(TemplateChooserPanelGUI.java:380)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI.propertyChange(TemplatesPanelGUI.java:329)
    at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
    at java.awt.Component.firePropertyChange(Component.java:8382)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$ExplorerProviderPanel.access$900(TemplatesPanelGUI.java:460)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$ExplorerProviderPanel$2.run(TemplatesPanelGUI.java:542)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:682)
    at java.awt.EventQueue$3.run(EventQueue.java:680)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    at java.awt.Dialog.show(Dialog.java:1077)
    at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1074)
    at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1109)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1096)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:126)
    at org.openide.util.Mutex.doEventAccess(Mutex.java:1363)
    at org.openide.util.Mutex.readAccess(Mutex.java:273)
    at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1081)
    at java.awt.Component.show(Component.java:1651)
    at java.awt.Component.setVisible(Component.java:1603)
    at java.awt.Window.setVisible(Window.java:1014)
    at java.awt.Dialog.setVisible(Dialog.java:1003)
    at org.netbeans.core.windows.services.DialogDisplayerImpl$1AWTQuery.showDialog(DialogDisplayerImpl.java:260)
    at org.netbeans.core.windows.services.DialogDisplayerImpl$1AWTQuery.run(DialogDisplayerImpl.java:186)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:682)
    at java.awt.EventQueue$3.run(EventQueue.java:680)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: Initializing Custom Classloader with classpath : 
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/C:/componentes/Jaybird-2.2.1JDK_1.7/jaybird-2.2.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/C:/componentes/Jaybird-2.2.1JDK_1.7/jaybird-2.2.1-javadoc.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/C:/componentes/Jaybird-2.2.1JDK_1.7/jaybird-2.2.1-sources.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: jar:file:/C:/componentes/Jaybird-2.2.1JDK_1.7/jaybird-full-2.2.1.jar!/
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]: file:/C:/proyectos/NetBeans.7.1.2/HibernateFirebird/build/classes/
INFO [org.hibernate.cfg.Configuration]: configuring from file: hibernate.cfg.xml
INFO [org.hibernate.cfg.Configuration]: Configured SessionFactory: null
INFO [org.hibernate.cfg.reveng.OverrideRepository]: Override file: C:\proyectos\NetBeans.7.1.2\HibernateFirebird\src\hibernate.reveng.xml
INFO [org.netbeans.modules.hibernate.util.HibernateUtil]: Found pre-existing database connection.
INFO [org.netbeans.modules.hibernate.util.HibernateUtil]: Database Connection is pre-established. Returning the conneciton.
INFO [org.hibernate.connection.ConnectionProviderFactory]: Initializing connection provider: org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider
INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]: Loaded JDBC driver 
INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]: Got connection.. returning
INFO [org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor]: access to hibernate fails.
java.lang.NullPointerException
    at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:86)
    at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2005)
    at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
    at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor.checkConfig(HibernateCodeGenWizardDescriptor.java:282)
[catch] at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor.isValid(HibernateCodeGenWizardDescriptor.java:177)
    at org.openide.WizardDescriptor.updateStateOpen(WizardDescriptor.java:900)
    at org.openide.WizardDescriptor.updateState(WizardDescriptor.java:844)
    at org.openide.loaders.TemplateWizard.updateState(TemplateWizard.java:732)
    at org.netbeans.modules.project.ui.NewFileWizard.updateState(NewFileWizard.java:122)
    at org.openide.WizardDescriptor$Listener.stateChanged(WizardDescriptor.java:2094)
    at org.openide.util.WeakListenerImpl$Change.stateChanged(WeakListenerImpl.java:329)
    at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:133)
    at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:119)
    at org.netbeans.modules.project.ui.TemplateChooserPanel.stateChanged(TemplateChooserPanel.java:182)
    at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:133)
    at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:119)
    at org.netbeans.modules.project.ui.TemplateChooserPanelGUI.fireChange(TemplateChooserPanelGUI.java:164)
    at org.netbeans.modules.project.ui.TemplateChooserPanelGUI.access$500(TemplateChooserPanelGUI.java:78)
    at org.netbeans.modules.project.ui.TemplateChooserPanelGUI$FileChooserBuilder.fireChange(TemplateChooserPanelGUI.java:380)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI.propertyChange(TemplatesPanelGUI.java:329)
    at java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
    at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:263)
    at java.awt.Component.firePropertyChange(Component.java:8382)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$ExplorerProviderPanel.access$900(TemplatesPanelGUI.java:460)
    at org.netbeans.modules.project.ui.TemplatesPanelGUI$ExplorerProviderPanel$2.run(TemplatesPanelGUI.java:542)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:682)
    at java.awt.EventQueue$3.run(EventQueue.java:680)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)
    at java.awt.WaitDispatchSupport$2.run(WaitDispatchSupport.java:182)
    at java.awt.WaitDispatchSupport$4.run(WaitDispatchSupport.java:221)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.WaitDispatchSupport.enter(WaitDispatchSupport.java:219)
    at java.awt.Dialog.show(Dialog.java:1077)
    at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1074)
    at org.netbeans.core.windows.services.NbPresenter.doShow(NbPresenter.java:1109)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1096)
    at org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:126)
    at org.openide.util.Mutex.doEventAccess(Mutex.java:1363)
    at org.openide.util.Mutex.readAccess(Mutex.java:273)
    at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1081)
    at java.awt.Component.show(Component.java:1651)
    at java.awt.Component.setVisible(Component.java:1603)
    at java.awt.Window.setVisible(Window.java:1014)
    at java.awt.Dialog.setVisible(Dialog.java:1003)
    at org.netbeans.core.windows.services.DialogDisplayerImpl$1AWTQuery.showDialog(DialogDisplayerImpl.java:260)
    at org.netbeans.core.windows.services.DialogDisplayerImpl$1AWTQuery.run(DialogDisplayerImpl.java:186)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:682)
    at java.awt.EventQueue$3.run(EventQueue.java:680)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
    at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
4

2 回答 2

1

关于这个的一个新问题促使我再次调查它,问题是 Jaybird 如何加载自身和 Netbeans 中的自定义类加载器的组合。见https://stackoverflow.com/a/18920383/466862

于 2013-09-20T15:25:38.683 回答
0

删除 hibernate.cfg.xml 和 hibernate.reveng.xml ;并使用 Netbeans 再次生成它们。之后尝试创建实体类。我遇到了这个问题,这样做对我有用

于 2013-02-20T08:06:22.167 回答