Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-31-2008, 08:55 AM
Member
 
Join Date: Apr 2008
Location: villupuram
Posts: 20
sundarjothi is on a distinguished road
Send a message via AIM to sundarjothi
hibernate hbm.xml exception
hi

it is very urgent requirement please help me.

while i am executing hibernate example file, program throw an exceotion.

I am new to hibernate concepts.

regards,
sundar

program exception



Start execution
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception occur:Could not parse mapping document from resource event/Sample.hbm.xml
org.hibernate.InvalidMappingException: Could not parse mapping document from resource event/Sample.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Config uration.java:575)
at org.hibernate.cfg.Configuration.parseMappingElemen t(Configuration.java:1593)
at org.hibernate.cfg.Configuration.parseSessionFactor y(Configuration.java:1561)
at org.hibernate.cfg.Configuration.doConfigure(Config uration.java:1540)
at org.hibernate.cfg.Configuration.doConfigure(Config uration.java:1514)
at org.hibernate.cfg.Configuration.configure(Configur ation.java:1434)
at org.hibernate.cfg.Configuration.configure(Configur ation.java:1420)
at Test.main(Test.java:16)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
at org.hibernate.cfg.Configuration.addInputStream(Con figuration.java:508)
at org.hibernate.cfg.Configuration.addResource(Config uration.java:572)
... 7 more
Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tu plizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|ar ray|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandl erWrapper.error(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorRe porter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTD Validator.handleEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTD Validator.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocum entScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl$FragmentContentDispatcher.dis patch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumen tFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Co nfiguration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLPars er.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.Abstrac tSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.Configuration.addInputStream(Con figuration.java:505)
... 8 more
Exception in thread "main" java.lang.NullPointerException
at Test.main(Test.java:30)
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hibernate DAO sundarjothi Eclipse 0 04-26-2008 09:29 AM
hibernate vipinpvijayan Web Frameworks 1 04-21-2008 06:41 PM
Trouble with factory method - unhandled exception type Exception desmond5 New To Java 1 03-08-2008 07:41 PM
org.hibernate.exception.GenericJDBCException: could not insert Peter Database 2 07-04-2007 03:00 PM
org.hibernate.ejb.Version <clinit> INFO: Hibernate EntityManager 3.2.0.CR1 Heather Database 2 06-30-2007 04:01 PM


All times are GMT +3. The time now is 01:17 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org