Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:3.0.5
Mapping documents:
Simple
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
I am getting a Nullpointer exception when calling the 'Configuration.configure(File)
Method.
INFO: configuring from file: Numbers.hbm.xml
Exception in thread "main" java.lang.NullPointerException
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1214)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1184)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1146)
at com.numbers.data.NumbersHBMMain.main(Unknown Source)
Here is the code from hibernate Configuration.java
protected Configuration doConfigure(org.dom4j.Document doc) throws HibernateException {
Element sfNode = doc.getRootElement().element( "session-factory" );
String name = sfNode.attributeValue( "name" );
if ( name != null ) properties.setProperty( Environment.SESSION_FACTORY_NAME, name );
addProperties( sfNode );
parseSessionFactory( s
I dont understand why there isnt a a check on 'sfnode' in the code, that is probably where the error is?
This is my bug submit:
if (sfNode != null) {
Also, how would I get past this error.