Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


Java Tutorials



Struts Tutorials

Struts Resources

Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Struts Struts Hibernate Hibernate Configuration File

User Comments
Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl
  Blink   Furl   Simpy   Y! MyWeb 

Add This Tutorial To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 

Current Comments

8 comments so far (post your own) View All Comments Latest 10 Comments:

HIbernate uses reflection to instantiate a POJO class to set the values into it from the DB. SO it does the instantiation using Java Reflection. When a class is instantiated using reflection the class must have a default constructor. Otherwise an exception is thrown.

Posted by Antony on Tuesday, 06.9.09 @ 11:14am | #88352


"Place hibernate.cfg.xml file in the source directory e.g. "C:\Struts-Hibernate-Integration\code\src\java""

in the directory
WEB-INF\src\java ?

Posted by Sergey on Sunday, 05.24.09 @ 18:44pm | #87980

I donot want to write cfg file to configure. I want to configure it by code. Please send me a code snippet.

Posted by Neelamadhab Mallick on Thursday, 02.5.09 @ 10:49am | #84529

i usually get SAX parse exception even the file is properly placed i also donot find any problem in validation with dtd. is there any soln. a warning i also get about to use log4j

Posted by sudhansu on Monday, 06.25.07 @ 10:55am | #20126

The <generator class = "increment"> in the <id> element tells hibernate to generate the primary key "id" by incrementing by 1.


Posted by Deepak Kumar on Friday, 04.6.07 @ 12:23pm | #13457

Should the POJO class always be Serializable? Why?
And what are the use of default constructors in the POJO class?

Posted by prosenjit on Friday, 04.6.07 @ 10:04am | #13448

In the Tutorial.hbm.xml file, what is the use of <generator class = "increment"> in the <id> element?

Posted by prosenjit on Friday, 04.6.07 @ 10:03am | #13447

Hi i'm trying to implement the above example but i got fatal exception . first of all i couldnt able to create sessionfactory. null pointer exception occured at the creating of sessionfactory. pls do advise me. Thanks

Posted by sarath koiloth ramath on Wednesday, 01.3.07 @ 12:26pm | #2528

Ask programming questions?



Back to Tutorial


  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification

Tell A Friend
Your Friend Name


Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net  | Site Map

India News

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright 2007. All rights reserved.