-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: hbm2java Nullpointer Exception
PostPosted: Wed Apr 12, 2006 12:48 pm 
Beginner
Beginner

Joined: Thu Jun 30, 2005 4:20 am
Posts: 40
Location: Vienna
Hi,

it has taken me some time now to figure out why I was always getting a NullpointerException when starting the hibernatetool ant task (hbm2java).
The reason for the exception was simple, I had not provided a <configuration> element (as it is described as optional).
Can you just change the error message from a Nullpointer Exception to a more meaningful message (like "configurationfile parameter missing") , so that others do not need to search as long as I did?

thanks,
Stefan


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 12, 2006 5:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
did you try the latest version ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 2:43 am 
Beginner
Beginner

Joined: Thu Jun 30, 2005 4:20 am
Posts: 40
Location: Vienna
yes, I tried 3.1.0beta4.

regards
Stefan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 5:11 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
i meant the latest *cvs/svn* version or nightly build if you don't want to do the build your self.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 13, 2006 6:51 am 
Beginner
Beginner

Joined: Thu Jun 30, 2005 4:20 am
Posts: 40
Location: Vienna
I tested it now with the latest nightly build, and the NullpointerException still occurs.

One more question: is it possible to run hbm2java without a hibernate.cfg.xml? In an earlier version of hbm2java, this was possible by just quoting a fileset dir where all hbm.xml files were situated:

Code:
      <hbm2java output="${dir.gensrc.base}">
         <fileset dir="${dir.gensrc.base}/${dir.gensrc.path}">
            <include name="**/*.hbm.xml" />
         </fileset>
      </hbm2java>


Now this does not seem to be possible anymore (unless I am missing something). The error message is:

"Class org.hibernate.tool.ant.Hbm2JavaExporterTask doesn't support the nested "fileset" element."

This is a bit of a nuisance because my hibernate.cfg.xml File is not in the same project as the *.hbm.xml Files.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.