• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Hibernate App Issue

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the same tutorial, add this to the top of the mapping file:

 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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

Thanks a ton.
 
Mark Spritzler
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic