<dependency>
<groupId>org.hibernate</groupId>
<artifactId>ejb3-persistence</artifactId>
<version>3.3.2.Beta1</version>
<type>pom</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.5.6-Final</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.6.7.Final</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<repositories>
<repository>
<id>jboss</id>
<name>JBoss repository</name>
<url>http://repository.jboss.org/maven2</url>
</repository>
</repositories>
pom.xml file.
But My eclipse could not identify SessionFactory, Session,Transaction,HibernateException etc and gives compile time error. how to solve it?
I don’t think the repository URL you are using is correct. I get a 403 when accessing http://repository.jboss.org/maven2
Have a look at the section “Configuring Maven to use the JBoss Repository” on the JBoss Maven Getting Started page.
Once you have configured the correct repository try building your project outside of Eclipse. If it builds then you know the Maven project is configured correctly.
If you still have classpath issues inside your workspace after a successful build, try regenerating the eclipse settings files.