Spring aspectj jar not configured correctly

newguy picture newguy · Jan 14, 2011 · Viewed 7.2k times · Source

I am getting this error when I tried to use a JPA object created by Roo.

Entity manager has not been injected (is the Spring Aspects JAR configured as an AJC/AJDT aspects library?)

I have followed some online advice to add the spring-aspects.jar to aspectj path in Eclipse but I still get this error. Does anyone know how to solve this?

The environment I am using is Spring 3.0.5, Hibernate 3.6 and JBoss 6.0.0.Final.

Answer

Michel Bilodeau picture Michel Bilodeau · Jun 21, 2012

Go to STS ROO console (right click in the project in STS, then Spring Tools, then Open Spring Roo) Type in the prompt perform clean (will perform Maven clean) Then type perform eclipse

It should work!