[nbj2ee] Re: Hibernate wizard for mapping files and POJOs failing

  • From: "Sergey B. Petrov" < >
  • To:
  • Subject: [nbj2ee] Re: Hibernate wizard for mapping files and POJOs failing
  • Date: Fri, 17 Aug 2012 17:18:42 +0400

16.08.2012 0:24, ivancruz написал:
I have just one prior experience using Hibernate + PostgreSQL in a web 
application using Eclipse. In a new assignment I will be using Hibernate + 
Firebird and trying NetBeans for the first time. To get a foothold on the IDE 
I followed instructions on that tutorial:

http://netbeans.org/kb/docs/web/hibernate-webapp.html

So far I was successful on:

. adding the Firebird JDBC driver to the IDE;
. creating a databse connection;
. executing commands over that database connection;
. creating a HibernateUtil.java; and
. running the Hibernate reverse engeneering wizard.

The next step on the tutorial would be generating the mapping files and 
POJOs. That wizard throws a NullPointerException, the stack trace (from IDE 
log) folows:
this exception is from within hibernate code and may mean missing properties, how hibernate cfg files was created? If you are using web-app and may be datasource it's not well supported,
for example there is http://netbeans.org/bugzilla/show_bug.cgi?id=154000 related issue.
Sergey


INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]: 
Loaded JDBC driver
INFO [org.netbeans.modules.hibernate.util.CustomJDBCConnectionProvider]: Got 
connection.. returning
SEVERE [org.openide.util.Exceptions]
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)
[catch] at 
org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizard.generateClasses(HibernateCodeGenWizard.java:338)
        at 
org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizard.instantiate(HibernateCodeGenWizard.java:442)
        at 
org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1046)
        at 
org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:617)
        at 
org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:426)
        at 
org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:252)
        at 
org.openide.loaders.TemplateWizardIteratorWrapper$ProgressInstantiatingIterator.instantiate(TemplateWizardIteratorWrapper.java:180)
        at 
org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1566)
        at 
org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1521)
        at org.openide.WizardDescriptor.access$1800(WizardDescriptor.java:139)
        at 
org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2134)
        at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1411)
        at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1991)
INFO [org.hibernate.tool.Version]: Hibernate Tools 3.2.1.GA


I have tried NetBeans 7.2 and 7.1.2 with similar outcomes.

Any ideas?

Ivan.







[nbj2ee] Hibernate wizard for mapping files and POJOs failing

ivancruz 08/15/2012

[nbj2ee] Re: Hibernate wizard for mapping files and POJOs failing

Sergey B. Petrov 08/17/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close