I am new to hibernate. I have followed the given steps but it could not recognize hibernate.session and other imports. what i need to do?
Are you using Eclipse? Please let's know what steps you are following.
I will try to help you.
Hi! Im using Eclipse. Steps : 1. Downloaded the example code and library from rose india and extracted the content in a directory. 2. Downloaded file contains the Eclipse project. 3. Started the Eclipse project and selected Java Project. 4. Created a new project browsing the file. 5. Copied contact.hbm.xml, and hibernate.cfg.xml in the bin directory of the project using windows explorer.
As im using Oracle 10G i changed the dialect and given user name and password. Used my sample database table.
I think libraries are not included in the your project.
Go to project properties-->Java Build Path --> Libraries --> Click on Add JAR's button and then add the library to your project.
Download the code from Download Source Code Example of tutorial
Take the jar and code from the zip file. You will have to add the following jar files into your project.
ant-1.6.2.jar ant-antlr-1.6.2.jar ant-junit-1.6.2.jar ant-launcher-1.6.2.jar ant-swing-1.6.2.jar antlr-2.7.4.jar c3p0-0.8.5.jar cglib-full-2.0.2.jar cleanimports.jar commons-collections-2.1.1.jar commons-logging-1.0.4.jar concurrent-1.3.2.jar connector.jar dom4j-1.5.2.jar ehcache-1.1.jar hibernate3.jar jaas.jar jacc-1_0-fr.jar jaxen-1.1-beta-4.jar jboss-cache.jar jboss-common.jar jboss-jmx.jar jboss-remoting.jar jboss-system.jar jdbc2_0-stdext.jar jta.jar junit-3.8.1.jar log4j-1.2.9.jar mysql-connector-java-3.0.16-ga-bin.jar mysql-connector-java-3.1.6-bin.jar oscache-2.1.jar proxool-0.8.3.jar swarmcache-1.0rc2.jar versioncheck.jar xerces-2.6.2.jar xml-apis.jar
Read Hibernate tutorial at http://www.roseindia.net/hibernate/ Regards Deepak Kumar
thank u for helping...