This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
NetBeans 6.5 IDE. Steps : - Create a valid hibernate.cfg.xml file. - Right click on the cfg file to invoke HQL Editor. - Type the query and click 'Run HQL query'. - Exception appears. java.lang.NullPointerException at java.util.Hashtable.put(Hashtable.java:396) at java.util.Properties.setProperty(Properties.java:128) at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:84) at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292) at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
Will be taking up this in 7.0
Created attachment 74626 [details] IDE log. Started IDE, invoked HQL editor, issued HQL command - got error.
In the meantime, I sorted out that funcion or non-function depends on the way the underlying database is accessed. For my application, I use following data-provider based configuration which causes the malfunction described while the application always runs fine with it: (excpert from hibernate.cfg.xml) ----- schnipp ----- <property name="connection.driver_class">org.postgresql.Driver</property> <property name="connection.datasource">java:comp/env/jdbc/XXmyDatabaseReferenceXXX</property> <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property> <property name="show_sql">false</property> ----- schnapp ----- However, the HQL editor works using this JDBC based configuration: ----- schnipp ----- <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/XXmyDatabaseXX</property> <property name="hibernate.connection.username">my_username</property> <property name="hibernate.connection.password">my_password</property> ----- schnapp ----- regards, V.
Thank you, now it really helps..
There is no datasources support on nb side for hibernate support so far, either should be implemented or some message should be provided instead of exception.
*** This bug has been marked as a duplicate of bug 159417 ***