问题描述
我正在开发一个使用netbeans,hibernate和firebird的桌面应用程序。
向导不会给我创建文件带来麻烦hibernate.cfg.xml,
或HibernateUtil.java
但是通过尝试:新建 - >其他 - > Hibernate - > Hibernate从数据库映射文件和POJO,使用我的hibernate.cfg.xml和hibernate .reveng.xml
向导抛出异常:
Hibernate配置失败,出现消息:java.lang.NullPointerException message.log查看exception 。 IDE 7.2.1(Build 201210100934)
Java:1.7.0_11; Java HotSpot(TM)客户机VM 23.6-b04
系统:在x86上运行的Windows XP版本5.1; CP1252; es_ES(nb)
Firebird版本:2.1.1
hibernate.cfg.xml
<?xml version =1.0encoding =UTF-8?>
<!DOCTYPE hibernate-configuration PUBLIC - // Hibernate / Hibernate Configuration DTD 3.0 // ENhttp://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
/ *
*要更改此模板,请选择工具|模板
*并在编辑器中打开模板。
* /
包mypackage.util;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.SessionFactory;
/ **
* Hibernate Utility类有一个方便的方法来获得Session Factory
*对象。
*
* /
public class HibernateUtil {
private static final SessionFactory sessionFactory;
static {
try {
//从标准(hibernate.cfg.xml)
// config文件创建SessionFactory。
sessionFactory = new AnnotationConfiguration()。configure()。buildSessionFactory();
} catch(Throwable ex){
//记录异常。
System.err.println(Initial SessionFactory creation failed。+ ex);
抛出新的ExceptionInInitializerError(ex);
public static SessionFactory getSessionFactory(){
return sessionFactory;
hibernate.reveng.xml
<?xml version =1.0encoding =UTF-8?>
<!DOCTYPE hibernate-reverse-engineering PUBLIC - // Hibernate / Hibernate反向工程DTD 3.0 // ENhttp://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd >
< hibernate-reverse-engineering>
< schema-selection />
< table-filter match-name =atable/>
< / hibernate-reverse-engineering>
这是文件视图,log ide
>登录会话:2013年1月24日,星期四12:09:08 CET
>系统信息:
产品版本= NetBeans IDE 7.2.1(内部版本201210100934)(#a183c5e41a19)
操作系统=在x86上运行的Windows XP版本5.1
Java; VM;供应商= 1.7.0_11; Java HotSpot TM客户端VM 23.6-b04; Oracle Corporation
Runtime = Java(TM)SE运行时环境1.7.0_11-b21
Java Home = C:\Archivos de programa \Java\jdk1.7.0_11\jre
系统区域设置; Encoding = es_ES(nb); Cp1252
主目录= C:\文档和设置\miusuario
当前目录= C:\Archivos deprograma\NetBeans 7.2.1
用户目录= C:\文档和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
安装= C:\Archivos deprograma\NetBeans 7.2.1\\\
b
C:\Archivos deprograma\NetBeans 7.2.1\ide
C:\Archivos deprograma\NetBeans 7.2.1\java
C:\Archivos deprograma\NetBeans 7.2.1\apisupport
C:\Archivos deprograma \NetBeans 7.2.1\webcommon
C:\Archivos deprograma\NetBean s 7.2.1\websvccommon
C:\Archivos deprograma\NetBeans 7.2.1\enterprise
C:\Archivos deprograma\NetBeans 7.2.1\profiler
C:\Archivos deprograma\NetBeans 7.2.1 \harness
C:\Archivos deprograma\NetBeans 7.2.1\javafx
C:\Archivos deprograma\ NetBeans 7.2.1 \ platform
Boot&分机。 Classpath = C:\Archivos deprograma\Java\jdk1.7.0_11\jre\lib\resources.jar; C:\Archivos deprograma\Java\jdk1.7.0_11\jre\\ \\ lib \ rt.jar; C:\Archivos deprograma\Java\jdk1.7.0_11\jre\lib\sunrsasign.jar; C:\Archivos deprograma\Java\jdk1。 7.0_11 \jre\lib\jsse.jar; C:\Archivos deprograma\Java\jdk1.7.0_11\jre\lib\jce.jar; C:\Archivos deprograma\\ \\ Java \jdk1.7.0_11\jre\lib\charsets.jar; C:\Archivos deprograma\Java\jdk1.7.0_11\jre\lib\jfr.jar; C: \Archivos deprograma\Java\jdk1.7.0_11\jre\classes; C:\Archivos deprograma\Java\jdk1.7.0_11\jre\lib\ext\access- bridge.jar; C:\Archivos deprograma\Java\jdk1.7.0_11\jre\lib\ext\dnsns.jar; C:\Archivos deprograma\Java\jdk1.7.0 _11\jre\lib\\ ext\jaccess.jar; C:\Archivos deprograma\Java\jdk1.7.0_11\jre\lib\ext\localedata.jar; C:\Archivos deprograma\Java\ jdk1.7.0_11\jre\lib\ext\sunec.jar; C:\Archivos deprograma\Java\jdk1.7.0_11\jre\lib\ext\sunjce_provider.jar; C:\Archivos deprograma\Java\jdk1.7.0_11\jre\lib\ext\sunmscapi.jar; C:\Archivos deprograma\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 deprograma\NetBeans 7.2.1\platform\lib\boot.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\lib\org-openide-modules .jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\lib\org-openide-util-lookup.jar; C:\Archivos deprograma\NetBean s 7.2.1 \platform\lib\org-openide-util.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\lib\locale\boot_ja.jar; C: \Archivos deprograma\NetBeans 7.2.1\platform\lib\locale\boot_pt_BR.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\lib\locale\ boot_ru.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\lib\locale\boot_zh_CN.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\ lib\locale\org-openide-modules_ja.jar; C:\Archivos deprograma\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 deprograma\NetBeans 7.2.1\platform\lib\locale \org-openide-modules_zh_CN.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform \\ lib \ locale \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ open-util-lookup_ ; C:\Archivos deprograma\NetBeans 7.2.1\platform\lib\locale\org-openide-util-lookup_ru.jar; C:\Archivos deprograma\NetBeans 7.2.1\ platform\lib\locale\org-openide-util-lookup_zh_CN.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\lib\locale\org-openide-util_ja.jar ; C:\Archivos deprograma\NetBeans 7.2.1\platform\lib\locale\org-openide-util_pt_BR.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\\ \\ lib \ locale \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ \\Archivos deprograma\Java\jdk1.7.0_11\lib\dt.jar; C:\Archivos deprograma\Java\\ jdk1.7.0_11\lib\tools.jar
启动类路径= C:\Archivos deprograma\NetBeans 7.2.1\platform\core\core.jar; C:\Archivos de programa\NetBeans 7.2.1\platform\core\org-openide-filesystems.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\core\locale\core_ja.jar ; C:\Archivos deprograma\NetBeans 7.2.1\platform\core\locale\core_pt_BR.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\core\ locale \core_ru.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\core\locale\core_zh_CN.jar; C:\Archivos deprograma\NetBeans 7.2.1\ platform \core\locale\org-openide-filesystems_ja.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\core\locale\org-openide-filesystems_pt_BR.jar; C :\Archivos deprograma\NetBeans 7.2.1\platform\core\\ locale\org-openide-filesystems_ru.jar; C:\Archivos deprograma\NetBeans 7.2.1\platform\core\locale\org-openide-filesystems_zh_CN.jar; C:\Archivos deprograma \NetBeans 7.2.1\\\
b\core\org-netbeans-upgrader.jar; C:\Archivos deprograma\NetBeans 7.2.1\\\
b\core\locale\core_nb.jar; C:\Archivos deprograma\NetBeans 7.2.1\\\
b\core\locale\core_nb_ja.jar; C:\Archivos deprograma\NetBeans 7.2.1\\\
b\core\locale \core_nb_pt_BR.jar; C:\Archivos deprograma\NetBeans 7.2.1\\\
b\core\locale\core_nb_ru.jar; C:\Archivos deprograma\NetBeans 7.2.1\\\
b \core\locale\core_nb_zh_CN.jar; C:\Archivos deprograma\NetBeans 7.2.1\\\
b\core\locale\org-netbeans-upgrader_ja.jar; C:\Archivos de programa\NetBeans 7.2.1\\\
b\core\locale\org-netbeans-upgrader_pt_BR.jar; C:\\ Archivos de programa \NetBeans 7.2.1\\\
b\core\locale\org-netbeans-upgrader_ru.jar; C:\Archivos deprograma\NetBeans 7.2.1\\\
b\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]:从文件配置: hibernate.cfg.xml
INFO [org.hibernate.cfg.Configuration]:配置SessionFactory:null
INFO [org.hibernate.cfg.reveng.OverrideRepository]:覆盖文件:C:\ proyectos\\ \\ NetBeans.7.1.2 \ HibernateFirebird \src\hibernate.reveng.xml
INFO [org.netbeans.modules.hibernate.util.HibernateUtil]:找到预先存在的数据库连接。
INFO [org.netbeans.modules.hibernate.util.HibernateUtil]:数据库连接是预先建立的。返回连接。
INFO [org.hibernate.connection.ConnectionProviderFactory]:初始化连接提供者:org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider
INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]:Loaded JDBC驱动
INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]:有连接..返回
INFO [org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor]:访问休眠失败。
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)
在org.openide.WizardDescriptor $ Listener.stateChanged(WizardDes criptor.java:2094)在org.openide.util.WeakListenerImpl $ Change.stateChanged(WeakListenerImpl.java:329)
在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)
在org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:133)
位于org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:119)
位于org.netbeans.modules.project .ui.TemplateChooserPanelGUI.fireChange(TemplateChooserPanelGUI.java:164)
位于org.netbeans.modules.project.ui.TemplateChooserPanelGUI.access $ 500(TemplateChooserPanelGUI.java:78)
位于org.netbeans.modules。 project.ui.TemplateChooserPanelGUI $ FileChooserBuilder.fireChange(TemplateChooserPanelGUI.java:380)
at org.netbeans.modules.project.ui.TemplatesPanelGUI.propertyChange(TemplatesPanelGUI.java:329)
java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
在java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
在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)
在org.netbeans.modules.project.ui.TemplatesPanelGUI $ ExplorerProviderPanel $ 2.run(TemplatesPanelGUI.java:542)
在java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)$ b $ at java.awt.EventQueue.access $ 200(EventQueue.java:103)
at java.awt.EventQueue $ 3。运行(EventQueue.java:682)
在java.awt.EventQueue $ 3.run(EventQueue.java:680)$ b $在java.security.AccessController.doPrivileged(本地方法)$ b $在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)
在java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)$ b $在java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
在java.awt。 EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)$ b $ at java.awt.WaitDispatchSupport $ 2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport $ 4.run(WaitDispatchSupport.java:221) $ java.util.AccessController.doPrivileged(Native方法)
java.awt.WaitDispatchSupport.enter中的
(WaitDispatchSupport.java:219)$ java.util.Dialog.show中的
(对话框。
at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1074)
at org.netbeans.core.windows.servic在org.netbeans.core.windows上
在org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1096)
(NbPresenter.java:1109)
。
at org.openide.util.Mutex.doEventAccess(Mutex.java:1363)
at org.openide.util.Mutex.readAccess(Mutex.No.Butsenter.run(NbPresenter.java:126)
at org.openide.util.Mutex.doEventAccess
at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1081)
at java.awt.Component.show(Component.java:1651)$ b $ java.util.Component.setVisible(Component.java:1603)$ b $ java.awt.Window.setVisible(Window.java:1014)
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)
位于java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
位于java.awt.EventQu eue.dispatchEventImpl(EventQueue.java:721)
在java.awt.EventQueue.access $ 200(EventQueue.java:103)
在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(
at java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
在java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
在java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
在java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java :150)
在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
在java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
INFO [org.netbeans.modules.hibernate.util.CustomClassLoader]:使用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]:从文件配置:hibernate.cfg.xml
INFO [org .hibernate.cfg.Configuration]:配置的SessionFactory:空
INFO [org.hibernate.cfg.reveng.OverrideRepository]:覆盖文件:C:\ proyectos\NetBeans.7.1.2\HibernateFirebird\src\hibernate.reveng.xml
INFO [org.netbeans.modules.hibernate.util.HibernateUtil]:找到预先存在的数据库连接。
INFO [org.netbeans.modules.hibernate.util.HibernateUtil]:数据库连接是预先建立的。返回连接。
INFO [org.hibernate.connection.ConnectionProviderFactory]:初始化连接提供者:org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider
INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]:Loaded JDBC驱动
INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]:有连接..返回
INFO [org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizardDescriptor]:访问休眠失败。
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)
在org.openide.WizardDescriptor $ Listener.stateChanged(WizardDes criptor.java:2094)在org.openide.util.WeakListenerImpl $ Change.stateChanged(WeakListenerImpl.java:329)
在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)
在org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:133)
位于org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:119)
位于org.netbeans.modules.project .ui.TemplateChooserPanelGUI.fireChange(TemplateChooserPanelGUI.java:164)
位于org.netbeans.modules.project.ui.TemplateChooserPanelGUI.access $ 500(TemplateChooserPanelGUI.java:78)
位于org.netbeans.modules。 project.ui.TemplateChooserPanelGUI $ FileChooserBuilder.fireChange(TemplateChooserPanelGUI.java:380)
at org.netbeans.modules.project.ui.TemplatesPanelGUI.propertyChange(TemplatesPanelGUI.java:329)
java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:335)
在java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:327)
在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)
在org.netbeans.modules.project.ui.TemplatesPanelGUI $ ExplorerProviderPanel $ 2.run(TemplatesPanelGUI.java:542)
在java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:721)$ b $ at java.awt.EventQueue.access $ 200(EventQueue.java:103)
at java.awt.EventQueue $ 3。运行(EventQueue.java:682)
在java.awt.EventQueue $ 3.run(EventQueue.java:680)$ b $在java.security.AccessController.doPrivileged(本地方法)$ b $在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)
在java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)$ b $在java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
在java.awt。 EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:154)$ b $ at java.awt.WaitDispatchSupport $ 2.run(WaitDispatchSupport.java:182)
at java.awt.WaitDispatchSupport $ 4.run(WaitDispatchSupport.java:221) $ java.util.AccessController.doPrivileged(Native方法)
java.awt.WaitDispatchSupport.enter中的
(WaitDispatchSupport.java:219)$ java.util.Dialog.show中的
(对话框。
at org.netbeans.core.windows.services.NbPresenter.superShow(NbPresenter.java:1074)
at org.netbeans.core.windows.servic在org.netbeans.core.windows上
在org.netbeans.core.windows.services.NbPresenter.run(NbPresenter.java:1096)
(NbPresenter.java:1109)
。
at org.openide.util.Mutex.doEventAccess(Mutex.java:1363)
at org.openide.util.Mutex.readAccess(Mutex.No.Butsenter.run(NbPresenter.java:126)
at org.openide.util.Mutex.doEventAccess
at org.netbeans.core.windows.services.NbPresenter.show(NbPresenter.java:1081)
at java.awt.Component.show(Component.java:1651)$ b $ java.util.Component.setVisible(Component.java:1603)$ b $ java.awt.Window.setVisible(Window.java:1014)
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)
位于java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
位于java.awt.EventQu eue.dispatchEventImpl(EventQueue.java:721)
在java.awt.EventQueue.access $ 200(EventQueue.java:103)
在java.awt.EventQueue $ 3.run(EventQueue.java:682)在java.awt.EventQueue中的$ 3.run
(EventQueue.java:680)
在java.security.AccessController.doPrivileged(本机方法)
在java.security.ProtectionDomain $ 1.doIntersectionPrivilege( ProtectionDomain.java:76)
在java.awt.EventQueue.dispatchEvent(EventQueue.java:691)
在org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:158)
在java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
在java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
在java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java :150)
在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
在java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
在java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
I'm developing a desktop application using netbeans, hibernate and firebird.
The wizard does not give me trouble creating files hibernate.cfg.xml,or HibernateUtil.java
But by trying: New -> Other -> Hibernate -> Hibernate Mapping Files and POJOs from Database, using my hibernate.cfg.xml and hibernate.reveng.xmlthe wizard throws the exception:
Hibernate configuration fails with message: java.lang.NullPointerException message.log see exception for details.
I'm using
Product Version: NetBeans IDE 7.2.1 (Build 201210100934)
Java: 1.7.0_11; Java HotSpot(TM) Client VM 23.6-b04
System: Windows XP version 5.1 running on x86; Cp1252; es_ES (nb)
Firebird version: 2.1.1
hibernate.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;
}
}
hibernate.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>
This is the file view, 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)
A new question about this triggered me to investigate it again, the problem is a combination of how Jaybird loads itself and a custom classloader in Netbeans. See https://stackoverflow.com/a/18920383/466862
这篇关于NetBeans Hibernate中的NullPointerException从Firebird数据库映射文件和POJO向导的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!