Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate App Issue

 
Srinivas Nagesh
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am very new to Hibernate and following the tutorial in this link to learn hibernate

Hibernate Tutorial

When i run the command



I get the following exception. I am not sure what the issue is about. Please help!

BTW i am using

JDK 6
Hibernate 3.2


 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is something wrong with your hibernate.cfg.xml file. It might be missing the header stuff.

Please post your hibernate.cfg.xml or if you are using JPA, then your persistence.xml. And under the Add Reply button on our site there are ten buttons, use the one labeled "CODE" so that you can put your xml in between the CODE tags that get produced so that the xml keeps its indentation.

Thanks

Mark
 
Srinivas Nagesh
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I looked into the config and couldnt find any wrong with it. Here it goes.


[ October 02, 2007: Message edited by: Srinivas Nagesh ]
 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what I see in the exception stack, it is the mapping file events/Event.hbm.xml that has a wrong format.
 
Srinivas Nagesh
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the events hbm file from the tutorial:

 
Edvins Reisons
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the same tutorial, add this to the top of the mapping file:

 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Edvins. I got really busy and wasn't able to look back on this thread, and it is always great when another rancher can step in help out in these cases.

Mark
 
Srinivas Nagesh
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Really sorry for wasting all your time on this. Such a silly mistake.

Thanks a ton.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Srinivas Nagesh:


Really sorry for wasting all your time on this. Such a silly mistake.

Thanks a ton.


Not at all, I find my "silly" mistakes is where I learn more than anywhere else.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic