Hi
i am new to hibernate. i have did one small hibernate application for store employee name and salary in mysql database.
here i have mention the following files
1. configuration file
2. mapping file
3. main file
4. error message
5. pojo class
hibernate.cfg.xml
employee.hbm.xml
Emploree.java
main file
error message
Jan 4, 2012 1:02:28 PM org.hibernate.cfg.Environment <clinit>
INFO: Hibernate 3.2.1
Jan 4, 2012 1:02:28 PM org.hibernate.cfg.Environment <clinit>
INFO: hibernate.properties not found
Jan 4, 2012 1:02:28 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: Bytecode provider name : cglib
Jan 4, 2012 1:02:28 PM org.hibernate.cfg.Environment <clinit>
INFO: using JDK 1.4 java.sql.Timestamp handling
Jan 4, 2012 1:02:28 PM org.hibernate.cfg.Configuration configure
INFO: configuring from resource: /hibernate.cfg.xml
Jan 4, 2012 1:02:28 PM org.hibernate.cfg.Configuration getConfigurationInputStream
INFO: Configuration resource: /hibernate.cfg.xml
Jan 4, 2012 1:02:28 PM org.hibernate.cfg.Configuration addResource
INFO: Reading mappings from resource : developerhelpway/hibernate/employee.hbm.xml
org.hibernate.InvalidMappingException: Could not parse mapping document from resource developerhelpway/hibernate/employee.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:569)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1584)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1552)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1531)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1505)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1425)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1411)
at developerhelpway.hibernate.FirstExample.main(FirstExample.java:19)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:508)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:566)
... 7 more
Caused by: org.dom4j.DocumentException:
http://hibernate.sourceforge.net/%0Ahibernate-mapping-3.0.dtd Nested exception:
http://hibernate.sourceforge.net/%0Ahibernate-mapping-3.0.dtd
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:499)
... 8 more
Exception in
thread "main" java.lang.NullPointerException
at developerhelpway.hibernate.FirstExample.main(FirstExample.java:33)
Please any one help me to find the issue.. Thanks in advance