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)