This is recent error came with running a maven project in the eclipse.
I just copied one of the mkyoung test projects on AOP declarative transaction and it gave me the error when trying to run the main method.
error
=================================================
The archive: C:/Users/xxxFolder/.m2/repository/hibernate/hibernate3/3.2.3.GA/hibernate3-3.2.3.GA.jar which is referenced by the classpath, does not exist.
=================================================
Initially pom.xml was refeerenced with
<dependency>
<groupId>hibernate</groupId>
<artifactId>hibernate3</artifactId>
<version>3.2.3.GA</version>
</dependency>
where as this could not found i changed to
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.3.ga</version>
</dependency>
And the above issue comes as i did not create dependency file and when i import the project to the eclipse , it still use old dependency file.
So it better to build the dependency file again.
Solution
----------
Just delete ".classpath" file and ".project" file from the folder and create again by running commad
mvn clean eclipse:eclispe
This will create brand new ".classpath" file and ".project" file and issue will be sorted.
Reference project :
http://www.mkyong.com/spring/spring-aop-transaction-management-in-hibernate/
No comments:
Post a Comment